0

I am trying to understand how PDA works. In the following diagram I understand how transition functions work and how the stack must be updated. But The only question I have is Why the Start state is an accept state as well? while the PDA is for L = {on1n | n ≥ 0}, means it must not accept an empty string. Can some one explain the reason for making the start to be accept state, please?

enter image description here

Lucy
  • 471
  • 4
  • 12
  • 28

2 Answers2

0

L = {0n1n | n ≥ 0}

When n=0, the string is:

0010 = zero 0's followed by zero 1's which is the empty string. So according to the definition, the language L does include the empty string.

If it were to not accept the empty string, the definition would be:

L = {0n1n | n > 0}

uba
  • 2,012
  • 18
  • 21
0

Because the NFA accepts empty strings

Joshua Swain
  • 571
  • 2
  • 4
  • 22