What would be the PDA (pushdown automata) of the language a^mb^n where n<m

546 Views Asked by At

How would be the pushdown automata for the given language a to the power m b to the power n where n is smaller than m a^m b^n / n

1

There are 1 best solutions below

0
On

[Let PDA is P:-(Q={q_0,q_1,q_2},={a,b},Δ,q_0,Z,F={q_2}) where Q=finite set of states. Δ=transition function Z=stack start symbol F=set of final states Transitions are //push a on stack 1. Δ(q_0,a,Z)=(q_0,aZ) 2. Δ(q_0,a,a)=(q_0,aa) //pop a for every b symbol encountered 3. Δ(q_0,b,a)=(q_1,ϵ) 4. Δ(q_1,b,a)=(q_1,ϵ) //when string is empty and 'a' symbol is still left on stack reach final state 5. Δ(q_1,ϵ,a)=(q_2,a)]