从给定语言构建 npda|如何
我对字母表有以下语言 {1,0} L = {w | w 的每个前缀的 1 不超过 0}
如何我如何从 G 构造一个 NPDA M 使得 L(M) = L(G)? 或者 为了进行这种转换,可以推荐任何网页吗?
I have following language over the alphabet {1,0}
L = {w | every prefix of w has no more 1's than 0's}
How can I construct an NPDA M from G such that L(M) = L(G)?
Or
To do that conversion, can one recommend any webpage?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一般来说,构建语言的 NPDA 的方法只是找到语法,因为 CFG 和 NPDA 之间的映射相当简单。
这种语言的 CFG(上下文无关语法)就像
一旦你有了上下文无关语法,构建它的 NPDA 应该相对简单;)
顺便说一句,你在上面的帖子中没有提到 G 是什么,所以我假设您想要解释如何为所描述的语言构建 NPDA。如果您还有其他意思,请告诉我,我会更新我的解释。
In general, the way to construct an NPDA for languages is just to find the grammar since the mapping between a CFG and NPDAs is rather simple.
The CFG (Context free grammar) for such a language would be something like
Once you have a context free grammar, building a NPDA of it should be relativly simple ;)
btw, You have not mentioned what is G in your above post so I assumed you wanted an explanation of how to construct an NPDA for the described language. If you meant something else, tell me and I'll update me explanation.