HELP What language is accepted by the following PDA Q q0 q1

HELP!

What language is accepted by the following PDA Q = (q0; q1; q2}; sigma ={a; b}; Stack symbols {a; b; z}; starting state q0; final state q2; initially on the stack z, with transitions delta(q0; a; z) = {(q1; a); (q2; lambda)}; delta(q1;b; a) = ((q1;b)}; delta(q1;b; b) = {(q1; b)}; delta(q1;a; b) = {(q2; lambda)}; In the following is given a transition table for a PDA with initial state q0 and accepting state q2. Describe the language accepted by the PDA

Solution

1. Initially in first transition, in state q0 a came with z as topmost element, then changed to state q1 with a pushing into stack, or going to final state q2. That means ‘a’ is compulsory at first in the language, then number of b’s may come with ‘a’ and ‘b’ as top of stack. (In second and 3rd transitions). In the last transition after ‘a’ is encountered with b as top of stack, then send to final state. So ‘a’ at starting and end, in between number of b’s.

L={abna|n>=1}

2. In first and second transition if a/b comes with top of the stack as z0, then push x into stack. And then if any number of ‘a’ and encounters push x into stack, until c encounters. When is encountered then do nothing and change the state. And coming to q1 state if ‘a’/’b’ then pop. When the string is over then stack should be empty, then accepted and sent to q2. So if a/b pushed into stacked, then c and again a/b popped. So the length is important than what had encountered.

L={AcB}where A and B are strings of equal length}

HELP! What language is accepted by the following PDA Q = (q0; q1; q2}; sigma ={a; b}; Stack symbols {a; b; z}; starting state q0; final state q2; initially on t

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site