loader  Loading... Please wait...

Question(s) / Instruction(s):

1) Let G be the grammar S € €™ SAE | AE | Ž» A € €™ aA | a E € €™ bE | b (a) Give a leftmostderivationof aabaabb. (b)Draw the parse tree for the derivationin part(a). (c)Show thatthis grammaris ambiguous. (d)Whatis the shorteststringderivable using this grammar? 2)Use the construction given in class for convertinga context-freegrammarto a pushdown automaton to give a pushdownautomaton thatrecognizes the lan- guage of the following grammar.The alphabet is {a, E,c}. . S € €™ aSE | A A € €™ bAc | B E € €™ a 3) Let M be the Turing machine with Ž£ = {0, 1} defined by the following transition function: Assume the machine startsin stateqO looking at the first inputsymbol on the tape.E indicatesa blank on the tape. (a)Draw the statediagramfor M . (b)Tracethe computation for theinputstring01100100. (Use machine con- figurations for the trace.) (c) Tracethe computation for theinputstring00000000. (Use machine con- figurations for the trace.) (d)Describe theresultof a computation by M .Thatis, whatfunctiondoes M compute?

Find Similar Answers by Subject


Student Reviews

Rate and review your solution! (Please rate on a Scale of 1 - 5. Top Rating is 5.)


Expert's Answer
Download Solution:
$1.79

This solution includes:

  • Plain text
  • Cited sources when necessary
  • Attached file(s)
  • Solution Document(s)



Reach Us

408-538-8534

20-3582-4059

39-008-4233

+1-408-904-6494