The Gateway to Computer Science Excellence

0 votes

The pushdown automata $M=\left \{ \left ( q_{0},q_{1},q_{2} \right ),\left ( a,b \right ) ,\left ( 0,1 \right ),\partial ,q_{0},0,\left \{ q_{0} \right \}\right \}$

$\partial \left ( q_{0},a,0 \right )=\left ( q_{1},10 \right )$

$\partial \left ( q_{1},a,1 \right )=\left ( q_{1},11 \right )$

$\partial \left ( q_{1},b,1 \right )=\left ( q_{2},\lambda \right )$

$\partial \left ( q_{2},b,1 \right )=\left ( q_{2},\lambda \right )$

$\partial \left ( q_{2},\lambda ,0 \right )=\left ( q_{0},\lambda \right )$

Accepts language

$l=\left \{ a^{n}b^{n}\mid n\geq 0\right \}$

$l=\left \{ a^{n}b^{n}\mid n> 0\right \}$

Please tell me with these two options which one is correct? I think here $q_{2}$ is accepting state , not $q_{0}$

As last transition going from $q_{2}$ to $q_{0}$ and not $q_{0}$ to $q_{2}$

Am I right?

0

This is PDA right, and "Set of Final states" has q0 which is also initial state here, so if only these two options are there we don't need to even check anything as it will accept empty string i.e, a^0b^0. So the answer would definitely be the first one

- All categories
- General Aptitude 1.8k
- Engineering Mathematics 7.4k
- Digital Logic 2.9k
- Programming and DS 4.9k
- Algorithms 4.4k
- Theory of Computation 6.2k
- Compiler Design 2.1k
- Databases 4.1k
- CO and Architecture 3.4k
- Computer Networks 4.1k
- Non GATE 1.4k
- Others 1.7k
- Admissions 595
- Exam Queries 576
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 17

50,666 questions

56,159 answers

193,768 comments

93,766 users