For faster navigation, this Iframe is preloading the Wikiwand page for 非确定型图灵机.

非确定型图灵机

此条目没有列出任何参考或来源。 (2010年8月21日)维基百科所有的内容都应该可供查证。请协助补充可靠来源改善这篇条目。无法查证的内容可能会因为异议提出而被移除。

如果不加特殊说明,通常所说的图灵机都是确定型图灵机。非确定型图灵机确定型图灵机的不同之处在于,在计算的每一时刻,根据当前状态和读写头所读的符号,机器存在多种状态转移方案,机器将任意地选择其中一种方案继续运作,直到最后停机为止。具体而言,其状态转移函数为

其中是状态集合,是带字母表,分别表示读写头向左和向右移动;符号 表示集合的幂集,即

例如,设非确定型图灵机的当前状态为,当前读写头所读的符号为,若

任意地选择一个,按其进行操作,然后进入下一步计算。

非确定型图灵机在输入串上的计算过程可以表示为一棵树,不同的分支对应着每一步计算的不同的可能性。只要有任意一个分支进入接受状态,则称接受;只要有任意一个分支进入拒绝状态,则称拒绝;某些分支可能永远无法停机,但只要有一个分支可以进入接受或拒绝状态,我们就说在输入上可停机。注意,我们规定必须是无矛盾的,即它不能有某个分支接受而同时另一个分支拒绝,这样有矛盾的非确定型图灵机是不合法的。

定理:对于任意一个非确定型图灵机,存在一个确定型图灵机,使得它们的语言相等,即

证明:因为非确定型图灵机的计算过程就是一棵树,因此我们只需遍历该树就可以模拟其计算过程。一个简单的想法是利用深度优先搜索来遍历的计算树,但这样行不通,因为的某些计算分支可能永远不停机!所以我们可以采用一种在算法设计中称为迭代加深搜索的技巧来遍历的计算树。具体证明如下:

对于非确定型图灵机,构造一个确定型图灵机如下:

  1. 深度优先地模拟的每个分支的计算,但每个分支最多只计算步,如果某个计算分支在步内可以停机,则也停机,并将该计算分支的计算结果输出。
  2. 增加 1,跳转到上一步继续执行。

显然,若有某个分支可以停机,则此也一定会找到该分支并停机。因此

定理2:如果语言L被非确定型图灵机在多项式时间内接受,则一定存在多项式P使得语言L被时间复杂度为的确定型图灵机程序所接受。

定理2说明了为什么在证明P = NP之前,所有的NPC问题都只有指数时间复杂度算法。

参见

[编辑]
{{bottomLinkPreText}} {{bottomLinkText}}
非确定型图灵机
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?