第658行: |
第658行: |
| 有很多方法可以解释为什么图灵机是实际计算机的有用模型: | | 有很多方法可以解释为什么图灵机是实际计算机的有用模型: |
| | | |
− | # Anything a real computer can compute, a Turing machine can also compute. For example: "A Turing machine can simulate any type of subroutine found in programming languages, including recursive procedures and any of the known parameter-passing mechanisms" (Hopcroft and Ullman p. 157). A large enough FSA can also model any real computer, disregarding IO. Thus, a statement about the limitations of Turing machines will also apply to real computers.
| + | 1.Anything a real computer can compute, a Turing machine can also compute. For example: "A Turing machine can simulate any type of subroutine found in programming languages, including recursive procedures and any of the known parameter-passing mechanisms" (Hopcroft and Ullman p. 157). A large enough FSA can also model any real computer, disregarding IO. Thus, a statement about the limitations of Turing machines will also apply to real computers. |
| | | |
| | | |
第664行: |
第664行: |
| | | |
| | | |
− | # The difference lies only with the ability of a Turing machine to manipulate an unbounded amount of data. However, given a finite amount of time, a Turing machine (like a real machine) can only manipulate a finite amount of data.
| + | 2.The difference lies only with the ability of a Turing machine to manipulate an unbounded amount of data. However, given a finite amount of time, a Turing machine (like a real machine) can only manipulate a finite amount of data. |
| | | |
| # 区别只在于图灵机有能力处理无限制的数据量。然而,在有限的时间内,图灵机(像实际的机器)只能操纵处理的数据量。 | | # 区别只在于图灵机有能力处理无限制的数据量。然而,在有限的时间内,图灵机(像实际的机器)只能操纵处理的数据量。 |
| | | |
− | # Like a Turing machine, a real machine can have its storage space enlarged as needed, by acquiring more disks or other storage media.
| + | 3.Like a Turing machine, a real machine can have its storage space enlarged as needed, by acquiring more disks or other storage media. |
| | | |
| # 像图灵机一样,实际的机器可以根据需要,通过获得更多的磁盘或其他存储介质,扩大其存储空间。 | | # 像图灵机一样,实际的机器可以根据需要,通过获得更多的磁盘或其他存储介质,扩大其存储空间。 |
| | | |
− | # Descriptions of real machine programs using simpler abstract models are often much more complex than descriptions using Turing machines. For example, a Turing machine describing an algorithm may have a few hundred states, while the equivalent deterministic finite automaton (DFA) on a given real machine has quadrillions. This makes the DFA representation infeasible to analyze.
| + | 4.Descriptions of real machine programs using simpler abstract models are often much more complex than descriptions using Turing machines. For example, a Turing machine describing an algorithm may have a few hundred states, while the equivalent deterministic finite automaton (DFA) on a given real machine has quadrillions. This makes the DFA representation infeasible to analyze. |
| | | |
| | | |
| # 使用较简单的抽象模型对真机程序的描述往往比使用图灵机的描述要复杂得多。例如,描述算法的图灵机可能有几百个状态,而给定实际机器上的等效确定性有限自动机(deterministic finite automaton,DFA)却有四千亿个状态。这使得DFA的表示方式无法分析。 | | # 使用较简单的抽象模型对真机程序的描述往往比使用图灵机的描述要复杂得多。例如,描述算法的图灵机可能有几百个状态,而给定实际机器上的等效确定性有限自动机(deterministic finite automaton,DFA)却有四千亿个状态。这使得DFA的表示方式无法分析。 |
| | | |
− | # Turing machines describe algorithms independent of how much memory they use. There is a limit to the memory possessed by any current machine, but this limit can rise arbitrarily in time. Turing machines allow us to make statements about algorithms which will (theoretically) hold forever, regardless of advances in ''conventional'' computing machine architecture.
| + | 5.Turing machines describe algorithms independent of how much memory they use. There is a limit to the memory possessed by any current machine, but this limit can rise arbitrarily in time. Turing machines allow us to make statements about algorithms which will (theoretically) hold forever, regardless of advances in ''conventional'' computing machine architecture. |
| | | |
| | | |
| # 图灵机描述的算法与它们使用的内存多少无关。目前任何机器所拥有的内存都有一个极限,但这个极限可以在时间上任意上升。图灵机允许我们对算法做出声明,这些声明(理论上)将永远成立,而不考虑传统计算机架构的进步。 | | # 图灵机描述的算法与它们使用的内存多少无关。目前任何机器所拥有的内存都有一个极限,但这个极限可以在时间上任意上升。图灵机允许我们对算法做出声明,这些声明(理论上)将永远成立,而不考虑传统计算机架构的进步。 |
| | | |
− | # Turing machines simplify the statement of algorithms. Algorithms running on Turing-equivalent abstract machines are usually more general than their counterparts running on real machines, because they have arbitrary-precision data types available and never have to deal with unexpected conditions (including, but not limited to, running [[out of memory]]).
| + | 6.Turing machines simplify the statement of algorithms. Algorithms running on Turing-equivalent abstract machines are usually more general than their counterparts running on real machines, because they have arbitrary-precision data types available and never have to deal with unexpected conditions (including, but not limited to, running [[out of memory]]). |
| | | |
| | | |
第692行: |
第692行: |
| | | |
| ===图灵机的局限性=== | | ===图灵机的局限性=== |
− |
| |
| | | |
| | | |
| ====计算复杂性理论==== | | ====计算复杂性理论==== |
− |
| |
− |
| |
− | {{further|Computational complexity theory}}
| |
| | | |
| A limitation of Turing machines is that they do not model the strengths of a particular arrangement well. For instance, modern stored-program computers are actually instances of a more specific form of [[abstract machine]] known as the [[random-access stored-program machine]] or RASP machine model. Like the [[universal Turing machine]], the RASP stores its "program" in "memory" external to its finite-state machine's "instructions". Unlike the universal Turing machine, the RASP has an infinite number of distinguishable, numbered but unbounded "registers"—memory "cells" that can contain any integer (cf. Elgot and Robinson (1964), Hartmanis (1971), and in particular Cook-Rechow (1973); references at [[random access machine]]). The RASP's finite-state machine is equipped with the capability for indirect addressing (e.g., the contents of one register can be used as an address to specify another register); thus the RASP's "program" can address any register in the register-sequence. The upshot of this distinction is that there are computational optimizations that can be performed based on the memory indices, which are not possible in a general Turing machine; thus when Turing machines are used as the basis for bounding running times, a 'false lower bound' can be proven on certain algorithms' running times (due to the false simplifying assumption of a Turing machine). An example of this is [[binary search]], an algorithm that can be shown to perform more quickly when using the RASP model of computation rather than the Turing machine model. | | A limitation of Turing machines is that they do not model the strengths of a particular arrangement well. For instance, modern stored-program computers are actually instances of a more specific form of [[abstract machine]] known as the [[random-access stored-program machine]] or RASP machine model. Like the [[universal Turing machine]], the RASP stores its "program" in "memory" external to its finite-state machine's "instructions". Unlike the universal Turing machine, the RASP has an infinite number of distinguishable, numbered but unbounded "registers"—memory "cells" that can contain any integer (cf. Elgot and Robinson (1964), Hartmanis (1971), and in particular Cook-Rechow (1973); references at [[random access machine]]). The RASP's finite-state machine is equipped with the capability for indirect addressing (e.g., the contents of one register can be used as an address to specify another register); thus the RASP's "program" can address any register in the register-sequence. The upshot of this distinction is that there are computational optimizations that can be performed based on the memory indices, which are not possible in a general Turing machine; thus when Turing machines are used as the basis for bounding running times, a 'false lower bound' can be proven on certain algorithms' running times (due to the false simplifying assumption of a Turing machine). An example of this is [[binary search]], an algorithm that can be shown to perform more quickly when using the RASP model of computation rather than the Turing machine model. |
| | | |
| | | |
− | 图灵机的一个局限性在于它们不能很好地模拟特定排列的优势。例如,现代存储程序计算机实际上是一种更具体的抽象机器的实例,这种抽象机器被称为随机存取存储程序机器或 RASP机器模型。与通用图灵机一样,RASP将其“程序”存储在有限状态机的“指令”之外的“内存”中。与通用图灵机不同的是,RASP具有无限数量可区分的、有编号但无限制的“寄存器”ー可以包含任何整数的内存 "单元"(参见Elgot和Robinson(1964),Hartmanis(1971),特别是Cook-Rechow(1973);) RASP的有限状态机可以间接寻址(例如,一个寄存器的内容可以用作另一个寄存器的地址) ,因此当图灵机被用作约束运行时间的基础时,可以证明某些算法的运行时间有一个 "假下限"(由于图灵机的假简化假设)。这方面的一个例子是二进制搜索,当使用RASP计算模型而不是图灵机模型时,可以证明这种算法的运行速度更快。
| + | 图灵机的一个局限性在于,其不能很好地模拟特定排列的优势。例如,现代存储程序计算机实际上是一种更具体的抽象机器的实例,这种抽象机器被称为随机存取存储程序机器或 RASP机器模型。与通用图灵机一样,RASP将其“程序”存储在有限状态机的“指令”之外的“内存”中。与通用图灵机不同的是,RASP具有无限数量可区分的、有编号但无限制的“寄存器”ー可以包含任何整数的内存 "单元"(参见Elgot和Robinson(1964),Hartmanis(1971),特别是Cook-Rechow(1973);) RASP的有限状态机可以间接寻址(例如,一个寄存器的内容可以用作另一个寄存器的地址) ,因此当图灵机被用作约束运行时间的基础时,可以证明某些算法的运行时间有一个 "假下限"(由于图灵机的假简化假设)。这方面的一个例子是二进制搜索,当使用RASP计算模型而不是图灵机模型时,可以证明这种算法的运行速度更快。 |
| | | |
| ====并发性==== | | ====并发性==== |
第709行: |
第705行: |
| Another limitation of Turing machines is that they do not model concurrency well. For example, there is a bound on the size of integer that can be computed by an always-halting nondeterministic Turing machine starting on a blank tape. (See article on [[unbounded nondeterminism]].) By contrast, there are always-halting concurrent systems with no inputs that can compute an integer of unbounded size. (A process can be created with local storage that is initialized with a count of 0 that concurrently sends itself both a stop and a go message. When it receives a go message, it increments its count by 1 and sends itself a go message. When it receives a stop message, it stops with an unbounded number in its local storage.) | | Another limitation of Turing machines is that they do not model concurrency well. For example, there is a bound on the size of integer that can be computed by an always-halting nondeterministic Turing machine starting on a blank tape. (See article on [[unbounded nondeterminism]].) By contrast, there are always-halting concurrent systems with no inputs that can compute an integer of unbounded size. (A process can be created with local storage that is initialized with a count of 0 that concurrently sends itself both a stop and a go message. When it receives a go message, it increments its count by 1 and sends itself a go message. When it receives a stop message, it stops with an unbounded number in its local storage.) |
| | | |
− | 图灵机的另一个局限是,它们不能很好地模拟并发。例如,一个始终保持非确定性的图灵机在空白纸带上开始计算的整数大小是有限制的。相比之下,有一些没有输入的始终保持一致的并发系统,可以计算出无界大小的整数。(可以用本地存储创建一个初始化为0的进程,它同时向自己发送一个“停止”和一个“运行”的消息。当它收到一个“运行”信息时,它的计数增加1,并向自己发送一个去信息。当它收到一个“停止”消息时,它就停止,在它的本地存储区有一个无限制的数字)。
| + | 图灵机的另一个局限是,其不能很好地模拟并发。例如,一个始终保持非确定性的图灵机在空白纸带上开始计算的整数大小是有限制的。相比之下,有一些没有输入的始终保持一致的并发系统,可以计算出无界大小的整数。(可以用本地存储创建一个初始化为0的进程,它同时向自己发送一个“停止”和一个“运行”的消息。当它收到一个“运行”信息时,它的计数增加1,并向自己发送一个去信息。当它收到一个“停止”消息时,它就停止,在它的本地存储区有一个无限制的数字)。 |
| | | |
| ====交互==== | | ====交互==== |