不可计算理论

不可计算理论
图灵机计算机有着强大的计算能力,那是不是当计算机的计算能力达到极高水平时就可以解决所有问题呢?
要回答这个问题,首先我们得明确计算机所能做的事——计算。
什么是计算呢?直观地看,计算一般是指运用事先规定的规则,将一组数值变换为另一(所需的)数值的过程。对某一类问题,如果能到一组确定的规则,按这组规则,当给出这类问题中的任一具体问题后,就可以完全机械地在有限步内求出结果,则说这类问题是可计算的。这种规则就是算法,这类可计算问题也可称之为存在算法的问题。这就是直观上的能行可计算或算法可计算的概念。在20世纪以前,人们普遍认为,所有的问题类都是有算法的,人们的计算研究就是出算法来。但是20世纪初,人们发现有许多问题已经过长期研究,却仍然不到算法。于是人们开始怀疑,是否对这些问题来说,根本就不存在算法,即它们是不可计算的。这种不存在性当然需要证明,这时人们才发现,无论对算法还是对可计算性,都没有精确的定义!按前述对直观的可计算性的陈述,根本无法作出不存在算法的证明,因为“完全机械地”指什么?“确定的规则”又指什么?仍然是不明确的。
解决问题的需要促使人们不断作出探索。1934年,哥德尔提出了一般递归函数的概念,并指出:凡算法可计算函数都是一般递归函数,反之亦然。同年,丘奇证明了他提出的λ可定义函数与一般递归函数是等价的,并提出算法可计算函数等同于一般递归函数或λ可定义函数,这就是著名的“丘奇论点”。
用一般递归函数虽给出了可计算函数的严格数学定义,但在具体的计算过程中,就某一步运算而言,选用什么初始函数和基本运算仍有不确定性。为消除所有的不确定性,图灵在他的“论可计算数及其在判定问题中的应用”一文中从一个全新的角度定义了可计算函数。他全面分析了人的计算过程,把计算归结为最简单、最基本、最确定的操作动作,从而用一种简单的方法来描述那种直观上具有机械性的基本计算程序,使任何机械(能行)的程序都可以归约为这些动作。这种简单的方法是以一个抽象自动机概念为基础的,其结果是:算法可计算函数就是这种自动机能计算的函数。这不仅给计算下了一个完全确定的定义,而且第一次把计算和自动机联系起来,对后世产生了巨大的影响,这种“自动机”后来被人们称为“图灵机”。
图灵机有一条无限长的纸带,纸带被分成若干小方格方格内可以是一个符号,也可以是空白,除此之外还有一个有限状态控制器。纸带起着存储器的作用,控制器上的读写头可以在带上左右移动,而读写头可以根据当前状态和看到的方格内的符号,采取下列三种行动之一:左移一格,右移一格,或者静止不动,具体采取哪一种行动应根据该图灵机的控制规则。或者可以从另一个角度来理解,由于读写头每次只对应一个小方格且它本身具有一定的状态,比如接受,拒绝或进入循环。当其进入接受或者拒绝状态时,就会发生停机(停机问题),即读写头不再操作,不会再产生新的格局;如果其一直处于循环状态,将一直产生新的
格局。
针对读写头的两种状态,可以看出:有一类图灵机,它们对任何输入都会停机(要么接受,要么拒绝)。这类图灵机又被称为判定器,被判定器识别的语言叫做可判定语言。那么,是否存在一个不可判定语言(不存在一个图灵机可以判定该语言)呢?答案是肯定的,并不是所有的语言都可以被判定。下面简短的证明一下。
假设一个语言A = {(<M>,ω) | <M>是表示图灵机M的字符串,ω是一个字符串。M接受ω}。即语言A中的字符串都有两部分组成:第一部分是一个图灵机M的字符串表示<M>;第二部分是一个字符串ω,且M接受ω。假设语言A是可判定的,也就是存在一个判定器H。当M接受ω时,H接受(<M>,ω);当M不接受ω时,H拒绝(<M>,ω)。(注意H是一个判定器,它总会停机,接受或拒绝(<M>,ω))。那么我们对H稍加改造,将它的结果取一下反:当M接受ω时,H 拒绝 (<M>,ω);当M不接受ω时,H接受(<M>,ω)。这很容易,只要把H的接收状态和拒绝状态互换一下身份即可。但是若把H自己的序列化字符串<H>提供给H会发生什么?可以看出,当H接受<H>时,H拒绝<H>;当H不接受<H>时,H 接受<H>。
在此导出了矛盾,从而唯一的结论只能是,假设的H是不可能存在的。对于这种不可判定的语言,是无法构造出一个图灵机来接受或拒绝该字符串的。一个不可判定的语言,就是一个不可计算的问题,不可计算问题就是超出了计算能力的问题,不能被任何有步骤的,确定性的算法所能解决的问题。
愈慢愈美丽
新语丝网
在如上图灵机的例子中我们可以把有限状态读写头看作是机器的程序执行代码,而存储带上存的只是被处理的数据。图灵在描述他的另一个机器模型通用机器时还提出了可以把有限状态指令也存放在存储带上,让读写头根据读入的指令进行下一步操作。可以证明这样存储有指令的通用图灵机能够实现任何一个图灵机,也就是说可以解决任意一个图灵可计算问题。现在我们广泛使用的计算机的确就是采用了存储指令这一原理因而可以解决“万能”计算问题的。具体实现方法是:对于需要解决的问题用软件编制程序,再把程序和数据都存放在同一个存储器(内存)里,由中央处理器(CPU)根据指令对数据进行操作。这样的机器也叫做“存储程序计算机”。在为第一台存储程序计算机研发计划做顾问时,约翰·冯·诺伊曼写了一个草案报告描述了这种带有中央处理器、内存、I/O、总线的存储程序计算机。因此可以说我们今天使用的存储程序计算机就是图灵机理论的实现。
图灵机的概念有十分独特的意义:如果把图灵机的内部状态解释为指令,用字母表的字来表示,与输出字输入字同样存贮在机器里,那就成为电子计算机了。由此开创了“自动机”这一学科分支,促进了电子计算机的研制工作。
图灵机模型帮助我们了解了计算机的工作,因而我们能说“计算机并不能解决所有问题”,例如停机问题。我们也可以构造出其他不可判定的问题,这些问题是计算机不能解决的,也就是说有不可能存在的程序
——Programs That Never Exist
环氧树脂6101It’s clear and explicit that various programs which can do many things in o ur daily life. They do everything based on clear, explicit and valid instructions that has been given to them by the programmers in advance to deal with different circumstances.
But, can computer do everything that is explicit and clear? The answer is NO.
SIMPLE FACTS
We are attempting to prove that the answer is NO, which is absolute, starting from some obvious facts that is beyond doubt.
1. Computers always do things based on the instructions given.
2. All programs has to obey logical rules, or they will never really exist.
3. Proof by contradiction is valid. That is, if A is true lead to the fact that B is also true, and we know exactly B cannot be true, we can conclude that A is false.
4. Computer programs can accept any type of input if that is within the range of the ability given, even the programs themselves.
EXAMPLE1 –“”
Before giving the first typical example, a kind of boring programs should be mentioned first. They are called YES-NO programs, that is, they accept all kinds of input, and can judge whether the input follows the rules, with the only two kinds of output: “YES” & “NO”. If an unexpected input cannot be judged, the output will be “NO” again.
For example, one program (Suppose it is called “”) (Suffix “.exe” is used here just to represent it is an executable program, which is taken from Microsoft Windows) is meant to tell whether the input is a photo (Photos should end with “.png”, .or “.jpg”, etc. In that case, if “1.png” is the input, the program will give the output “YES”, and “a.exe” will result in “NO”. Another example is “”, which return whether the length of the name is positive (greater than zero), which is always TRUE. So, exactly we will always get the output “YES” whatever we use as input.
So, we are attempting to create a program that is used to detect whether a program is always giving “YES” under any circumstances. We can call it “”. That is, meaningful input of the program has to be programs, otherwise, you’ll only get a “NO”. If one program is always giving “YES”
as the output (like the “” mentioned above), then “” will give the output “YES”, otherwise, “NO”.
So, we are going to prove, this kind of program cannot be created. We can use the method, proof with contradiction to prove that, this kind of program never exist, which seems incredible.
Suppose we can REALL Y make out such a program. In that case, we are capable of doing an easier thing, that is, we can make out a program, namely “”. The new program only do such things: check whether the output of the input program (the program to be tested) is “YES” if the input of the input program is the input program itself. For instance, if we take “”as the input of “”, the output will be “NO”, since “” is not a photo and it will result in the fact that the output of “” is “NO”, and result in the fact that the output of “” is “NO”. We can see clearly tha t “” can do only a little part of what “” can do.
So, here comes the big problem. What will happen if we run “” on itself?
Luckily, we only have two probable answers, so we can consider each one in turn. If the output is “YES”, we know that (according to the definition of “”), “” should output
“YES” when run on itself. But what if the output of “” when run on itself happened to be “NO”? Well, it would mean that (again, according to the definition of “”) “” should output “NO” when run on itself. Again, this statement is perfectly consistent. It seems like “” can actually choose what its output should be. This is not practical when dealing with programs, since we cannot figure out what computers are going to do.
What is more interesting is that we can create a program named “”, which gives the contradictory answer of “”. When an input causes “” to give an output “YES”, it gives “NO”.
And, the problem comes. What will happen if we run “” on itself?
Luckily again, we only have two answers to discuss. If the output is “YES”, it means when it runs on itself, the output should be “NO”, because “” should give “NO”. This makes no sense. On the other hand, if it gives “NO” as the output, the output should be “YES” according to “”.
Anyway, the program can never exist logically.
Let us see through the process. First w e suppose that “” exists and in that case, “” exists, which means “” exists. Now, we can conclude “” never exists.
EXAMPLE2 –“”
Sometimes we come across some unsatisfying circumstances that a program that we are running
can crash during the process. Maybe we are always trying to find a way to detect whether a program can automatically crash. We can just call it “”, which gives “YES” when the input is an executable program and can crash by itself. Now we can use the same method to prove that this kind of program does not exist.
Suppose we have REALLY made such kind of program and compiled it into an executable program, and it can do exactly what we need it to do. Then we can easily make up such a program “” as can crash based on the input whenever “” gives “YES”. Furthermore, we can create a program “”, which do exactly as follows:
〇When the input can crash, the new program crash, too.
〇On other circumstances, it gives “NO”
Similarly we can find that when we run the new program on itself, we’ll get involved in a logical jam. Think of the outcomes. If it REALL Y crashes, then it should crash due to the definition. If it DOES NOT crash, t hen it should give “NO”, and that is what it does. It looks like that the answer is perfectly persistent on any circumstance. However, similarly to example 1, we can create the program “”, which do the opposite due to “”. In that case, we can similarly conclude this kind of program never exists, and, “” never exists.
SIMILAR INTERESTING THINGS IN LOGICAL FIELD
In logics, there are some strange propositions that we can claim them neither true nor false. For examp le, here comes proposition “The proposition itself is false.” The proposition is neither true nor false. We can make assumptions to see clearly what it is. If it IS true, then it should be false according to itself. If it IS false, then the proposition is displaying the true fact, and it should be true. So it is neither true nor false—actually we cannot tell whether it has the attribute of being true or false. This kind of proposition is called “paradox”, which is a mysterious part of logics.
CONCLUSION & MORE
We can now come to the conclusion that some kind of program REALL Y DOES NOT exist, even it is as easy as “” or as simple and useful as “”. We have to say we can exactly tell whether human beings’ logical system is complete.
In that case, we have to think about more questions about our computers and ourselves.
1. How can we deal with the possibility of programs’ crashing and shutting down if these problems are unpredictable?
2. What is the influence of these unpredictable problems on the computers and users?
3. Computers cannot do some things, can humans do? So, can we use computers to simulate humans’ brains?
不可判定性对计算机的能力做出了制约,那它对我们日常计算机使用有什么
影响吗?答案是否定的,几乎没有影响。原因有二,首先不可判定性只关心计算机能否得出答案,而不关心所耗费的时间,在如今讲求效率的社会如果不考虑时间成本那简直是在说梦话,事实上,许多可判定的问题至今仍没有高效算法,例如货郎担、背包问题等NP问题;其次,大部分情况下我们能很好地处理不可判定问题,虽然上面已经证明不存在能查出所有崩溃漏洞的程序,但实际上我们还是在
孜孜不倦地写崩溃发现程序,而且近几十年来软件稳定性的提高也是部分由于这类程序的不断进步。四观两论
既然它对我们的日常生活没有影响,那不可判定性是否对我们就没有更多的意义了呢?其实并非如此,不可判定性本身具有丰富的哲学内涵。比如,根据图灵机的结论,人工智能是不可能实现的,这个命题也在彭罗斯的《皇帝新脑》中给出了证明。这个证明同样依据了对于一个确定的程序,的确存在它无法完成的事情,即对任何一个人工智能程序而言,总存在着它解决不了的问题。但是对于一个人而言呢?对于每一个人来说,在理论上也能够到某些事情是他无法完成的,从这个角度看,计算机超越不了的问题,人也是不能超越的,那么人工智能岂不是可以实现了?
这将涉及到如何超越图灵停机问题。假如一个P程序能够判定所有程序是否停机,根据图灵机的理论可以构造出一个程序Q是P判定不了的,但是我针对Q 构造了新的判定程序P`,然而还可以构造出一个Q`是P`判定不了的,于是又构造出P``,接着构造出Q``......利用这样不具体的程序序列是可以超越图灵停机问题的,虽然这很虚幻,但这正是问题的关键:要想超越图灵停机问题,必须放弃程序的实在性,也就是说程序是需要不断变化的。所以构造人工智能是不能通过一些确定的人工智能程序来实现,需要利用其他的方法来完成,但是这其他的方法究竟是什么,现在还没有结论!
另一方面,当今大多数科学家都认同人脑的工作机制与计算机并无太大差别,只不过人脑内部是电信号的传输,而计算机内部是电信号的传输,于是人脑相当于一台高级的计算机,如果我们能这么说,
那么人脑也将满足不可判定性的条件,因此,正如书中作者所说,同样的限制不仅适用于我们指尖的精灵,亦同样适用于精灵背后的精灵——我们的理智。
>鬼笔菌

本文发布于:2024-09-21 16:41:43,感谢您对本站的认可!

本文链接:https://www.17tex.com/xueshu/720096.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:计算   问题   程序   图灵机   计算机
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2024 Comsenz Inc.Powered by © 易纺专利技术学习网 豫ICP备2022007602号 豫公网安备41160202000603 站长QQ:729038198 关于我们 投诉建议