形式语言与自动机
2019-12-11 本文已影响0人
丿inane丶
文法
【考点】由文法推出语言
![](https://img.haomeiwen.com/i2487174/a63b9163a6e98151.png)
Q:为什么结果中会有n次幂出现?
A:因为有些推导是可以重复n次的,如2,4步。
![](https://img.haomeiwen.com/i2487174/8438f9405ee90f2f.png)
【考点】构造语言的文法
![](https://img.haomeiwen.com/i2487174/be3b78a2837cfa5e.png)
题目:
![](https://img.haomeiwen.com/i2487174/74dbfb73e3849dcf.png)
![](https://img.haomeiwen.com/i2487174/e2f0dd303800162b.png)
DFA
【考点】已知DFA,画转态转移图,并指出其接收的语言
![](https://img.haomeiwen.com/i2487174/36a22094705ad254.png)
![](https://img.haomeiwen.com/i2487174/7d632ba8222f3dfc.png)
先把所有可能的情况列出来,即为各种状态。
【考点】设计DFA使其接受且仅接受给定的语言L.
![](https://img.haomeiwen.com/i2487174/686c1ed107ed89ee.png)
![](https://img.haomeiwen.com/i2487174/428b04255922660e.png)
两个DFA的笛卡尔积
![](https://img.haomeiwen.com/i2487174/7581cf7e97ae5035.png)
字符串匹配
【题】构造一个DFA,在文本中查找字符串boy或book。
![](https://img.haomeiwen.com/i2487174/db85730e599d7770.png)
下推自动机
瞬时描述
![](https://img.haomeiwen.com/i2487174/615d0f86bb00ff57.png)
![](https://img.haomeiwen.com/i2487174/cd4f830edfbe28f1.png)
图灵机
![](https://img.haomeiwen.com/i2487174/66880d318ddace6f.png)
![](https://img.haomeiwen.com/i2487174/0a6a7e50823f9161.png)