LanguagesandFiniteAutomata.pptVIP

  • 1
  • 0
  • 约6.74千字
  • 约 43页
  • 2017-01-12 发布于天津
  • 举报
LanguagesandFiniteAutomata

在w=xyz对应的DFA的walk中,子串y对应的部分有相同的开始和结束状态q * 由于q是第一个重复状态,在xy里面没有重复的状态,那么串xy包含的状态最多有m+1个,而m+1个状态可表示的串为m个字符长度 * 子串y的长度大于等于1,因为至少有一个转换 * * The Pumping Lemma: Given a infinite regular language there exists an integer for any string with length we can write with and such that: (critical length) In our textbook: Critical length = Pumping length Application Observation: Every language of finite size has to be regular Therefore, every non-regular language has to be of infinite size (contains an infinite number of strings) (we can easily construct an NFA that accepts every string in the language) Suppose you want to prove that an infinite language is not regular 1. Assume the opposite: is regular 2. The pumping lemma should hold for 3. Use the pumping lemma to obtain a contradiction 4. Therefore, is not regular Explanation of Step 3: How to get a contradiction 2. Choose a particular string which satisfies the length condition 3. Write 4. Show that for some 5. This gives a contradiction, since from pumping lemma 1. Let be the critical length for Theorem: The language is not regular Proof: Use the Pumping Lemma Example of Pumping Lemma application Assume for contradiction that is a regular language Since is infinite we can apply the Pumping Lemma Let be the critical length for Pick a string such that: and length We pick with lengths From the Pumping Lemma: we can write Thus: From the Pumping Lemma: Thus: Thus: BUT: CONTRADICTION!!! We get that Our assumption that is a regular language is not true Conclusion: is not a regular language Therefore: END OF PROOF Review Non-regular languages The Pigeonhole Principle Pumping lemma Applications of the Pumping Lemma 非正则语言 鸽巢原理 泵引理 泵引理的应用 * 如何证明一个语言L不是正则的? 证明没有DFA或NFA或正则表达式可以接受语言L 困难:有无穷多的DFA/NFA/RE,不好证明 解决办法:泵引理 * 在介绍泵引理前,先介绍鸽巢原理 * 鸽巢原理:有四只鸽子要放到3个鸽巢内,至少有一个鸽巢内有超过一只鸽子

文档评论(0)

1亿VIP精品文档

相关文档