SCXT 350

Exercise set #3

Due:  Wednesday, Dec. 4 (in class)


Note:  This exercise may be done in groups of no more than two or three. If you do that, each member of the group should turn in a separate copy with the names of the other members of the group clearly written at the top.
Consider the following grammar

 

  1. Write parse tree derivations for the two strings 'abcd' and 'abcbcd'
  2. Write derivations for both strings
  3. Convert the grammar to a finite state automata, and check that the two strings (above) are correctly recognized.
  4. Characterize the machine. What does it recognize/generate?
  5. Write a "state table" for the machine.


Consider the grammar for expressions:

 

  1. Write a parse tree derivation for (x + y) / (x - y)
  2. Write a derivation for that expression (i.e., E -> T -> T / F ...(etc.))


Please work the second problem at the end of chapter 6 in the textbook (please note - there may be a mistake in the solution at the back of the book)


Any questions?  Please ask!
-Bob