简体   繁体   English

确定性有限自动机的理论方法

[英]Theoretical Approach for Deterministic Finite Automata

Let L be a language accepted by a DFA. 令L为DFA接受的语言。 Let L ́ be the language obtained by deleting the last symbol of every string of L. Find out if it is possible to construct a DFA accepting L ́. 假设Ĺ是通过删除L的每个字符串的最后一个符号而获得的语言。找出是否有可能构造一个接受Ĺ的DFA。

How to approach this particular problem ? 如何解决这个特定问题?

A probable solution can be (my approach) by making just the preceding state of the final state as the final state and omit the old final states. 通过将最终状态的先前状态仅作为最终状态并忽略旧的最终状态,可能的解决方案是(我的方法)。 Is it correct ?? 这是正确的吗 ??

Your approach has 2 problems: there is not a unique preceding state, there can be a lot and if you make them final (if they aren't) you are most of the time perturbating the initial language and adding some extra words to it. 您的方法有两个问题:没有唯一的先行状态,可能有很多 ,如果将它们定为最终状态(如果不是最终状态),则大多数时候会干扰初始语言并在其中添加一些额外的单词。 But you're on the right track. 但是您走在正确的轨道上。 The solution is to remove the last state, and add a new final state with epsilon-transitions from all preceding states to the new final state. 解决方案是删除最后一个状态,并通过从所有先前状态到新的最终状态的epsilon过渡添加新的最终状态。

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

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