A = {Q, ∑, Γ, δ, q0, z0, F} where
Q = {q0, q1, q2, q3, q4} = set of states
∑ = {a, b, c} = input alphabet
Γ = {a, b, c, z0} = stack alphabet
F = {q4}
The PDA should accept input strings with symbols a, b and c where number of a’s is twice that of c’s.
The transition function δ is
δ(q0, c, z0) = {(q1, az0)}
δ(q1, c, c) = {(q1, cc)}
δ(q1, a, c) = {(q2, c)}
δ(q2, a, c) = {(q3, λ)}
δ(q3, a, c) = {(q2, c)}
δ(q2, b, c) = {(q3, λ)}
δ(q3, λ, z0) = {(q4, z0)}
Consider an input string aaaacc, the transitions are
δ(q0, c, z0) = {(q1, cz0)}
δ(q1, c, c) = {(q1, cc)}
δ(q1, a, c) = {(q2, c)}
δ(q2, a, c) = {(q3, λ)}
δ(q3, a, c) = {(q2, c)}
δ(q2, a, c) = {(q3, λ)}
δ(q3, λ, z0) = {(q4, z0)}
Since it halts in final state, the string is accepted.