Question

Design a PDA that accepts the following language:

How can this problem solved?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Problem – Design a non deterministic PDA for accepting the language L = {0n1n | n>=1}, i.e.,

L = {01, 0011, 000111, ......} 

In each of the string, the number of 0’s are followed by equal number of 1’s.

Explanation –
Here, we need to maintain the order of 0’s and 1’s. That is, all the 0’s are are coming first and then all the 1’s are coming. Thus, we need a stack along with the state diagram. The count of 0’s and 1’s is maintained by the stack. We will take 2 stack alphabets:

\Gamma = { 0, z }

Where,
\Gamma = set of all the stack alphabet
z = stack start symbol

Approach used in the construction of PDA –
As we want to design a NPDA, thus every time ‘0’ comes before ‘1’. When ‘0’ comes then push it in stack and if again ‘0’ comes then also push it. After that, when ‘1’ comes then pop one ‘0’ from the stack each time. So, at the end if the stack becomes empty then we can say that the string is accepted by the PDA.

Stack transition functions –

\delta(q0, 0, z) \vdash (q0, 0z)
\delta(q0, 0, 0) \vdash (q0, 00)
\delta(q0, 1, 0) \vdash (q1, \epsilon )
\delta(q1, 1, 0) \vdash (q1, \epsilon )
\delta(q1, \epsilon, z) \vdash (qf, z)     
        

Where, q0 = Initial state
qf = Final state
\epsilon = indicates pop operation

Add a comment
Know the answer?
Add Answer to:
How can this problem solved? Design a PDA that accepts the following language: Design a PDA that accepts the following language:
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT