简体   繁体   English

下推式自动计算

[英]Push Down Automanton-Computation

I am trying to understand how PDA works. 我试图了解PDA的工作原理。 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 | 而PDA为L = {on1n | n ≥ 0}, means it must not accept an empty string. n≥0},表示它不能接受空字符串。 Can some one explain the reason for making the start to be accept state, please? 请问有人能说明开始接受状态的原因吗?

在此处输入图片说明

L = {0 n 1 n | L = {0 n 1 n | n ≥ 0} n≥0}

When n=0, the string is: 当n = 0时,字符串为:

0 0 1 0 = zero 0's followed by zero 1's which is the empty string. 0 0 1 0 =零0,后跟零1,即空字符串。 So according to the definition, the language L does include the empty string. 因此,根据定义,语言L确实包含空字符串。

If it were to not accept the empty string, the definition would be: 如果不接受空字符串,则定义为:

L = {0 n 1 n | L = {0 n 1 n | n > 0} n> 0}

因为NFA接受空字符串

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

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