546 views
0 votes
0 votes
I m student of MCA.  

(PDA)  plz tell me difference b/w -

a^n b^n | n >=0

or

a^n b^n | n>=1

in my view :-

L={1,11,111,........}  is >=1 condition and

L={€, 1,11,111,.........}  is >=0 condition.  this is rght or wrong.

 

 

plz tell me  difference  with pda transition

1 Answer

0 votes
0 votes
(a^n b​^n | n>=1)

 

transition :

 

(q0,a,Z0)=(q1,XZ0)

 

(q1, a, X) =(q1,XX)

 

(q1,b,X)=(q2,€)

 

(q2,b,X)=(q2,€)

 

(q2, €, Z0)=(q3,€)

 

accepted by the final state.

 

 

 

(a^n b^n | n >=0)

 

transition :

 

(q0,€,Z0)=(q3,€)

 

(q0,a,Z0)=(q1,XZ0)

 

(q1,a,X)=(q1,XX)

 

(q1,b,X)=(q2,€)

 

(q2,b,X)=(q2,€)

 

(q2,€,Z0)=(q3,€)

 

accepted by the final state.

Related questions

1 votes
1 votes
0 answers
2
alexmurugan asked Nov 3, 2023
334 views
Design the Push down Automata for the language L={anbmc2nd3m,n,m>=1}.Check the acceptance string by both the empty stack and final state method.
1 votes
1 votes
1 answer
3
0 votes
0 votes
0 answers
4
moe12leb asked Jan 21, 2023
241 views
i need to construct PDA for L = {a^m b^n: m>= n-5}L = {w belongs to {a,b}*: w has twice as many a’s as b’s}