Misplaced Pages

Blum–Shub–Smale machine

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

In computation theory , the Blum–Shub–Smale machine , or BSS machine , is a model of computation introduced by Lenore Blum , Michael Shub and Stephen Smale , intended to describe computations over the real numbers . Essentially, a BSS machine is a Random Access Machine with registers that can store arbitrary real numbers and that can compute rational functions over reals in a single time step. It is closely related to the Real RAM model.

#278721

109-600: BSS machines are more powerful than Turing machines , because the latter are by definition restricted to a finite set of symbols. A Turing machine can represent a countable set (such as the rational numbers) by strings of symbols, but this does not extend to the uncountable real numbers. A BSS machine M is given by a list I {\displaystyle I} of N + 1 {\displaystyle N+1} instructions (to be described below), indexed 0 , 1 , … , N {\displaystyle 0,1,\dots ,N} . A configuration of M

218-414: A Turing machine with bounded time or space resources. For example, the complexity class P is defined as the set of decision problems that can be solved by a deterministic Turing machine in polynomial time . Intuitively, a computational problem is just a question that can be solved by an algorithm . For example, "is the natural number n {\displaystyle n} prime ?"

327-513: A two-tape Turing machine so that it is possible for the machine to store the entire input (it can be shown that in terms of computability the two-tape Turing machine is equivalent to the single-tape Turing machine). In the two-tape Turing machine model, one tape is the input tape, which is read-only. The other is the work tape, which allows both reading and writing and is the tape on which the Turing machine performs computations. The space complexity of

436-522: A 0th symbol S 0 = "erase" or "blank", etc. However, he did not allow for non-printing, so every instruction-line includes "print symbol S k " or "erase" (cf. footnote 12 in Post (1947), The Undecidable , p. 300). The abbreviations are Turing's ( The Undecidable , p. 119). Subsequent to Turing's original paper in 1936–1937, machine-models have allowed all nine possible types of five-tuples: Any Turing table (list of instructions) can be constructed from

545-482: A 1 and change to state 6". The Turing machine starts with only the input string on its tape and blanks everywhere else. The TM accepts the input if it enters a designated accept state and rejects the input if it enters a reject state. The deterministic Turing machine (DTM) is the most basic type of Turing machine. It uses a fixed set of rules to determine its future actions (which is why it is called " deterministic "). A computational problem can then be defined in terms of

654-409: A TM on a particular input is the number of elementary steps that the Turing machine takes to reach either an accept or reject state. The space complexity is the number of cells on its tape that it uses to reach either an accept or reject state. The deterministic Turing machine (DTM) is a variant of the nondeterministic Turing machine (NTM). Intuitively, an NTM is just a regular Turing machine that has

763-597: A Turing machine M {\displaystyle M} is defined as the function t M : N → N {\displaystyle t_{M}:\mathbb {N} \to \mathbb {N} } , where t M ( n ) {\displaystyle t_{M}(n)} is the maximum number of steps that M {\displaystyle M} takes on any input of length n {\displaystyle n} . In computational complexity theory, theoretical computer scientists are concerned less with particular runtime values and more with

872-537: A Turing machine as the set of input strings that a particular Turing machine accepts. For example, the primality problem PRIME {\displaystyle {\texttt {PRIME}}} from above is the set of strings (representing natural numbers) that a Turing machine running an algorithm that correctly tests for primality accepts. A Turing machine is said to recognize a language (recall that "problem" and "language" are largely synonymous in computability and complexity theory) if it accepts all inputs that are in

981-429: A Turing machine, programming languages themselves do not necessarily have this limitation. Kirner et al., 2009 have shown that among the general-purpose programming languages some are Turing complete while others are not. For example, ANSI C is not Turing complete, as all instantiations of ANSI C (different instantiations are possible as the standard deliberately leaves certain behaviour undefined for legacy reasons) imply

1090-658: A bounded resource like time or memory . In particular, most complexity classes consist of decision problems that are solvable with a Turing machine , and are differentiated by their time or space (memory) requirements. For instance, the class P is the set of decision problems solvable by a deterministic Turing machine in polynomial time . There are, however, many complexity classes defined in terms of other types of problems (e.g. counting problems and function problems ) and using other models of computation (e.g. probabilistic Turing machines , interactive proof systems , Boolean circuits , and quantum computers ). The study of

1199-438: A broad range of computational problems. Other types of problems that certain complexity classes are defined in terms of include: To make concrete the notion of a "computer", in theoretical computer science problems are analyzed in the context of a computational model . Computational models make exact the notions of computational resources like "time" and "memory". In computational complexity theory , complexity classes deal with

SECTION 10

#1732858145279

1308-432: A computer, with the canonical machine using sequential memory to store data. Typically, the sequential memory is represented as a tape of infinite length on which the machine can perform read and write operations. In the context of formal language theory, a Turing machine ( automaton ) is capable of enumerating some arbitrary subset of valid strings of an alphabet . A set of strings which can be enumerated in this manner

1417-415: A desultory manner"). More explicitly, a Turing machine consists of: In the 4-tuple models, erasing or writing a symbol (a j1 ) and moving the head left or right (d k ) are specified as separate instructions. The table tells the machine to (ia) erase or write a symbol or (ib) move the head left or right, and then (ii) assume the same or a new state as prescribed, but not both actions (ia) and (ib) in

1526-522: A different convention, with new state q m listed immediately after the scanned symbol S j : For the remainder of this article "definition 1" (the Turing/Davis convention) will be used. In the following table, Turing's original model allowed only the first three lines that he called N1, N2, N3 (cf. Turing in The Undecidable , p. 126). He allowed for erasure of the "scanned square" by naming

1635-414: A drawing. Whether a drawing represents an improvement on its table must be decided by the reader for the particular context. The reader should again be cautioned that such diagrams represent a snapshot of their table frozen in time, not the course ("trajectory") of a computation through time and space. While every time the busy beaver machine "runs" it will always follow the same state-trajectory, this

1744-479: A finite-space memory. This is because the size of memory reference data types, called pointers , is accessible inside the language. However, other programming languages like Pascal do not have this feature, which allows them to be Turing complete in principle. It is just Turing complete in principle, as memory allocation in a programming language is allowed to fail, which means the programming language can be Turing complete when ignoring failed memory allocations, but

1853-453: A model through which one can reason about an algorithm or "mechanical procedure" in a mathematically precise way without being tied to any particular formalism. Studying the abstract properties of Turing machines has yielded many insights into computer science , computability theory , and complexity theory . In his 1948 essay, "Intelligent Machinery", Turing wrote that his machine consists of: ...an unlimited memory capacity obtained in

1962-531: A nondeterministic Turing machine can solve a problem using f ( n ) {\displaystyle f(n)} space, then a deterministic Turing machine can solve the same problem in f ( n ) 2 {\displaystyle f(n)^{2}} space, i.e. in the square of the space. Formally, Savitch's theorem states that for any f ( n ) > n {\displaystyle f(n)>n} , Important corollaries of Savitch's theorem are that PSPACE = NPSPACE (since

2071-949: A nondeterministic Turing machine can solve in exponential space, a deterministic Turing machine can also solve in exponential space. By definition of DTIME , it follows that D T I M E ( n k 1 ) {\displaystyle {\mathsf {DTIME}}(n^{k_{1}})} is contained in D T I M E ( n k 2 ) {\displaystyle {\mathsf {DTIME}}(n^{k_{2}})} if k 1 ≤ k 2 {\displaystyle k_{1}\leq k_{2}} , since O ( n k 1 ) ⊆ O ( n k 2 ) {\displaystyle O(n^{k_{1}})\subseteq O(n^{k_{2}})} if k 1 ≤ k 2 {\displaystyle k_{1}\leq k_{2}} . However, this definition gives no indication of whether this inclusion

2180-442: A polynomial-size certificate string c {\displaystyle c} , and accepts w {\displaystyle w} if w {\displaystyle w} is in the language and rejects w {\displaystyle w} if w {\displaystyle w} is not in the language. Intuitively, the certificate acts as a proof that the input w {\displaystyle w}

2289-630: A problem X {\displaystyle X} reduces to a problem Y {\displaystyle Y} if there exists a function f {\displaystyle f} such that for every x ∈ Σ ∗ {\displaystyle x\in \Sigma ^{*}} , x ∈ X {\displaystyle x\in X} if and only if f ( x ) ∈ Y {\displaystyle f(x)\in Y} . Generally, reductions are used to capture

SECTION 20

#1732858145279

2398-410: A single symbol drawn from a finite set of symbols called the alphabet of the machine. It has a "head" that, at any point in the machine's operation, is positioned over one of these cells, and a "state" selected from a finite set of states. At each step of its operation, the head reads the symbol in its cell. Then, based on the symbol and the machine's own present state, the machine writes a symbol into

2507-419: A source of confusion, as it can mean two things. Most commentators after Turing have used "state" to mean the name/designator of the current instruction to be performed—i.e. the contents of the state register. But Turing (1936) made a strong distinction between a record of what he called the machine's "m-configuration", and the machine's (or person's) "state of progress" through the computation—the current state of

2616-429: A subclass of nondeterministic Turing machines that don't make use of their nondeterminism; or under the verifier definition, P is the class of problems whose polynomial time verifiers need only receive the empty string as their certificate), it is not known whether NP is strictly larger than P . If P = NP , then it follows that nondeterminism provides no additional computational power over determinism with regards to

2725-453: A third element of the set of directions { L , R } {\displaystyle \{L,R\}} . The 7-tuple for the 3-state busy beaver looks like this (see more about this busy beaver at Turing machine examples ): Initially all tape cells are marked with 0 {\displaystyle 0} . In the words of van Emde Boas (1990), p. 6: "The set-theoretical object [his formal seven-tuple description similar to

2834-497: A universal machine). Another mathematical formalism, lambda calculus , with a similar "universal" nature was introduced by Alonzo Church . Church's work intertwined with Turing's to form the basis for the Church–Turing thesis . This thesis states that Turing machines, lambda calculus, and other similar formalisms of computation do indeed capture the informal notion of effective methods in logic and mathematics and thus provide

2943-480: Is a computational problem. A computational problem is mathematically represented as the set of answers to the problem. In the primality example, the problem (call it PRIME {\displaystyle {\texttt {PRIME}}} ) is represented by the set of all natural numbers that are prime: PRIME = { n ∈ N | n  is prime } {\displaystyle {\texttt {PRIME}}=\{n\in \mathbb {N} |n{\text{

3052-455: Is a list of real numbers, with all but finitely many being zero. The list x {\displaystyle x} is thought of as holding the contents of all registers of M . The computation begins with configuration ( 0 , 0 , 0 , x ) {\displaystyle (0,0,0,x)} and ends whenever k = N {\displaystyle k=N} ; the final content of x {\displaystyle x}

3161-489: Is a tuple ( k , r , w , x ) {\displaystyle (k,r,w,x)} , where k {\displaystyle k} is the index of the instruction to be executed next, r {\displaystyle r} and w {\displaystyle w} are registers holding non-negative integers, and x = ( x 0 , x 1 , … ) {\displaystyle x=(x_{0},x_{1},\ldots )}

3270-413: Is also known that P ⊆ P S P A C E {\displaystyle {\mathsf {P}}\subseteq {\mathsf {PSPACE}}} , which follows intuitively from the fact that, since writing to a cell on a Turing machine's tape is defined as taking one unit of time, a Turing machine operating in polynomial time can only write to polynomially many cells. It is suspected that P

3379-634: Is also possible to simulate any NTM using a DTM (the DTM will simply compute every possible computational branch one-by-one). Hence, the two are equivalent in terms of computability. However, simulating an NTM with a DTM often requires greater time and/or memory resources; as will be seen, how significant this slowdown is for certain classes of computational problems is an important question in computational complexity theory. Complexity classes group computational problems by their resource requirements. To do this, computational problems are differentiated by upper bounds on

Blum–Shub–Smale machine - Misplaced Pages Continue

3488-477: Is also possible to use the Blum axioms to define complexity classes without referring to a concrete computational model , but this approach is less frequently used in complexity theory. A Turing machine is a mathematical model of a general computing machine. It is the most commonly used model in complexity theory, owing in large part to the fact that it is believed to be as powerful as any other model of computation and

3597-512: Is an analogue of the Cook-Levin Theorem for real numbers. Turing machine A Turing machine is a mathematical model of computation describing an abstract machine that manipulates symbols on a strip of tape according to a table of rules. Despite the model's simplicity, it is capable of implementing any computer algorithm . The machine operates on an infinite memory tape divided into discrete cells, each of which can hold

3706-426: Is an example of a decision problem as it can be represented by the yes–no question "is the natural number n {\displaystyle n} prime ". In terms of the theory of computation, a decision problem is represented as the set of input strings that a computer running a correct algorithm would answer "yes" to. In the primality example, PRIME {\displaystyle {\texttt {PRIME}}}

3815-513: Is as hard as the hardest problems in C ). Of particular importance is the class of NP -complete problems—the most difficult problems in NP . Because all problems in NP can be polynomial-time reduced to NP -complete problems, finding an NP -complete problem that can be solved in polynomial time would mean that P  =  NP . Savitch's theorem establishes the relationship between deterministic and nondetermistic space resources. It shows that if

3924-418: Is called a recursively enumerable language . The Turing machine can equivalently be defined as a model that recognises valid input strings, rather than enumerating output strings. Given a Turing machine M and an arbitrary string s , it is generally not possible to decide whether M will eventually produce s . This is due to the fact that the halting problem is unsolvable, which has major implications for

4033-565: Is close to 1. ) Many complexity classes are defined using the concept of a reduction . A reduction is a transformation of one problem into another problem, i.e. a reduction takes inputs from one problem and transforms them into inputs of another problem. For instance, you can reduce ordinary base-10 addition x + y {\displaystyle x+y} to base-2 addition by transforming x {\displaystyle x} and y {\displaystyle y} to their base-2 notation (e.g. 5+7 becomes 101+111). Formally,

4142-406: Is closed under all Boolean operations, and under quantification over polynomially sized domains. Closure properties can be helpful in separating classes—one possible route to separating two complexity classes is to find some closure property possessed by one class but not by the other. Each class X that is not closed under negation has a complement class co-X , which consists of the complements of

4251-450: Is comparatively slow compared to problems in the exponential complexity class EXPTIME (or more accurately, for problems in EXPTIME that are outside of P , since P ⊆ E X P T I M E {\displaystyle {\mathsf {P}}\subseteq {\mathsf {EXPTIME}}} ). Note that the study of complexity classes is intended primarily to understand

4360-423: Is easy to analyze mathematically. Importantly, it is believed that if there exists an algorithm that solves a particular problem then there also exists a Turing machine that solves that same problem (this is known as the Church–Turing thesis ); this means that it is believed that every algorithm can be represented as a Turing machine. Mechanically, a Turing machine (TM) manipulates symbols (generally restricted to

4469-469: Is equivalent to a single-stack pushdown automaton (PDA) that has been made more flexible and concise by relaxing the last-in-first-out (LIFO) requirement of its stack. In addition, a Turing machine is also equivalent to a two-stack PDA with standard LIFO semantics, by using one stack to model the tape left of the head and the other stack for the tape to the right. At the other extreme, some very simple models turn out to be Turing-equivalent , i.e. to have

Blum–Shub–Smale machine - Misplaced Pages Continue

4578-428: Is extremely broad: it is known to be a strict superset of PSPACE , NP , and P , and is believed to be a strict superset of EXPTIME . Complexity classes have a variety of closure properties. For example, decision classes may be closed under negation , disjunction , conjunction , or even under all Boolean operations . Moreover, they might also be closed under a variety of quantification schemes. P , for instance,

4687-444: Is in the language. Formally: This equivalence between the nondeterministic definition and the verifier definition highlights a fundamental connection between nondeterminism and solution verifiability. Furthermore, it also provides a useful method for proving that a language is in NP —simply identify a suitable certificate and show that it can be verified in polynomial time. While there might seem to be an obvious difference between

4796-487: Is not known whether any of these relationships is proper. The complexity classes PSPACE and NPSPACE are the space analogues to P and NP . That is, PSPACE is the class of problems solvable in polynomial space by a deterministic Turing machine and NPSPACE is the class of problems solvable in polynomial space by a nondeterministic Turing machine. More formally, While it is not known whether P = NP , Savitch's theorem famously showed that PSPACE = NPSPACE . It

4905-512: Is not known whether this is proper, but if P = NP then EXPTIME must equal NEXPTIME . While it is possible to define logarithmic time complexity classes, these are extremely narrow classes as sublinear times do not even enable a Turing machine to read the entire input (because log ⁡ n < n {\displaystyle \log n<n} ). However, there are a meaningful number of problems that can be solved in logarithmic space. The definitions of these classes require

5014-442: Is not true for the "copy" machine that can be provided with variable input "parameters". The diagram "progress of the computation" shows the three-state busy beaver's "state" (instruction) progress through its computation from start to finish. On the far right is the Turing "complete configuration" (Kleene "situation", Hopcroft–Ullman "instantaneous description") at each step. If the machine were to be stopped and cleared to blank both

5123-762: Is polynomial-time reducible to a problem Y {\displaystyle Y} if there exists a polynomial-time computable function p {\displaystyle p} such that for all x ∈ Σ ∗ {\displaystyle x\in \Sigma ^{*}} , x ∈ X {\displaystyle x\in X} if and only if p ( x ) ∈ Y {\displaystyle p(x)\in Y} . Note that reductions can be defined in many different ways. Common reductions are Cook reductions , Karp reductions and Levin reductions , and can vary based on resource bounds, such as polynomial-time reductions and log-space reductions . Reductions motivate

5232-435: Is prime}}\}} . In the theory of computation, these answers are represented as strings ; for example, in the primality example the natural numbers could be represented as strings of bits that represent binary numbers . For this reason, computational problems are often synonymously referred to as languages, since strings of bits represent formal languages (a concept borrowed from linguistics ); for example, saying that

5341-474: Is said to be the output of the machine. The instructions of M can be of the following types: Blum, Shub and Smale defined the complexity classes P (polynomial time) and NP (nondeterministic polynomial time) in the BSS model. Here NP is defined by adding an existentially-quantified input to a problem. They give a problem which is NP-complete for the class NP so defined: existence of roots of quartic polynomials. This

5450-410: Is strict. For time and space requirements, the conditions under which the inclusion is strict are given by the time and space hierarchy theorems, respectively. They are called hierarchy theorems because they induce a proper hierarchy on the classes defined by constraining the respective resources. The hierarchy theorems enable one to make quantitative statements about how much more additional time or space

5559-478: Is strictly smaller than PSPACE , but this has not been proven. The complexity classes EXPSPACE and NEXPSPACE are the space analogues to EXPTIME and NEXPTIME . That is, EXPSPACE is the class of problems solvable in exponential space by a deterministic Turing machine and NEXPSPACE is the class of problems solvable in exponential space by a nondeterministic Turing machine. Or more formally, Savitch's theorem showed that EXPSPACE = NEXPSPACE . This class

SECTION 50

#1732858145279

5668-474: Is supposed to not to appear elsewhere) and then by the note of instructions. This expression is called the "state formula". Earlier in his paper Turing carried this even further: he gives an example where he placed a symbol of the current "m-configuration"—the instruction's label—beneath the scanned square, together with all the symbols on the tape ( The Undecidable , p. 121); this he calls "the complete configuration " ( The Undecidable , p. 118). To print

5777-449: Is the ability for a computational model or a system of instructions to simulate a Turing machine. A programming language that is Turing complete is theoretically capable of expressing all tasks accomplishable by computers; nearly all programming languages are Turing complete if the limitations of finite memory are ignored. A Turing machine is an idealised model of a central processing unit (CPU) that controls all data manipulation done by

5886-461: Is the class of decision problems solvable by a deterministic Turing machine in exponential time and NEXPTIME (sometimes shortened to NEXP ) is the class of decision problems solvable by a nondeterministic Turing machine in exponential time. Or more formally, EXPTIME is a strict superset of P and NEXPTIME is a strict superset of NP . It is further the case that EXPTIME ⊆ {\displaystyle \subseteq } NEXPTIME . It

5995-440: Is the class of problems that are solvable by a deterministic Turing machine in polynomial time and NP is the class of problems that are solvable by a nondeterministic Turing machine in polynomial time. Or more formally, P is often said to be the class of problems that can be solved "quickly" or "efficiently" by a deterministic computer, since the time complexity of solving a problem in P increases relatively slowly with

6104-465: Is the maximum number of steps that the NTM uses on any branch of its computation. Similarly, the space complexity of an NTM is the maximum number of cells that the NTM uses on any branch of its computation. DTMs can be viewed as a special case of NTMs that do not make use of the power of nondeterminism. Hence, every computation that can be carried out by a DTM can also be carried out by an equivalent NTM. It

6213-493: Is the set of strings representing natural numbers that, when input into a computer running an algorithm that correctly tests for primality , the algorithm answers "yes, this number is prime". This "yes-no" format is often equivalently stated as "accept-reject"; that is, an algorithm "accepts" an input string if the answer to the decision problem is "yes" and "rejects" if the answer is "no". While some problems cannot easily be expressed as decision problems, they nonetheless encompass

6322-499: Is the unlimited amount of tape and runtime that gives it an unbounded amount of storage space . Following Hopcroft & Ullman (1979 , p. 148), a (one-tape) Turing machine can be formally defined as a 7- tuple M = ⟨ Q , Γ , b , Σ , δ , q 0 , F ⟩ {\displaystyle M=\langle Q,\Gamma ,b,\Sigma ,\delta ,q_{0},F\rangle } where A variant allows "no shift", say N, as

6431-480: The PRIME {\displaystyle {\texttt {PRIME}}} problem is in the complexity class NP is equivalent to saying that the language PRIME {\displaystyle {\texttt {PRIME}}} is in NP . The most commonly analyzed problems in theoretical computer science are decision problems —the kinds of problems that can be posed as yes–no questions . The primality example above, for instance,

6540-447: The NFA to DFA conversion algorithm). For practical and didactic intentions, the equivalent register machine can be used as a usual assembly programming language . A relevant question is whether or not the computation model represented by concrete programming languages is Turing equivalent. While the computation of a real computer is based on finite states and thus not capable to simulate

6649-418: The inherent complexity required to solve computational problems. Complexity theorists are thus generally concerned with finding the smallest complexity class that a problem falls into and are therefore concerned with identifying which class a computational problem falls into using the most efficient algorithm. There may be an algorithm, for instance, that solves a particular problem in exponential time, but if

SECTION 60

#1732858145279

6758-447: The inherent resource requirements of problems and not the resource requirements that depend upon how a physical computer is constructed. For example, in the real world different computers may require different amounts of time and memory to solve the same problem because of the way that they have been engineered. By providing an abstract mathematical representations of computers, computational models abstract away superfluous complexities of

6867-425: The right of the scanned square. But Kleene refers to "q 4 " itself as "the machine state" (Kleene, p. 374–375). Hopcroft and Ullman call this composite the "instantaneous description" and follow the Turing convention of putting the "current state" (instruction-label, m-configuration) to the left of the scanned symbol (p. 149), that is, the instantaneous description is the composite of non-blank symbols to

6976-634: The subset relation). However, many relationships are not yet known; for example, one of the most famous open problems in computer science concerns whether P equals NP . The relationships between classes often answer questions about the fundamental nature of computation. The P versus NP problem, for instance, is directly related to questions of whether nondeterminism adds any computational power to computers and whether problems having solutions that can be quickly checked for correctness can also be quickly solved. Complexity classes are sets of related computational problems . They are defined in terms of

7085-499: The uncomputability of the Entscheidungsproblem ('decision problem'). Turing machines proved the existence of fundamental limitations on the power of mechanical computation. While they can express arbitrary computations, their minimalist design makes them too slow for computation in practice: real-world computers are based on different designs that, unlike Turing machines, use random-access memory . Turing completeness

7194-587: The "complete configuration" on one line, he places the state-label/m-configuration to the left of the scanned symbol. A variant of this is seen in Kleene (1952) where Kleene shows how to write the Gödel number of a machine's "situation": he places the "m-configuration" symbol q 4 over the scanned square in roughly the center of the 6 non-blank squares on the tape (see the Turing-tape figure in this article) and puts it to

7303-742: The "state register" and entire tape, these "configurations" could be used to rekindle a computation anywhere in its progress (cf. Turing (1936) The Undecidable , pp. 139–140). Many machines that might be thought to have more computational capability than a simple universal Turing machine can be shown to have no more power (Hopcroft and Ullman p. 159, cf. Minsky (1967)). They might compute faster, perhaps, or use less memory, or their instruction set might be smaller, but they cannot compute more powerfully (i.e. more mathematical functions). (The Church–Turing thesis hypothesises this to be true for any kind of machine: that anything that can be "computed" can be computed by some Turing machine.) A Turing machine

7412-451: The NTM accepts the input. In this way, an NTM can be thought of as simultaneously exploring all computational possibilities in parallel and selecting an accepting branch. NTMs are not meant to be physically realizable models, they are simply theoretically interesting abstract machines that give rise to a number of interesting complexity classes (which often do have physically realizable equivalent definitions). The time complexity of an NTM

7521-594: The Turing machine is measured as the number of cells that are used on the work tape. L (sometimes lengthened to LOGSPACE ) is then defined as the class of problems solvable in logarithmic space on a deterministic Turing machine and NL (sometimes lengthened to NLOGSPACE ) is the class of problems solvable in logarithmic space on a nondeterministic Turing machine. Or more formally, It is known that L ⊆ N L ⊆ P {\displaystyle {\mathsf {L}}\subseteq {\mathsf {NL}}\subseteq {\mathsf {P}}} . However, it

7630-473: The ability to quickly find a solution to a problem; that is, being able to explore all possible branches of computation provides at most a polynomial speedup over being able to explore only a single branch. Furthermore, it would follow that if there exists a proof for a problem instance and that proof can be quickly be checked for correctness (that is, if the problem is in NP ), then there also exists an algorithm that can quickly construct that proof (that is,

7739-478: The above nine 5-tuples. For technical reasons, the three non-printing or "N" instructions (4, 5, 6) can usually be dispensed with. For examples see Turing machine examples . Less frequently the use of 4-tuples are encountered: these represent a further atomization of the Turing instructions (cf. Post (1947), Boolos & Jeffrey (1974, 1999), Davis-Sigal-Weyuker (1994)); also see more at Post–Turing machine . The word "state" used in context of Turing machines can be

7848-587: The above] provides only partial information on how the machine will behave and what its computations will look like." For instance, Definitions in literature sometimes differ slightly, to make arguments or proofs easier or clearer, but this is always done in such a way that the resulting machine has the same computational power. For example, the set could be changed from { L , R } {\displaystyle \{L,R\}} to { L , R , N } {\displaystyle \{L,R,N\}} , where N ("None" or "No-operation") would allow

7957-415: The added capability of being able to explore multiple possible future actions from a given state, and "choosing" a branch that accepts (if any accept). That is, while a DTM must follow only one branch of computation, an NTM can be imagined as a computation tree, branching into many possible computational pathways at each step (see image). If at least one branch of the tree halts with an "accept" condition, then

8066-405: The bits 0 and 1 to provide an intuitive connection to real-life computers) contained on an infinitely long strip of tape. The TM can read and write, one at a time, using a tape head. Operation is fully determined by a finite set of elementary instructions such as "in state 42, if the symbol seen is 0, write a 1; if the symbol seen is 1, change into state 17; in state 17, if the symbol seen is 0, write

8175-460: The class of problems that are efficiently solvable and the class of problems whose solutions are merely efficiently checkable, P and NP are actually at the center of one of the most famous unsolved problems in computer science: the P versus NP problem. While it is known that P ⊆ N P {\displaystyle {\mathsf {P}}\subseteq {\mathsf {NP}}} (intuitively, deterministic Turing machines are just

8284-414: The compiled programs executable on a real computer cannot. Complexity class In computational complexity theory , a complexity class is a set of computational problems "of related resource-based complexity ". The two most commonly analyzed resources are time and memory . In general, a complexity class is defined in terms of a type of computational problem, a model of computation , and

8393-411: The computational difficulty of solving the problems contained within them with respect to particular computational resources like time or memory. More formally, the definition of a complexity class consists of three things: a type of computational problem, a model of computation, and a bounded computational resource. In particular, most complexity classes consist of decision problems that can be solved by

8502-510: The concept of a problem being hard for a complexity class. A problem X {\displaystyle X} is hard for a class of problems C if every problem in C can be polynomial-time reduced to X {\displaystyle X} . Thus no problem in C is harder than X {\displaystyle X} , since an algorithm for X {\displaystyle X} allows us to solve any problem in C with at most polynomial slowdown. Of particular importance,

8611-412: The form of an infinite tape marked out into squares, on each of which a symbol could be printed. At any moment there is one symbol in the machine; it is called the scanned symbol. The machine can alter the scanned symbol, and its behavior is in part determined by that symbol, but the symbols on the tape elsewhere do not affect the behavior of the machine. However, the tape can be moved back and forth through

8720-426: The general class of functions that the time complexity function falls into. For instance, is the time complexity function a polynomial ? A logarithmic function ? An exponential function ? Or another kind of function? The space complexity of an algorithm with respect to the Turing machine model is the number of cells on the Turing machine's tape that are required to run an algorithm on a given input size. Formally,

8829-420: The input size. An important characteristic of the class NP is that it can be equivalently defined as the class of problems whose solutions are verifiable by a deterministic Turing machine in polynomial time. That is, a language is in NP if there exists a deterministic polynomial time Turing machine, referred to as the verifier, that takes as input a string w {\displaystyle w} and

8938-411: The key reasons many complexity classes are defined in the way that they are. Take, for example, a problem that can be solved in O ( n ) {\displaystyle O(n)} time (that is, in linear time) and one that can be solved in, at best, O ( n 1000 ) {\displaystyle O(n^{1000})} time. Both of these problems are in P , yet the runtime of

9047-487: The language and is said to decide a language if it additionally rejects all inputs that are not in the language (certain inputs may cause a Turing machine to run forever, so decidability places the additional constraint over recognizability that the Turing machine must halt on all inputs). A Turing machine that "solves" a problem is generally meant to mean one that decides the language. Turing machines enable intuitive notions of "time" and "space". The time complexity of

9156-407: The languages contained in X (i.e. co-X = { L | L ¯ ∈ X } {\displaystyle {\textsf {co-X}}=\{L|{\overline {L}}\in {\mathsf {X}}\}} ). co-NP , for instance, is one important complement complexity class, and sits at the center of the unsolved problem over whether co-NP = NP . Closure properties are one of

9265-561: The left of the scanned symbol or to the right of the scanned symbol. Turing's biographer Andrew Hodges (1983: 107) has noted and discussed this confusion. To the right: the above table as expressed as a "state transition" diagram. Usually large tables are better left as tables (Booth, p. 74). They are more readily simulated by computer in tabular form (Booth, p. 74). However, certain concepts—e.g. machines with "reset" states and machines with repeating patterns (cf. Hill and Peterson p. 244ff)—can be more readily seen when viewed as

9374-420: The left, state of the machine, the current symbol scanned by the head, and the non-blank symbols to the right. Example: total state of 3-state 2-symbol busy beaver after 3 "moves" (taken from example "run" in the figure below): This means: after three moves the tape has ... 000110000 ... on it, the head is scanning the right-most 1, and the state is A . Blanks (in this case represented by "0"s) can be part of

9483-477: The machine to stay on the same tape cell instead of moving left or right. This would not increase the machine's computational power. The most common convention represents each "Turing instruction" in a "Turing table" by one of nine 5-tuples, per the convention of Turing/Davis (Turing (1936) in The Undecidable , p. 126–127 and Davis (2000) p. 152): Other authors (Minsky (1967) p. 119, Hopcroft and Ullman (1979) p. 158, Stone (1972) p. 9) adopt

9592-425: The machine, this being one of the elementary operations of the machine. Any symbol on the tape may therefore eventually have an innings. The Turing machine mathematically models a machine that mechanically operates on a tape. On this tape are symbols, which the machine can read and write, one at a time, using a tape head. Operation is fully determined by a finite set of elementary instructions such as "in state 42, if

9701-415: The maximum amount of resources that the most efficient algorithm takes to solve them. More specifically, complexity classes are concerned with the rate of growth in the resources required to solve particular computational problems as the input size increases. For example, the amount of time it takes to solve problems in the complexity class P grows at a polynomial rate as the input size increases, which

9810-403: The most efficient algorithm for solving this problem runs in polynomial time then the inherent time complexity of that problem is better described as polynomial. The time complexity of an algorithm with respect to the Turing machine model is the number of steps it takes for a Turing machine to run an algorithm on a given input size. Formally, the time complexity for an algorithm implemented with

9919-434: The notion of a problem being at least as difficult as another problem. Thus we are generally interested in using a polynomial-time reduction, since any problem X {\displaystyle X} that can be efficiently reduced to another problem Y {\displaystyle Y} is no more difficult than Y {\displaystyle Y} . Formally, a problem X {\displaystyle X}

10028-505: The polynomials are the smallest class that ensures composition of "efficient algorithms". (Note that the definition of P is also useful because, empirically, almost all problems in P that are practically useful do in fact have low order polynomial runtimes, and almost all problems outside of P that are practically useful do not have any known algorithms with small exponential runtimes, i.e. with O ( c n ) {\displaystyle O(c^{n})} runtimes where c

10137-450: The problem is in P ). However, the overwhelming majority of computer scientists believe that P ≠ N P {\displaystyle {\mathsf {P}}\neq {\mathsf {NP}}} , and most cryptographic schemes employed today rely on the assumption that P ≠ N P {\displaystyle {\mathsf {P}}\neq {\mathsf {NP}}} . EXPTIME (sometimes shortened to EXP )

10246-497: The real world (like differences in processor speed) that obstruct an understanding of fundamental principles. The most commonly used computational model is the Turing machine . While other models exist and many complexity classes are defined in terms of them (see section "Other models of computation" ), the Turing machine is used to define most basic complexity classes. With the Turing machine, instead of using standard units of time like

10355-423: The relationships between complexity classes is a major area of research in theoretical computer science. There are often general hierarchies of complexity classes; for example, it is known that a number of fundamental time and space complexity classes relate to each other in the following way: L ⊆ NL ⊆ P ⊆ NP ⊆ PSPACE ⊆ EXPTIME ⊆ NEXPTIME ⊆ EXPSPACE (where ⊆ denotes

10464-462: The same cell, and moves the head one step to the left or the right, or halts the computation. The choice of which replacement symbol to write, which direction to move the head, and whether to halt is based on a finite table that specifies what to do for each combination of the current state and the symbol that is read. Like a real computer program, it is possible for a Turing machine to go into an infinite loop which will never halt. The Turing machine

10573-489: The same computational power as the Turing machine model. Common equivalent models are the multi-tape Turing machine , multi-track Turing machine , machines with input and output, and the non-deterministic Turing machine (NDTM) as opposed to the deterministic Turing machine (DTM) for which the action table has at most one entry for each combination of symbol and state. Read-only, right-moving Turing machines are equivalent to DFAs (as well as NFAs by conversion using

10682-403: The same instruction. In some models, if there is no entry in the table for the current combination of symbol and state, then the machine will halt; other models require all entries to be filled. Every part of the machine (i.e. its state, symbol-collections, and used tape at any given time) and its actions (such as printing, erasing and tape motion) is finite , discrete and distinguishable ; it

10791-407: The second (which make it impossible to disentangle running time from the speed of physical hardware) and standard units of memory like bytes , the notion of time is abstracted as the number of elementary steps that a Turing machine takes to solve a problem and the notion of memory is abstracted as the number of cells that are used on the machine's tape. These are explained in greater detail below. It

10900-415: The second grows considerably faster than the runtime of the first as the input size increases. One might ask whether it would be better to define the class of "efficiently solvable" problems using some smaller polynomial bound, like O ( n 3 ) {\displaystyle O(n^{3})} , rather than all polynomials, which allows for such large discrepancies. It turns out, however, that

11009-649: The set of all polynomials is the smallest class of functions containing the linear functions that is also closed under addition, multiplication, and composition (for instance, O ( n 3 ) ∘ O ( n 2 ) = O ( n 6 ) {\displaystyle O(n^{3})\circ O(n^{2})=O(n^{6})} , which is a polynomial but O ( n 6 ) > O ( n 3 ) {\displaystyle O(n^{6})>O(n^{3})} ). Since we would like composing one efficient algorithm with another efficient algorithm to still be considered efficient,

11118-473: The set of problems that are hard for NP is called the set of NP-hard problems. If a problem X {\displaystyle X} is hard for C and is also in C , then X {\displaystyle X} is said to be complete for C . This means that X {\displaystyle X} is the hardest problem in C (since there could be many problems that are equally hard, more precisely X {\displaystyle X}

11227-754: The space complexity of an algorithm implemented with a Turing machine M {\displaystyle M} is defined as the function s M : N → N {\displaystyle s_{M}:\mathbb {N} \to \mathbb {N} } , where s M ( n ) {\displaystyle s_{M}(n)} is the maximum number of cells that M {\displaystyle M} uses on any input of length n {\displaystyle n} . Complexity classes are often defined using granular sets of complexity classes called DTIME and NTIME (for time complexity) and DSPACE and NSPACE (for space complexity). Using big O notation , they are defined as follows: P

11336-470: The square of a polynomial is still a polynomial) and EXPSPACE = NEXPSPACE (since the square of an exponential is still an exponential). These relationships answer fundamental questions about the power of nondeterminism compared to determinism. Specifically, Savitch's theorem shows that any problem that a nondeterministic Turing machine can solve in polynomial space, a deterministic Turing machine can also solve in polynomial space. Similarly, any problem that

11445-513: The symbol seen is 0, write a 1; if the symbol seen is 1, change into state 17; in state 17, if the symbol seen is 0, write a 1 and change to state 6;" etc. In the original article (" On Computable Numbers, with an Application to the Entscheidungsproblem ", see also references below ), Turing imagines not a mechanism, but a person whom he calls the "computer", who executes these deterministic mechanical rules slavishly (or as Turing puts it, "in

11554-405: The theoretical limits of computing. The Turing machine is capable of processing an unrestricted grammar , which further implies that it is capable of robustly evaluating first-order logic in an infinite number of ways. This is famously demonstrated through lambda calculus . A Turing machine that is able to simulate any other Turing machine is called a universal Turing machine (UTM, or simply

11663-423: The total state as shown here: B 01; the tape has a single 1 on it, but the head is scanning the 0 ("blank") to its left and the state is B . "State" in the context of Turing machines should be clarified as to which is being described: the current instruction, or the list of symbols on the tape together with the current instruction, or the list of symbols on the tape together with the current instruction placed to

11772-428: The total system. What Turing called "the state formula" includes both the current instruction and all the symbols on the tape: Thus the state of progress of the computation at any stage is completely determined by the note of instructions and the symbols on the tape. That is, the state of the system may be described by a single expression (sequence of symbols) consisting of the symbols on the tape followed by Δ (which

11881-457: Was invented in 1936 by Alan Turing , who called it an "a-machine" (automatic machine). It was Turing's doctoral advisor, Alonzo Church , who later coined the term "Turing machine" in a review. With this model, Turing was able to answer two questions in the negative: Thus by providing a mathematical description of a very simple device capable of arbitrary computations, he was able to prove properties of computation in general—and in particular,

#278721