SCXT 350

Exercise set #3

Due:  Wednesday, Nov. 29 (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


Please work the two problems at the end of chapter 6 in the textbook (please note - there may be a mistake in one of them, which we will discuss in class on Wednesday).


Any questions?  Please ask!

-Bob