Generate operator-precedence relations

Assignment Help Finance Basics
Reference no: EM131099226

A grammar is said to be a (uniquely invertible) operator-precedence grammar if it is an operator grammar with no two righ[ sides that have the same pattern of terminals. and the method of Exercise 4.26 yields at most one precedence relation between any pair of terminals. Which of the grammars of Exercise 4.27 are operator-precedence grammars?

Exercise 4.27 Generate operator-precedence relations for the following grammars.

a) The grammar of Exercise 4.2.

b) The grammar of Exercise 4.3.

c} The expression grammar (4. 10).

Exercise 4.2. Consider the grammar

a) Show that this grammar is ambiguous by constructing two different leftmost derivations for the sentence abab.

b) Construct the corresponding rightmost derivations for abab.

c) Construct the corresponding parse trees for obob.

*d) What ,language does this grammar generate'!

Exercise 4.3 Consider the grammar

a) Construct a parse tree for the sentence not (true or false).

b) Show that this grammar generates all boolean expressions.

*c) Is this grammar ambiguous? Why?

Exercise 4.26 There is a mechanical way to produce operator-precedence relations from an operator grammar. including those with many different nonterminals. Define leading (A) for nonterminal A to be the set of terminals a such that a is the leftmost terminal in some string derived from A. and define trailing (A) to be the set of terminals that can be the rightmost in a string derived from A. Tben for terminals a and b. we say a .,; b if there is a right side of the form au(3.b")'. where (3. is either empty or a single nonterminal, and a and 'Yare arbitrary. We say a b if there is a right side of the form «Abf3.. and lJ is in trailing (A ). •n both cases. a and 13 are arbitrary slrings, Also. $

Reference no: EM131099226

Questions Cloud

What is the smallest amount : You are going to inherit €200,000 fifteen years from today. However, you need funds today. If the discount rate associated with that cash flow is 16% then what is the smallest amount that would you be willing to accept today in order to forgo the ..
Who benefitted from the run up in mortgages : Who benefitted from the run up in mortgages? Why did it go on so long? Where were the "rating" agencies on this? Why did the Federal Reserve cut interest rates to "zero" and start buying treasury bonds?
What is psychopathology : How did the early beliefs about abnormal behavior influence the types of treatments for mental illness? How did the psychoanalytic approach contribute to the understanding of what causes mental illness?
Problem regarding the assigned a discount rate : Because of its high risk, the project has been assigned a discount rate of 16 percent. In dollars, how much will this project return in today's dollars for every $1 invested?
Generate operator-precedence relations : A grammar is said to be a (uniquely invertible) operator-precedence grammar if it is an operator grammar with no two righ[ sides that have the same pattern of terminals.
To produce operator-precedence relations : There is a mechanical way to produce operator-precedence relations from an operator grammar. including those with many different nonterminals.
To produce operator-precedence relations : There is a mechanical way to produce operator-precedence relations from an operator grammar. including those with many different nonterminals.
Problem regarding the assigned a discount rate : Because of its high risk, the project has been assigned a discount rate of 16 percent. In dollars, how much will this project return in today's dollars for every $1 invested?
Listing of the key contents of policy directions : SLE721 Policy and Planning for Sustainable Development, Assignment: Policy Implementation Requirements. Listing of the Policy directions. Listing of the key contents of Policy directions. Discussion/analysis as to why these directions are necessary

Reviews

Write a Review

Finance Basics Questions & Answers

  Express the following income statement information in

express the following income statement information in common-size percents and assess whether this companys situation

  What will one share of b&k common stock be worth

The company adheres to a constant rate of growth dividend policy. What will one share of B&K common stock be worth 10 years from now if the applicable discount rate is 9 percent?

  What is the net present value

The company has a cost of capital of 22% The after tax cost of debt is 7% the cost of equity is 32% What is the Net present value.

  How much is basic earnings per share amount for 2011

Creekside paid $30 million in dividends on preferred stock, which was convertible into 15 million shares of common stock. How much is basic earnings per share amount for 2011?

  What is the aftertax cost of debt

Jiminy's Cricket Farm issued a 30-year, 9.8 percent semiannual bond 5 years ago. The bond currently sells for 87 percent of its face value. The company's tax rate is 40 percent.

  What would the total interest cost compared

What if interest rates on the 8 percent loan go up to 13 percent in year 2 and 18 percent in year 3? What would the total interest cost compared to the 10 percent, three-year loan?

  What type of qualified plan would you advise for michael

if they need to expand their business. What type of qualified plan would you advise for Michael and Janet? Why?

  Calculate after-tax cost of debt for each capital structure

compare the WACCs calculated in part (d) and discuss the impact of the firm's financial leverage on its WACC and its related risk.

  Value of woorhoos stock now

The Woorhoos Lock Company is planning a two-for-one stock split. You own 5,000 shares of Woorhoos common stock that is currently selling for $120 a share. What is the value of your Woorhoos stock now, and what will it be after the split?

  Lifeline inc has sales of 603000 costs of 255000

lifeline inc. has sales of 603000 costs of 255000 depreciation expense of 62000 interest expense of 29000 and a tax

  Calculate the long position gain or loss

Greg recently inherited a large, family-run farm that primarily produces grain for harvest each year. Compute the long position gain or loss in this scenario.

  Compare and contrast the two techniques focusing on irr

recall that the net present value npv and internal rate of return irr techniques take the time value of money into

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd