Parsing & Syntax Analysis

Answer & solution
Answer: C (no official key was published)
1. Approach. P concerns every presentation of a language, whereas Q asks whether a suitable presentation exists. A language can have a poorly factored grammar even though another grammar parses deterministically.
2. Derivation and interpretation. P is false: the right-linear regular grammar S→aA | aB, A→b, B→c has two alternatives whose FIRST sets both contain a, so this particular grammar is not LL(1). Q is true: construct a grammar from a DFA by using one nonterminal per state, production Q→aR for each transition on a, and Q→ε for each accepting state. Determinism gives at most one alternative per terminal; epsilon is selected at end of input. This yields an LL(1), hence LR(1), grammar for the regular language (or use the standard inclusion of regular languages in deterministic context-free languages). Thus P false and Q true, option C.