Context-Free Grammars & Languages

Answer & solution
Official answer: D
At every step S can emit either a or b and recurse, then terminate with epsilon. Every finite binary-alphabet word, including epsilon, is generated, giving {a, b}*, D.
For any desired word w, choose the production beginning with its next character repeatedly, then use S→ε after its final character. For example baba follows S⇒bS⇒baS⇒babS⇒babaS⇒baba. Conversely, every production emits only a or b, so no other alphabet symbols can appear. This two-direction argument proves equality with {a,b}*, rather than merely showing a few example strings are generated. The ε production explicitly includes the empty word.