Computability theory differs from the related discipline of computational complexity theory, which deals with the question of how efficiently a problem can be solved, rather than whether it is solvable at all.
To explore these areas, computer scientists usually address the ability of a computer to answer the question: Given a formal language, and a string, is the string a member of that language? This is a somewhat esoteric way of asking this question, so an example is illuminating. We might define our language as the set of all strings of digits which represent a prime number. To ask whether an input string is a member of this language is equivalent to asking whether the number represented by that input string is prime. Similarly, we define a language as the set of all palindromes, or the set of all strings consisting only of the letter 'a'. In these examples, it is easy to see that constructing a computer to solve one problem is easier in some cases than in others.
But in what real sense is this observation true? Can we define a formal sense in which we can understand how hard a particular problem is to solve on a computer? It is the goal of computability theory to answer just this question.
Such a language is the set of all strings consisting of the letters 'a' and 'b' which contain an equal number of the letter 'a' and 'b'. To see why this language cannot be correctly recognized by a finite state machine, assume first that such a machine exists. must have some number of states . Now consider the string consisting of 'a's followed by 'b's.
As reads in , there must be some state in the machine that is repeated as it reads in the first series of 'a's, since there are 'a's and only states by the pigeonhole principle. Call this state , and further let be the number of 'a's that our machine read in order to get from the first occurrence of to some subsequent occurrence during the 'a' sequence. We know, then, that at that second occurrence of , we can add in an additional (where ) 'a's and we will be again at state . This means that we know that a string of 'a's must end up in the same state as the string of 'a's. This implies that if our machine accepts , it must also accept the string of 'a's followed by 'b's, which is not in the language of strings containing an equal number of 'a's and 'b's.
We know, therefore, that this language cannot be accepted correctly by any finite state machine, and is thus not a regular language. A more general form of this result is called the Pumping lemma for regular languages, which can be used to show that broad classes of languages cannot be recognized by a finite state machine.
Many would object to this result by saying that they can easily write a computer program on their desktop PC to recognize such a language, and we've previously stated that a desktop PC, along with all real computers, are finite state machines. And it is true that it is easy to write such a program, but it would be subject to a limitation: the memory capacity of the computer. Given a long enough string, the memory capacity of the computer would eventually be exhausted by an attempt to maintain a count of the number of input characters, and eventually would overflow. At that point, it must enter a state it has previously been in before. So, while it could recognize a great many such strings, there are strings in this language that it could not recognize. This should help to understand how this result about regular languages applies even to a desktop PC.
However, it turns out there are languages that cannot be decided by push-down automaton either. The result is similar to that for regular expressions, and won't be detailed here. There exists a Pumping lemma for context-free languages. An example of such a language is the set of prime numbers.
Because Turing machines have the ability to "back up" in their input tape, it is possible for a Turing machine to run for a long time in a way that is not possible with the other computation models previously described. It is possible to construct a Turing machine that will never finish running (halt) on some inputs. We say that a Turing machine can decide a language if it eventually will halt on all inputs and give an answer. A language that can be so decided is called a recursive language. We can further describe Turing machines that will eventually halt and give an answer for any input in a language, but which may run forever for input strings which are not in the language. Such Turing machines could tell us that a given string is in the language, but we may never be sure based on its behavior that a given string is not in a language, since it may run forever in such a case. A language which is accepted by such a Turing machine is called a recursively enumerable language.
The Turing machine, it turns out, is an exceedingly powerful model of computation. Attempts to amend the definition of a Turing machine to produce a more powerful machine are surprisingly met with failure. For example, adding an extra tape to the Turing machine, giving it a 2-dimensional (or 3 or any-dimensional) infinite surface to work with can all be simulated by a Turing machine with the basic 1-dimensional tape. These models are thus not more powerful. In fact, the Church-Turing thesis conjectures that there is no reasonable model of computation which can decide languages that cannot be decided by a Turing machine. People have proposed models of computation more powerful than a Turing machine. However, these are generally considered to be unrealistic or unreasonable (See below).
Turing machines provide, therefore, an extremely powerful way of understanding broad questions about the very limits of computability. The question to ask then is: do there exist languages which are recursively enumerable, but not recursive? And, furthermore, are there languages which are not even recursively enumerable?
The halting problem is one of the most famous problems in computer science, because it has profound implications on the theory of computability and on how we use computers in everyday practice. The problem can be phrased:
Here we are asking not a simple question about a prime number or a palindrome, but we are instead turning the tables and asking a Turing machine to answer a question about another Turing machine. It can be shown (See main article: Halting problem) that it is not possible to construct a Turing machine that can answer this question.
That is, the only way to know for sure if a given program will halt on a particular input in all cases is simply to run it and see if it halts. If it does halt, then you know it halts. If it doesn't halt, however, you may never know if it will eventually halt. The language consisting of all Turing machine descriptions paired with all possible input streams on which those Turing machines will eventually halt, is not recursive. The halting problem is therefore called noncomputable or undecidable.
An extension of the halting problem is called Rice's Theorem, which states that all nontrivial properties of the language accepted by a Turing machine are undecidable.
A simple example of such a language is the complement of the halting language; that is the language consisting of all Turing machines paired with input strings where the Turing machines does not halt on its input. To see that this language is not recursively enumerable, imagine that we construct a Turing machine which is able to give a definite answer for all such Turing machines, but that it may run forever on any Turing machine that does eventually halt. We can then construct another Turing machine that simulates the operation of this machine, along with simulating directly the execution of the machine given in the input as well, by time-sharing the execution of the two programs. Since the direct simulation will eventually halt if the program it is simulating halts, and since by assumption the simulation of will eventually halt if the input program would never halt, we know that will eventually have one of its "threads" halt. is thus a decider for the halting problem. We have previously shown, however, that the halting problem is undecidable. We have a contradiction, and we have thus shown that our assumption that exists is incorrect. The complement of the halting language is therefore not recursively enumerable.
time to run. This infinite series converges to 2 time units, which means that this Turing machine can run an infinite execution in 2 time units. This machine is capable of deciding the halting problem by directly simulating the execution of the machine in question.
So-called Oracle machines have access to various "oracles" which provide the solution to specific undecidable problems. For example, the Turing machine may have a "halting oracle" which provided immediately whether a given Turing machine will ever halt on a given input.
نظرية الحسوبية | Teorie vyčíslitelnosti | Berechenbarkeitstheorie | Teoría de la computabilidad | نظریه محاسبهپذیری | Calculabilité | 계산 가능성 이론 | Teoria della calcolabilità | חישוביות | Berekenbaarheid | 計算可能性理論 | Teoria obliczalności | Теория вычислимости | Computability theory | ทฤษฎีการคำนวณได้
This article is licensed under the GNU Free Documentation License.
It uses material from the
"Computability theory (computer science)".
Home Page • arts • business • computers • games • health • hospitals • home • kids & teens • news • physicians • recreation• reference • regional • science • shopping • society • sports • world