-
In the correct grammar above, what is the length of the derivation (number of steps starting from S) to generate the string albm with l ≠ m?
-
- max (l, m) + 2
- l + m + 2
- l + m + 3
- max (l, m) + 3
- max (l, m) + 2
Correct Option: A
It is very clear from the previous solution that the no. of steps required depend upon the no. of a' s & b ' s which ever is higher & exceeds by 2 due to S " AC CB & C"!
So max(l, m) + 2
Hence (a) is correct option.