Consider the grammar
where $S, P, Q, R$ are non-terminal symbols with $S$ being the start symbol; $b, c, d, e$ are terminal symbols and ‘$\varepsilon$’ is the empty string. This grammar generates strings of the form $b^i, c^j, d^k, e^m$ for some $i, j, k, m \geq 0$.
What is the condition on the values of $i, j, k, m$?
Find the smallest string that has two parse trees.
a. following is the more formal way:
b. bcde contains two parse tree as shown below:
S ->bSe ->bbccddee
S->bSe->bcde [ that smallest string ]
so we can see same number of b , c , d, e is generated.
power of b,c,d,e are respectively i,j,k,m .
so i+k = j+m
Bikram sir i got i=j=k=m
Just follow these steps
1. S- > bSe
2. S- > bSe
3.S- > bSe
4.S -> PQR
5. P-> null
7.Q -> null
8. R- > null
Finally you will get bbbcdeee
which means i=3 , j=1,k=1,m=3 and hence the answer i+k=j+m .