Spring 2001, CSE 428: Quiz 1.3 - 18 Jan 2001

Solution

  1. The right answer is 5: The language of all the strings of the form   ab, abab, ababab,   etc.

  2. The right answer is 2: A grammar is ambiguous if there are two different derivation trees for the same string

    1. "^" is right associative true
    2. "-" has precedence over "^" false
    3. The grammar is unambiguous: true

    1.       - 1 not derivable
    2.       1 - 2 derivable

  3.           A
             /|\
            / | \
           A  -  B
          /|\    |
         / | \   |
        A  -  B  C
        |     |  |
        B     C  1
        |     |
        C     1
        |
        2