in Theory of Computation edited by
5,483 views
2 votes
2 votes

The pushdown automation $M=(\{q_0, q_1, q_2\}, \{a,b\}, \{0,1\}, \delta, q_0, 0, \{q_0\})$ with

$\delta(q_0,a,0)=\{q_1,10)\}$

$\delta(q_1,a,1)=\{q_1,11)\}$

$\delta(q_0,b,1)=\{q_2,\lambda)\}$

$\delta(q_2,b,1)=\{q_2,\lambda)\}$

$\delta(q_2,\lambda,0)=\{q_0,\lambda)\}$

Accepts the language

  1. $L=\{a^nb^m \mid n,m \geq 0\}$
  2. $L=\{a^nb^n \mid n \geq 0\}$
  3. $L=\{a^nb^m \mid n,m > 0\}$
  4. $L=\{a^nb^n \mid n > 0\}$
in Theory of Computation edited by
5.5k views

2 Answers

5 votes
5 votes

This PDA clearly accepts ab , as its language

But as we see that there is a production from Q2 to Q0 makes the input string halt on Q0 , so our final state will be Q0 .

So it will accept empty strings .

Hence , answer B).

by

4 Comments

i think 0 in this machine works similar to Z0 , what we generally take as default symbol on stack.

0
0
D should be ans... Since there is no epsilon transition on initial state...
0
0
δ(q0,b,1)={q2,λ)}δ(q0,b,1)={q2,λ)}

some typo , it should be q1 instead of q0.

@gabbar is right.
2
2
0 votes
0 votes
 
 
 
 

This PDA clearly accepts a^nb^n , as its language.

Also there is a production from Q2 to Q0 state that doesn’t read any input and makes stack empty.

So it is PDA where acceptance is by empty stack.

As Acceptance is not by final state, also there are no productions to accept empty string

So, empty strings are not accepted.

Hence , answer D).

Related questions