This is a problem that I have found from Introduction to automata theory, languages and computation by John Hopcroft and Jeffrey Ullman. PDA P=({q0, q1, q2, q3, f)}, {a, b}, {Z0, A, B}, δ, q0, Z, {f}) has the following rules defining δ:
δ(q0,a,Z)=(q1,AAZ)
δ(q0,b,Z)=(q2,BZ)
δ(q0,∈,Z)=(f,∈)
δ(q1,a,A)=(q1,AAA)
δ(q1,b,A)=(q1,∈)
δ(q1,∈,Z)=(q0,Z)
δ(q2,a,B)=(q3,∈)
δ(q2,b,B)=(q2,BB)
δ(q2,∈,Z)=(q0,Z)
δ(q3,∈,B)=(q2,∈)
δ(q3,∈,Z0)=(q1,AZ)
Note that since each of the sets above has only one choice of move, we have omitted the set brackets from each of the rules.
It has been asked to informally describe L(P). After observing, it seems to me that in case the string started with a, no prefix should contain more b's than twice the number of a's and in the string, number of a's * 2 = number of b's. Am I wrong about this particular description? How can I informally describe the language that the PDA accepts?