L = {a nbn+1| n≥0}
is
(A) S →a SB, B→bB
|λ
(B) S →a SB, B-→bB | b
(C) S →a SB | b, B →b
(D) S →a Sb | b
Answer C.
CFG is in Greibach normal form (GNF) if the right-hand sides of
all rules start with a terminal , optionally followed by some variables. A
non-strict form allows one exception to this format restriction for allowing
the empty word (epsilon, ε) to be a
member of the described language
One length word formed by L are {b}
When n=1 word formed by L are {abb}
When n=2 word formed by L are{aabbb}
Option A fails to realize the word. {b}.
Option B fails to realize the word {b}.
Option c realizes word {b}. {abb}.,{aabbb}.
Option D is in not in greibach
form.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.