PDA for the given CFG is
consider ^ to be epsilon
ip: (a, Z0 -> XXZ0 ) | (a, X -> XXX)
|
--------->( s ) ---- ip: (^, Z0 -> ^ ) ------------------>( ( f ) )
| ^
| |
| ip: ( b, X -> ^ ) | ip: ( ^, Z0 -> ^)
| |
v |
( t ) ---- ip:( c, X -> ^ ) ------------------> ( u )
^ ^
| |
ip: b, X -> ^ ip: c, X -> ^
Strings that are accepted are { ^ , abc , aabbbc , aabccc , aabbcc ,...............}
For a string S = aabccc
Stack = [Z0 ] ( Initial State )
i) For ip = a
Stack = [ Z0 ] ==> pop 'Z0' and add 'XXZ0' to the stack.
Stack = [ X , X , Z0]
Transition : S --> S.
ii) For ip = a
Stack = [ X , X , Z0 ] ==> pop 'X' and add 'XXX' to the stack.
Stack = [ X , X , X , X , Z0 ]
Transition : S --> S.
iii) For ip = b
Stack = [ X , X , X , X , Z0 ] ==> pop 'X' and add nothing to the stack.
Stack = [ X , X , X , Z0]
Transition : S --> t.
iv) For ip = c
Stack = [ X , X , X , Z0 ] ==> pop 'X' and add nothing to the stack.
Stack = [ X , X , Z0 ]
Transition : t --> u.
v) For ip = c
Stack = [ X , X , Zo ] ==> pop 'X' and add nothing to the stack.
Stack = [ X , X , Z0 ]
Transition : u --> u.
vi) For ip = c
Stack = [ X , Zo ] ==> pop 'X' and add nothing to the stack.
Stack = [ Z0 ]
Transition : u --> u.
vii) For ip = ^
Stack = [ Zo ] ==> pop 'Z0' and add nothing to the stack.
Stack = [ ]
Transition : u --> f.
As the stack is empty and also we reached the final state 'f' the string is accepted.
S = a**2 b**1 c**3
l = 2
m = 1
n = 3
==> 2l = m+n
2(2) = 1+3
Therefore option C is correct.