- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
计算模型 计算机算法设计与分析(第3版) 教学课件
Fall 2003 Costas Busch - RPI 计算模型 随机存取机RAM 图灵机 图灵机模型与RAM模型的关系 随机存取机RAM 1. RAM的结构 随机存取机RAM 2. RAM程序 随机存取机RAM 3. RAM程序的耗费标准 图灵机 1. 多带图灵机 图灵机 k带图灵机可形式化地描述为一个7元组(Q,T,I,δ,b,q0,qf),其中: (1)Q是有限个状态的集合。 (2)T是有限个带符号的集合。 (3)I是输入符号的集合,I?T。(4)b是惟一的空白符,b∈T-I。 (5)q0是初始状态。 (6)qf是终止(或接受)状态。 (7)δ是移动函数。它是从Q?Tk的某一子集映射到Q? (T?{L,R,S})k的函数。 图灵机 A Turing Machine The Tape The Input String States Transitions Determinism Partial Transition Function Halting Final States Acceptance Turing Machine Example Infinite Loop Example Another Turing Machine Example Formal Definitionsfor Turing Machines Configuration The Accepted Language Standard Turing Machine Computing FunctionswithTuring Machines Example Another Example Another Example Combining Turing Machines Equivalent notation: Initial configuration: Input string For any Turing Machine Initial state Final state Deterministic Infinite tape in both directions Tape is the input/output file The machine we described is the standard: A function Domain: Result Region: has: A function may have many parameters: Example: Addition function Integer Domain Unary: Binary: Decimal: 11111 101 5 We prefer unary representation: easier to manipulate with Turing machines Definition: A function is computable if there is a Turing Machine such that: Initial configuration Final configuration Domain final state initial state For all Initial Configuration Final Configuration A function is computable if there is a Turing Machine such that: In other words: Domain For all The function is computable Turing Machine: Input string: unary Output string: unary are integers Start initial state The 0 is the delimiter that separates the two numbers Start Finish final state initial state Finish final state The 0 helps when we use the result for other operations Turing machine for function Execution Example: Time 0 Final Result (2) (2) Time 0 Time 1 Time 2 Time 4 Halt Accept Rejection Example Time 0 Time 1 No poss
文档评论(0)