Spring 2001, CSE 428: Quiz 1.2 - 18 Jan 2001
Solution
The right answer is 5: the language of all the strings of the form
b, aba, aabaa, aaabaaa
, etc.
The right answer is 4: A grammar is ambiguous if there are two different derivation trees for the same string
The grammar is ambiguous:
false
"
^
" is right associative
true
"
-
" has precedence over "
^
"
false
0 ^ 0
derivable
21
not derivable
A /|\ / | \ A - B | | B C /|\ | / | \ | C ^ B 1 | | 2 C | 1