第四章:可判定性

4 Decidability

关于其他章节的内容,请点这:《计算理论导引》学习笔记

4.1 Decidable Languages

几个可判定的语言

acceptance problem for DFA

the acceptane problem for DFAs of testing whether a particular deterministic finite automaton accepts a given string can be expressed as a language\( A_{DFA}\).

\( A_{DFA} = \{\langle B,w \rangle | \text{ B is a DFA that accepts input string w}\}\).

The problem of testing whether a DFA B accepts an input w is the same as the problem of testing whether is a member of the language \( A_{DFA}\).

We simply need to present a TM M that decides \( A_{DFA}\).

M = “on input , where B is a DFA and w is string:

1. Simulate B on input w.

2. If the simulation ends in an accept state, accept. If it ends in a nonaccepting state, reject.”

acceptance problem for NFA

\( A_{NFA} = \{\langle B,w \rangle | \text{ B is a NFA that accepts input string w}\}\).

N = “on input , where B is a NFA and w is string:

1. Convert NFA B to an equivalent DFA C.

2. Run TM M on input .

2. If M accepts, accept; otherwise, reject.”

acceptance problem for REX

\( A_{REX} = \{\langle B,w \rangle | \text{ B is a regular expression that generates string w}\}\).

P = “On input , where R is a regular expression and w is a string:

1. Convert regular expression R to an equivalent NFA A.

2. Run TM N on input .

3. If N accepts, accept; if N rejects, reject.”

emptiness testing for DFA

\( E_{DFA} = \{\langle A \rangle | \text{ A is a DFA and } L(A) = \emptyset\}\).

T = “On input , where A is a DFA:

1. Mark the start state of A.

2. Repeat until no new states get marked:

3. Mark any state that has a transition coming ino it from any state that is already marked.

4. If no accept state is marked, accept; otherwise, reject.”

whether two DFAs recognize the same language

\( EQ_{DFA} = \{\langle A,B \rangle | \text{ A and B are DFA and } L(A) = L(B)\}\).

\( L(C) = (L(A) \cap \overline{L(B)}) \cup (\overline{L(A)} \cap L(B))\).

We can construct C form A and B with the sonstructions for proving the class of regular languages closed under complementation, union, and intersection.

\( L(C) = \emptyset \iff L(A) = L(B)\).

F = “On input , where A and B are DFAs:

1. Condtruct DFA C as described.

2. Run TM T on input .

3. If T accepts, accept. If T rejects, reject.”

acceptance problem for CFG

\( A_{CFG} = \{\langle G,w \rangle\} | \text{ G is a CFG that generates string w }\}\).

直接枚举会得到recognizer而不是decider

If G were in Chomsky normal form, any derivation of w has 2n-1 steps, where n is the length of w.

In that case, checking only derivations with 2n-1 steps to determine whether G generates w would be sufficient.

S = “on input , where G is a CFG and w is a string:

1. Convert G to an equivalent grammar in Chomsky normal form.

2. List all derivations with 2n-1 steps, where n is the length of w; except if n = 0, then instead list all derivations with one step.

3. If any of these deravation generate w, accept; if not, reject.”

emptiness testing for CFG

\( E_{CFG} = \{\langle G \rangle | \text{ G is a CFG and } L(G) = \emptyset\}\).

转化为可达性问题,目的地是terminal symbols,起点是start variable

R = “On input , where G is a CFG:

1. Mark all terminal symbols in G.

2. Repeat until no new variables get marked:

3. Mark any variable A where G has a rule \( A \longrightarrow U_1U_2\dots U_k\) and each symbol \( U_1,\dots,U_k\) has already been marked.

4. If the start variable is not marked, accept; otherwise, reject.

whether two CFGs generate the same language

\( EQ_{CFG} = \{\langle G,H \rangle | \text{ G and H are CFGs and } L(G) = L(H)\}\).

在这里,\( EQ_{DFA}\)的套路用不了了

因为,The class of context-free languages is not closed under complementation or intersection.(Exercise 2.2)

事实上,这是不可判定的

计算机理论导引第三版答案第四章,《计算理论导引》第四章:可判定性-学习笔记 | 诟屍...相关推荐

  1. 计算理论导引第三版答案

    最近在学这本书,无奈课后习题很多,答案又找不到,没想到在github上找到了 直接上链接 https://github.com/gaurangsaini/sipser-computation-3rd- ...

  2. 新编剑桥商务英语初级第三版 答案

    需要  新编剑桥商务英语初级第三版 答案  的CSDN朋友来找我  保证是正确的.

  3. 计算机文化基础案例教程第三版答案,计算机文化基础案例教程教学课件作者第3版谭宁教学课件素材排骨做法.doc...

    计算机文化基础案例教程教学课件作者第3版谭宁教学课件素材排骨做法.doc (3页) 本资源提供全文预览,点击全文预览即可全文预览,如果喜欢文档就下载吧,查找使用更方便哦! 9.90 积分 1.香酥排 ...

  4. 计算机文化基础第三版龙天才课后答案,龙天才

    <PhotoshopCS5图形图像处理(计算机平面设计专业)>是计算机平面设计专业系列教材,从认识PhotoshopCS5入手,通过使用PhotoshopCS5进行平面图像处理和设计,全面 ...

  5. c语言程序设计教程第三版答案9.5,C语言程序设计-第5-9章习题解答.ppt

    C语言程序设计-第5-9章习题解答 华中科技大学计算机学院 C语言程序设计 第5-9章 部分习题解答 作业中问题较多的习题 第5章5.4(2) 第6章6.1,6.3,6.5(6),6.8 第7章无 第 ...

  6. 字节三面:小伙子你先跟我说一说红黑树吧,java程序设计教程雍俊海第三版答案

    来看234树的添加操作 添加如果出现需要分裂的情况,分裂出的元素首先进行和父级合并,如果父级已经是4节点那么将父级分裂,递归操作 234树的生长全部都是从叶子节点进行生长的,从叶子节点进行分裂向上延伸 ...

  7. java语言程序设计教程第三版答案,看完跪了

    01 如何理解高并发? 高并发意味着大流量,需要运用技术手段抵抗流量的冲击,这些手段好比操作流量,能让流量更平稳地被系统所处理,带给用户更好的体验. 我们常见的高并发场景有:淘宝的双11.春运时的抢票 ...

  8. 西安三本哪个计算机学校最好,西安三本大学前十名, 西北大学现代学院仅第四...

    导语:2018西安共有多少所三本院校,排名前十的分别有哪些?排行榜网123小编为大家整合了西安三本大学前十名排行榜,供大家参考. 西安三本大学排名 NO.1西安交通大学城市学院 NO.2西安建筑科技大 ...

  9. c语言程序设计夏宽理第三版答案,(100)西南大学2021计算机考研数据速览(特别更新版),民族脊梁袁隆平院士的母校!...

    结合录取名单,更新版区分了各专业录取考生初试成绩. 计算机与信息科学学院.人工智能学院各专业复试录取数据如下: 初试及复试科目如下: 808计算机专业基础综合 : 主要涉及操作系统与数据结构的相关内容 ...

最新文章

  1. 干货丨从概念到案例:初学者须知的十大机器学习算法
  2. C#的ARRAYLIST 和HASHTABLE示例代码
  3. Python语言程序设计之urllib.request抓取页面,网易公开课之《麻省理工学院公开课:算法导论》
  4. 响应接收窗口大小( ra-ResponseWindowSize)
  5. 一个报文的路由器之旅_报文的交换和寻址转发
  6. [postgresql] postgresql 安装
  7. Spring Cloud 云架构下的微服务架构:部门微服务(Dept)
  8. 骑车与走路(信息学奥赛一本通-T1050)
  9. eclipse生成boolean型变量的getter是is开头
  10. 请问,怎么在DBGRID中改变CELL内容
  11. ES6学习笔记第一章
  12. 信号与系统 第一章 信号与系统概述 思维导图
  13. 物联网项目设计(一) 需求分析与概要设计
  14. 微服务使用模块化时候导入公共模块导致maven更新依赖错误问题
  15. Vue项目引入移动端组件库--Mand Mobile
  16. 2018年度10大新兴技术:人工智能、量子计算、增强现实等
  17. 一名优秀的测试工程师需要具备哪些技能?
  18. 知识图谱技术发展详解(一)
  19. 【转载】网页尺寸规范
  20. Zemax光学设计(四)——几何像差

热门文章

  1. 20230107报警器的测试
  2. 镜头像差之一——球差
  3. 国际短信群发有哪些优势?
  4. Unifying Offline and Online Multi-graph Matching via Finding Shortest Paths on Supergraph
  5. lammps教程:薄膜渗透模拟(3)--不同孔隙率对过滤效果的影响
  6. Java~通讯录系统
  7. 内衣市场新变局,都市丽人的“不破不立”
  8. pathlib库使用手册
  9. 66.android 导入项目报错Error:Execution failed for task ':app:validateDebugSigning'. Keystore file F:\myA
  10. data from cuda to cpu