6,626 views
0 votes
0 votes

Consider PDA = M = ({q0, q1}, {a, b}, {a, z0}, δ, q0, z0, φ) which accepts by empty stack
δ: (q0, a, z0) = (q0, az0)
(q0, a, a) = (q0, aa)
(q0, b, a) = (q1, a)

(q1, b, a) = (q1, a)
(q1, a, a) = (q1, ε)
(q1, ε, z0) = (q1, ε)
Which one of the following strings is accepted by the above PDA?
(s1) aaa
(s2) aabbaa
(s3) aba
(s4) aaab


(a) Only s2, s3 and s4 (b) Only s1
(c) Only s2 and s3 (d) Only s2

Solution: Option (c)
Explanation:
The transitions given corresponds to the language ={/ >0,>0}

how ? in transition 4th line (q1, b, a) = (q1, a) we dont perform pop operation for a then how is explanation correcT?

1 Answer

1 votes
1 votes

Given PDA accepts lang = {a^n b+ a^n}

We do not perform POP operation (q1, b, a) = (q1, a) , we just bypassing "b"

only S2 and S3 are accepted by given PDA.

Related questions

0 votes
0 votes
1 answer
1
7 votes
7 votes
4 answers
2
Pranav Madhani asked Nov 19, 2017
3,447 views
Determine the minimum height of parse tree in CNF for terminal string of length w, which is constructed by using CFG G(a) log2|w|+1 (b) log2|w|(c) log2|w|−1 (d) None of...
0 votes
0 votes
1 answer
4
Pranav Madhani asked Nov 17, 2017
861 views
Consider this grammar:S → SS | aHow many derivation trees are possible for a4?(a) 3 (b) 4(c) 5 (d) 6 how to generalize for any values if a^5 or a^7 is there any general...