In computational complexity theory , co-NP is a complexity class . A decision problem X is a member of co-NP if and only if its complement X is in the complexity class NP . The class can be defined as follows: a decision problem is in co-NP if and only if for every no -instance we have a polynomial-length " certificate " and there is a polynomial-time algorithm that can be used to verify any purported certificate.
51-420: That is, co-NP is the set of decision problems where there exists a polynomial p ( n ) {\displaystyle p(n)} and a polynomial-time bounded Turing machine M such that for every instance x , x is a no -instance if and only if: for some possible certificate c of length bounded by p ( n ) {\displaystyle p(n)} ,
102-883: A non-deterministic Turing machine that decides its complement in polynomial time; i.e., NP ⊆ co-NP {\displaystyle {\textsf {NP}}\subseteq {\textsf {co-NP}}} . From this, it follows that the set of complements of the problems in NP is a subset of the set of complements of the problems in co-NP; i.e., co-NP ⊆ NP {\displaystyle {\textsf {co-NP}}\subseteq {\textsf {NP}}} . Thus co-NP = NP {\displaystyle {\textsf {co-NP}}={\textsf {NP}}} . The proof that no co-NP-complete problem can be in NP if NP ≠ co-NP {\displaystyle {\textsf {NP}}\neq {\textsf {co-NP}}}
153-582: A quantum computer , is not contained in PH . P = NP if and only if P = PH . This may simplify a potential proof of P ≠ NP , since it is only necessary to separate P from the more general class PH . PH is a subset of P = P by Toda's theorem ; the class of problems that are decidable by a polynomial time Turing machine with access to a #P or equivalently PP oracle ), and also in PSPACE . This theoretical computer science –related article
204-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
255-400: A Boolean formula, is it satisfiable (is there a possible input for which the formula outputs true)? The complementary problem asks: "given a Boolean formula, is it unsatisfiable (do all possible inputs to the formula output false)?". Since this is the complement of the satisfiability problem, a certificate for a no -instance is the same as for a yes -instance from the original NP problem:
306-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
357-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
408-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
459-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
510-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
561-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
SECTION 10
#1733094087220612-430: A formula in propositional logic is a tautology is co-NP-complete: that is, if the formula evaluates to true under every possible assignment to its variables. P , the class of polynomial time solvable problems, is a subset of both NP and co-NP. P is thought to be a strict subset in both cases. Because P is closed under complementation, and NP and co-NP are complementary, it cannot be strict in one case and not strict in
663-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
714-458: A set of Boolean variable assignments which make the formula true. On the other hand, a certificate of a yes -instance for the complementary problem (whatever form it might take) would be equally as complex as for the no -instance of the original NP satisfiability problem. A problem L is co-NP-complete if and only if L is in co-NP and for any problem in co-NP, there exists a polynomial-time reduction from that problem to L . Determining if
765-498: A simple logical characterization : it is the set of languages expressible by second-order logic . PH contains almost all well-known complexity classes inside PSPACE ; in particular, it contains P , NP , and co-NP . It even contains probabilistic classes such as BPP (this is the Sipser–Lautemann theorem ) and RP . However, there is some evidence that BQP , the class of problems solvable in polynomial time by
816-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
867-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
918-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
969-405: 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 a single symbol drawn from a finite set of symbols called
1020-545: Is also straightforward: one can just list the prime factors of m , all greater or equal to n , which the verifier can confirm to be valid by multiplication and the AKS primality test . It is presently not known whether there is a polynomial-time algorithm for factorization, equivalently that integer factorization is in P, and hence this example is interesting as one of the most natural problems known to be in NP and co-NP but not known to be in P. Turing machine A Turing machine
1071-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
SECTION 20
#17330940872201122-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
1173-491: 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
1224-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
1275-477: Is symmetrical. co-NP is a subset of PH , which itself is a subset of PSPACE . An example of a problem that is known to belong to both NP and co-NP (but not known to be in P) is Integer factorization : given positive integers m and n , determine if m has a factor less than n and greater than one. Membership in NP is clear; if m does have such a factor, then the factor itself is a certificate. Membership in co-NP
1326-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
1377-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
1428-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
1479-408: 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 the same cell, and moves the head one step to the left or
1530-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
1581-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
co-NP - Misplaced Pages Continue
1632-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
1683-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
1734-472: The Turing machine M accepts the pair ( x , c ) . While an NP problem asks whether a given instance is a yes -instance, its complement asks whether an instance is a no -instance, which means the complement is in co-NP. Any yes -instance for the original NP problem becomes a no -instance for its complement, and vice versa. An example of an NP-complete problem is the Boolean satisfiability problem : given
1785-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
1836-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
1887-402: The compiled programs executable on a real computer cannot. PH (complexity) In computational complexity theory , the complexity class PH is the union of all complexity classes in the polynomial hierarchy : PH was first defined by Larry Stockmeyer . It is a special case of hierarchy of bounded alternating Turing machine . It is contained in P = P and PSPACE . PH has
1938-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
1989-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
2040-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
2091-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
co-NP - Misplaced Pages Continue
2142-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
2193-445: The other: if P equals NP, it must also equal co-NP, and vice versa. NP and co-NP are also thought to be unequal. If so, then no NP-complete problem can be in co-NP and no co-NP-complete problem can be in NP. This can be shown as follows. Suppose for the sake of contradiction there exists an NP-complete problem X that is in co-NP. Since all problems in NP can be reduced to X , it follows that for every problem in NP, we can construct
2244-404: 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
2295-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
2346-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
2397-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
2448-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
2499-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
2550-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
2601-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,
SECTION 50
#1733094087220#219780