Notice: Undefined index: url in /var/www/html/wp-content/themes/orfeo/functions.php on line 432



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

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.

EasyDue™ 支持PayPal, AliPay, WechatPay, Taobao等各种付款方式!

E-mail:  微信:easydue