简体   繁体   English

想知道下推自动机解决方案是否正确

[英]wondering if pushdown automata solution is correct

I have a question that says: 我有一个问题说:

Construct a PDA that accepts the language {a^ib^j | 构造一个接受{a ^ ib ^ j |语言的PDA。 0 <= i <= 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: 但据我了解,可能的输入字符串将以b开头,因为i可以为0且a ^ i可以为1,而j可以为1而b ^ j可以为b,这并不意味着应该有一行说的是:

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

or am I misunderstanding something? 还是我误会了什么?

Yes, you are right. 是的,你是对的。

Actually the above PDA accepts {a^ib^j | 实际上,上述PDA接受{a ^ ib ^ j | 1 <= i <= j} 1 <= i <= j}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM