An $LL(1)$ grammar has the following properties
- It should NOT be ambiguous
- It should NOT have common prefix problem.(it should be left factored)
- It should NOT have left recursion.
The $LL(1)$ grammar for the given languages are as follows :-
Option $A.$
$\{a^n o b^n \mid n \geq 1\} \cup \{ a^n b^{n} \mid n \geq 1 \}$
$S \rightarrow aAb$
$A \rightarrow aAb| \epsilon | o$
Option $B.$
$\{ a^n b^m \mid m,n \geq 0 \}$
$S \rightarrow AB | \epsilon$
$A \rightarrow aA' $
$A' \rightarrow \epsilon | A $
$B \rightarrow bB' $
$A' \rightarrow \epsilon | B $
Option $C.$
$\{a^ib^j\mid i\geq j\}$
$S \rightarrow aS'$
$S' \rightarrow Sb | Ab$ ( Here $FIRST(S) \cap FIRST(A) \neq \phi $ )
$A \rightarrow aA' $
$A' \rightarrow \epsilon | A$
So this is $NOT$ a $LL(1)$ grammar.
Option $D.$
$\{a^ib^j\mid i= j\}$
if $i,j \geq 0 $
$S \rightarrow \epsilon |aSb$
if $i,j >0 $
$S \rightarrow aS'$
$S' \rightarrow b|Sb$
$\therefore$ For option $C$ we can't generate $LL(1)$ grammar.