101k views
0 votes
let ∑ = {a, b}. Write a Context-Free Grammar for the language consisting of strings that have n copies of the letter a followed by n+1 copies of the letter b, where n > 0. i.e. L = {a n b n+1 , n > 0}

1 Answer

0 votes

Answer:

CFG is unambiguous because it is not generating more than one derivation tree for given input string, it is said to be ambiguous when there is more than one derivation tree are there for given input string. See attached picture.

Step-by-step explanation:

See attached picture.

let ∑ = {a, b}. Write a Context-Free Grammar for the language consisting of strings-example-1
User Kishorekumaru
by
2.8k points