Give an unambiguous context-free grammar

Assignment Help Theory of Computation
Reference no: EM133019012

There are 5 questions for credit and one for you to ponder.

Question 1: Consider the grammar

S → aS|aSbS|ε.

Show that this grammar is ambiguous by giving two different parse trees for the string aab.

Question 2: Show that the grammar of the last question defines all strings, and only those strings, in which every prefix contains at least as many as as bs. Note that this requires two proofs. First, you must show that every string produced by the grammar has this property. Second, you must show that every string that has this property can be produced by this grammar.

Question 3: Give an unambiguous grammar for the language defined by the grammar in question 1.

Question 4: Give an unambiguous context-free grammar to define the following language:

L = {ai+jbj+kci+k|i,j,k ≥ 1.}

Question 5 Construct a PDA that accepts the following language

{a3ibi| ≥ 0}.

Your answer should be a drawing of the states and transitions.

Question 6 Show that the language L = {anbn|n ≥ 0} U {anb2n|n ≥ 1} is context free, but is not accepted by any deterministic PDA.

Reference no: EM133019012

Questions Cloud

What is the minimum percentage ownership : What is the minimum percentage ownership for a shareholder to have the incentive to monitor the managers? (Show the computation)
What is the company current stock price : The company's beta is 1.25, the required return on the market is 10.50%, and the risk-free rate is 4.50%. What is the company's current stock price
What ones should in the sales journal : M and N Sporting Goods reports these selected transactions for the month of July: What ones should in the sales journal
How much is the impairment loss recognized : On January 1. 2020, Tigreal Bank granted a 10%, P3,000,000 loan to Kagura Company. How much is the impairment loss recognized in 2021
Give an unambiguous context-free grammar : Give an unambiguous context-free grammar to define the language - Construct a PDA that accepts the following language
What is the projected addition to retained earnings : What is the projected addition to retained earnings? Show all your work by completing a Statement of Comprehensive Income for next year
What is the minimum tax : What is the minimum Part IV tax (non-eligible) which Falcon Ltd will have to report for December 31, 2020? Show your work
Describe the optimal strategy : (a) Structure ITNET's problem of whether or not to sue Singular as a decision tree. Clearly indicate what are the decisions to be made and what are the uncertai
Make the journal entries to record the transactions : Make the journal entries to record the above transactions - Sep 10 Issued 5,000 convertible preferred shares for $105 per share

Reviews

Write a Review

Theory of Computation Questions & Answers

  Finite-state machine design

Create a finite-state machine design to turn your FPGA development board into a simple programmable music box.

  Redundant sequence identi cation

Redundant sequence identi cation

  Compute a shortest superstring

Dynamic programming algorithm to compute a shortest superstring.

  Propositional and predicate logic

Write down a structural induction principle for the PlayTree free type

  Design a syntactic analyzer

Design a syntactic analyzer for the language specified by the grammar

  Design unambiguous grammar to parse expressions

Write a program would read two numbers and then print all numbers between the first and the second, inclusive. Design unambiguous grammar to parse expressions

  Consider a logic function with three outputs

Consider a logic function with three outputs,  A ,  B , and  C , and three inputs,  D ,  E , and  F . The function is defined as follows:  A  is true if at least one input is true,  B  is true

  Considering a single programmed operating system

Considering a single programmed operating system, what is the minimal total time required to complete executions of the two processes? You should explain your answer with a diagram.

  How to construct an nfa

Give a construction that assumes you are given a DFA for L and show how to construct an NFA (with or without ε-moves) to recognize sort(L).

  Equivalence classes to construct minimal dfa for language

How many equivalence classes does this relation have and what are they? Use these equivalence classes to construct the minimal DFA for the language.

  Impact of moore-s law on data center costs

Discuss the impact of Moore's law on data center costs on such things as servers and communications equipment. List at least 3 steps or recommendations your data center can take to offset some or all of the effect of Moore's law.

  Problem encountered in statements in predicate logic

How the problem would be encountered in attempting to represent the following statements in Predicate logic. it should be possible to: John only likes to see French movies.

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