# What kind of words does this PDA accepts

I have a PDA A = ({q0, q1}, Σ = {a, b}, Γ = {a}, δ, F = {q1}), with these transition functions δ:

((q0,a,ε),(q0,a));

((q0,b,ε),(q0,a));

((q0,a,ε),(q1,ε));

((q1,a,a),(q1,ε));

((q1,b,a),(q1,ε)).

The exercise asks me to explain the structure of the words accepted. I have designed the PDA but i'm having problems understanding what kind of words the PDA accepts. Any kind of help is really appreciated.

• I think it accepts all words with length bigger than $1$. This is probably not what you wanted this PDA to do... Commented Oct 31, 2021 at 14:40
• This PDA is given to me by the exercise, i have to design it and explain what kind of words it accepts
– rsky
Commented Oct 31, 2021 at 15:17

The loops around $$q_0$$ add one stack symbol for each input letter that is read. After this, the third transition reads an $$a$$ without touching the stack. Finally, all transitions around $$q_1$$ remove one stack symbol for each input letter that is read.
To reach an empty stack in $$q_1$$, the number of loops around it has to be the same as around $$q_0$$. Exactly in the middle there is one $$a$$ that takes you from $$q_0$$ to $$q_1$$. Thus the language would be $$\{w_1\cdot a \cdot w_2: |w_1| = |w_2|\}.$$