S->AC|CB
Here A dervies the language a+ (i.e a,aa,aaa,.....)
///ly B derives b+ (i.e b,bb,bbb,.....)
C derives a^n b^n
C Ranges from (Epsilon,ab,aabb,aaabbb,....)
Now there are 2 cases
1)l>m
2)l<m
case-1) l>m (we should generate a^l b^m and l>m)
To generate this you can derive m no of a,b's using C
Therefore we now gets a^m b^m
and given l>m for this case least no of steps to have this is 1 step i.e derive A-->a(So that least value for l which is greater than m is l+1)
Therfore S-->AC derivation takes 1 step
And now to derive m a's and b's we need m+1 steps (considering epsilon at the lowest level)
For no of a's to be greater than b's we should have one more derivation i.e A-->a (1step)
Total no of steps are (m+1)+1+1
Now least value of l = (m+1) for l>m
therfore minimum no of steps required are l+2
case-2)
similarly derive s-->CB which takes 1 step
now derive l no of a's and b's (which takes l+1 steps)
and to have m>l we derive one more b i.eB-->b
Therefore (l+1)+1+1
least value for m to be greater than l is l+1
i.e m=l+1
thefore m+2 steps
Now it depends on max(l,m) as you can see if l>m then (l+2) steps are required
Else (m+2) steps..
Option A) is correct