本次加拿大作业是一个计算理论相关的assignment,有需要代写的可咨询客服

 

Question 1[15 points] Consider the grammar S ! aSjaSbSj”:

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

Question 2[30 points] 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[15 points] Give an unambiguous grammar for the language defined by the grammar
in question 1.

Question 4[20 points] Give an unambiguous context-free grammar to define the following lan
guage:

Question 5[20 points] Construct a PDA that accepts the following language

{a3ibij} ≥ 0g:

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