Question

What language is accepted by the following PDA? Z is the bottom of stack marker and p is the start state. 8 (p. 2, Z) = (p, E
0 0
Add a comment Improve this question Transcribed image text
Answer #1

PDA:

There are two types of PDA

1.       Accept with final state

2.       Accept on empty stack

As no final state is mentioned, given automata is Accept on empty stack.

PDA uses stack to accept any string in the language.

Supports 3 operations:

Push: inserting symbol into stack

3rd transition, (S,AZ) is push operation

Pop: deleting top symbol of stack

1st,2nd and 4th   operations, (p,e) is pop operation

Skip: don’t do any operation on stack.

States: {P,S}

Start state: {p}

Stack alphabet: {Z}

1st transition:

P on seeing input symbol 2 and stack symbol Z, it goes to same state by doing pop operation.

If do again pop operation, top symbol still Z only.

2nd  transition:

P on seeing input symbol e and stack symbol A, it goes to same state by doing pop operation.

If do again pop operation, top symbol still Z only.

3rd  transition:

P on seeing input symbol 0 and stack symbol Z, it goes to state S by doing push operation with A.

A

Stack looks like this.

4th transition:

S on seeing input symbol 1 and stack symbol A, it goes to state S by doing pop operation.

Z

Stack looks like this. It is empty

PDA diagram:

2, Z,G 1 O, Z, AZ u (2, Z,E) Means Symbol 2, when stack Symbol 2, pop the top 1, A, E E.A,E Symbol of Stack.

Here, we can observe that if string contains 1 then 0 should be followed always.

2 can taken any number of times.

Epsilon is not accepted as no transition for empty symbol on stack symbol Z.

Hence, this PDA accepts Language L= { (01+2)m | where m>0 }

Add a comment
Know the answer?
Add Answer to:
What language is accepted by the following PDA? Z is the bottom of stack marker and...
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
  • QUESTION 4 What language does this final state PDA accept? / Is the start stack symbol...

    QUESTION 4 What language does this final state PDA accept? / Is the start stack symbol and F is the final state) (S.a.X.nop,S) (S,b,X,nop,F) OO None of the choices O ab O aab ab QUESTION 5 Below is an empty stack PDA (X is the start stack symbol. O is the start state) with three transition rules: Rule1: (0,a.X.push(0,0) Rule2: (0,,X.pop,1) Rule3: (1.b.X.pop.1) Which of the following sequence of PDA transitions show that the string ab is valid ? Rulei,...

  • Give a PDA (Pushdown Automata) that recognizes the language L = {σ ∈ {x, y, z}...

    Give a PDA (Pushdown Automata) that recognizes the language L = {σ ∈ {x, y, z} ∗ | 2|σ|x = |σ|y ∨ 2|σ|y = |σ|z} You can choose whether your PDA accepts by empty stack or final state, but make sure you clearly note, which acceptance is assumed.

  • 2. [10 marks] Give a PDA (Pushdown Automata) that recognizes the language L = {o€ {n,y,...

    2. [10 marks] Give a PDA (Pushdown Automata) that recognizes the language L = {o€ {n,y, z}* | 2|이|z = |0ly V 2\이 You can choose whether your PDA accepts by empty stack or final state, but make sure you clearly note, which acceptance is assumed 2. [10 marks] Give a PDA (Pushdown Automata) that recognizes the language L = {o€ {n,y, z}* | 2|이|z = |0ly V 2\이 You can choose whether your PDA accepts by empty stack or...

  • 4. Show that the pda constructed in Example 7.6 accepts the strings aabb and aaabbbb, and that bo...

    4. Show that the pda constructed in Example 7.6 accepts the strings aabb and aaabbbb, and that both strings are in the language generated by the given grammar. EXAMPLE 7.6 Construct a pda that accepts the language generated by a grammar with productions We first transform the grammar into Greibach normal form, changing the productions to A bB, The corresponding automaton will have three states (go, 91,92), with initial state go and final state q2. First, the start symbol S...

  • 3. (1 point) Which of the following is true of PDA's? A. The stack of a...

    3. (1 point) Which of the following is true of PDA's? A. The stack of a PDA is unbounded in terms of the numbers of symbols it can store. B. A transition of the form (q, a, 8) = (r,c) corresponds to the PDA transitioning from state q to state s by reading a from the input string, popping nothing from the stack, and pushing r on the stack. Page 2 of 8 C. A transition of the form 8(q,a,s)...

  • [20 points] As an example of a PDA look at the one below that accepts the...

    [20 points] As an example of a PDA look at the one below that accepts the following language (Z is the stack start symbol): {a”br | n >0} U{a}. a, 1; 11 b, 1; a, Z; 12 b, 1 ; 90 q1 q2 1,2; a, Z;À Z: 93 We want to show that the language L below is a CFL by designing the PDA P, defined as P= {{90, 91, 92}, {0, 1}, {x, Z},0,40, 2, {92}}, that accepts it:...

  • 7.1 12) What language is accepted by the pda M = ({q0,q1,q2,q3,q4,q5}, {a,b}, {0,1,z}, , q0,...

    7.1 12) What language is accepted by the pda M = ({q0,q1,q2,q3,q4,q5}, {a,b}, {0,1,z}, , q0, z, {q5}), with (q0,b,z) = {(q1,1z)}, (q1,b,1)= {(q2, 11)}, (q2,a,1)= {(q3, )}, (q3,a,1)= {(q4, )}, (q4,a,z)= {(q4, z), (q5, z)} We were unable to transcribe this imageWe were unable to transcribe this imageWe were unable to transcribe this imageWe were unable to transcribe this imageWe were unable to transcribe this imageWe were unable to transcribe this imageWe were unable to transcribe this imageWe were...

  • That is all that was given. Given the following Turing machine, what is the language accepted?...

    That is all that was given. Given the following Turing machine, what is the language accepted? You may assume qo is the start state. a>R UR

  • 1. (1 point) Which of the following is true? A. Every regular language is a context-free...

    1. (1 point) Which of the following is true? A. Every regular language is a context-free language. B. Every context-free language is a regular language. C. If a language is context-free, then there exists a pushdown automata to recognize it. D. The set of context free languages is strictly larger than the set of regular languages. E. Each of A,C, and D is true. 2. (1 point) The following diagram shows a context free grammar with start variable S and...

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