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

  Budget analysis

Budget Analysis

  Calculate the price of a zero coupon bond

Calculate the price of a zero coupon bond that matures in 20 years if the market interest rate is 6.5 percent. Assume semi-annual compounding.

  What are the covariance and correlation

Base on the following information; calculate the expected return and standard deviation of each of the stocks. Assume each state of the economy is equally likely to happen. What are the covariance and correlation between the returns of the two sto..

  What is a reasonable price for a share of rah stock

RAH Inc. is not public ally traded, but the P/E ratios of its 4 closest competitors are 15, 15,3,15,7', and 16.5. RAH's current earnings per share are $ 1.50. They are expected to grow at 6% for the next few years. What is a reasonable price for a..

  Compare the attractiveness of tax-free investments to

compare the attractiveness of tax-free investments to taxable investments by describing the trade-offs in rate of

  A group of concerned citizens in a small town are

a group of concerned citizens in a small town are organizing against fracking. even though fracking promises to

  What is the npv of buying the new lathe

What is the NPV of buying the new lathe

  Different types of value in the valuation process

Valuation of a firm's financial assets is said to be based on what is expected in the future, in terms of the future performance of the firm, the industry, and the economy. What types of value would you consider when assigning "value" to a firm's..

  Particular pieces of information are required

Describe any two of your choice and explain why you feel those particular pieces of information are required.

  Sunk costs are best described as

Question 1: Which of the following is true when a company has very little debt? Question 2: Sunk costs are best described as:

  If a person age 23 puchases a 100000 life paid up at age 65

if a person age 23 puchases a 100000 life paid up at age 65 life insurance policy for a cost of 1450 per year what is

  Opportunities in a foreign market

The Final Paper should demonstrate an understanding of the materials (texts, assignments, and discussions) covered in this course. Assume the role of Marketing Manager. Select a product (good or service) that is sold in the United States and has sale..

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