0

I have a question that says:

Construct a PDA that accepts the language {a^i b^j | 0 <= i <= j}

and this is the given solution:

  δ ( q0, a, z ) = ( q0, az )   read a, push a
  δ ( q0, a, a ) = ( q0, aa )
  δ ( q0, b, a ) = ( q1, λ )   read b, pop a
  δ ( q1, b, a ) = ( q1, λ )
  δ ( q1, λ, z ) = ( qf, z )   end of string, stack empty
  δ ( q1, b, z ) = ( q1, z )   check the additional b’s 

but to my understanding a possible input string would start with b, since i could be 0 and a^i could be 1, while j could be 1 and b^j could be b, wouldn't this mean that there should be a line that says:

δ ( q0, b, z ) = ( q1, z ) ?

or am I misunderstanding something?

2316354654
  • 279
  • 2
  • 3
  • 14

1 Answers1

0

Yes, you are right.

Actually the above PDA accepts {a^i b^j | 1 <= i <= j}

Hassan Abbasi
  • 272
  • 1
  • 3