3. Consider the following EBNF grammar:
$$A \rightarrow \{a\} B$$
$$B \rightarrow b \{b\} A$$
Which of the following statements about the grammar is true, and most appro-
priate?
A. It describes an infinite language.
B. It is inadequate.
C. The string "bbab" is a sentence of the language defined by the grammar.
D. It is equivalent to the regular expression "a*b*".
5 marks (-1.6 marks for incorrect).
4. Consider the following grammar:
$$A \rightarrow abC$$
$$C \rightarrow aX$$
$$X \rightarrow b(A|\epsilon)$$
Which, if any, of the following grammars is not equivalent to it?
A. $$A \rightarrow \{abab\}$$
B. $$B \rightarrow abP \quad P \rightarrow abD \quad D \rightarrow \epsilon | B$$
C. $$C \rightarrow DED \quad D \rightarrow ab \quad E \rightarrow DED | \epsilon$$
D. $$D \rightarrow \{ab\}$$
5 marks (-1.6 marks for incorrect).