In computability theory, a decision problem is a computational question that requires a yes-or-no answer, typically phrased as whether a given input satisfies a specified property or belongs to a particular set, and is formally analyzed to determine if an algorithm can solve it for all possible inputs.[1] These problems form the foundation of studying what can and cannot be computed algorithmically, distinguishing between decidable problems (solvable by a Turing machine that always halts with the correct answer) and undecidable ones (no such algorithm exists).[2]The origins of decision problems trace back to David Hilbert's 1928 lecture, where he posed the Entscheidungsproblem (decision problem) as a challenge to find a mechanical procedure for verifying the provability of any statement in first-order predicate logic, as part of his broader program to formalize mathematics.[3] In 1936, Alan Turing resolved this negatively by introducing Turing machines—a formal model of computation consisting of an infinite tape, a reading/writing head, and a finite set of states—and using a diagonalization argument to prove that no general decision procedure exists for the Entscheidungsproblem, as it would imply solving the undecidable halting problem.[3] Independently, Alonzo Church developed lambda calculus and showed the same result, establishing the Church-Turing thesis that equates effective computability with Turing machine solvability.[2]Key examples of decision problems include the halting problem, which asks whether a Turing machine will halt (terminate) on a given input, proven undecidable by Turing through a self-referential contradiction; this demonstrates inherent limits on algorithmic prediction of program behavior.[3] Other notable undecidable problems are Hilbert's tenth problem (determining solvability of Diophantine equations, resolved negatively in 1970 by Yuri Matiyasevich building on earlier work) and the word problem for groups (whether two words in a finitely presented group represent the same element).[2] Decision problems also underpin computational complexity theory, where solvable ones are classified by resources like time (e.g., P vs. NP) and space, influencing fields from software verification to artificial intelligence.[1]
Fundamentals
Definition
In computability theory and computational complexity theory, a decision problem is a question posed within a formal language, where the input consists of a finite string over a finite alphabet, and the expected output is a binary answer of "yes" or "no" indicating whether the input satisfies a specified property.[4] This formulation ensures that decision problems are precisely defined, allowing for the study of algorithmic solvability without ambiguity in the response format.[5]Formally, a decision problem D is represented as a subset of \Sigma^*, the set of all finite strings over a finite alphabet \Sigma, where membership in D corresponds to the "yes" instances of the problem, and non-membership to the "no" instances.[4] This set-theoretic view aligns decision problems with the recognition of formal languages, facilitating analysis via models like Turing machines, which accept or reject inputs to decide membership.[4]Unlike general computational problems, which may produce multi-valued outputs, continuous results, or require constructing solutions, decision problems are restricted to binary outcomes, enabling focused investigations into decidability and resource bounds.[5] The concept was introduced in the 1930s by Alonzo Church and Alan Turing as part of their work on the Entscheidungsproblem, Hilbert's challenge to determine the provability of mathematical statements algorithmically.[3] Understanding decision problems presupposes familiarity with formal languages, where inputs are encoded as strings, and basic computability notions, such as algorithmic procedures for verification.[4]
Examples
One prominent example of a decision problem is the halting problem, which asks whether a given Turing machine will halt (i.e., terminate) on a specified input.[3] In this formulation, the input consists of a description of the Turing machine and its initial tape contents, and the expected output is yes if the machine eventually stops and no otherwise.[3]Another classic instance arises in number theory: primality testing, which determines whether a given positive integer n > 1 is a prime number.[6] Here, the input is the integer n, and the answer is yes if n has no positive divisors other than 1 and itself, and no otherwise; while decidable, this problem posed significant computational challenges historically due to the need for efficient algorithms.[6]In mathematical logic, the validity problem for first-order logic asks whether a given formula is true in every possible model (structure interpreting the language).[3] The input is the first-orderformula, and the output is yes if it is valid (a tautology in all interpretations) and no if there exists a counter-model.[3] This formulation, known as the Entscheidungsproblem, exemplifies decision problems in formal systems.[3]From graph theory, the Hamiltonian cycle problem inquires whether an undirected graph contains a cycle that visits each vertex exactly once and returns to the starting vertex.[7] The input is the graph's vertex and edge sets, with yes if such a cycle exists and no otherwise.[7]These examples, drawn from computability, arithmetic, logic, and graph theory, demonstrate the breadth of decision problems as yes/no questions about specific instances.[3][6][7]
Decidability
Decidable Problems
A decision problem is decidable if there exists a Turing machine that, given any input, halts in finite time and outputs the correct yes or no answer for every possible instance of the problem.[8] This means the algorithm terminates with acceptance for yes-instances and rejection for no-instances, without looping indefinitely.The Church-Turing thesis provides the foundational justification for using Turing machines as the standard model of computation in this context; it informally asserts that any function that can be effectively computed by a human following an algorithm can be computed by a Turing machine.[9] Under this thesis, decidability captures all problems solvable by mechanical procedures.To prove that a decision problem is decidable, one common method is direct construction of an algorithm, such as the AKS primality test, which determines whether a given integer greater than 1 is prime in deterministic polynomial time.[10] Another approach is reduction: if a problem can be transformed in polynomial time to another known decidable problem, then it is also decidable, preserving the halting guarantee.A classic example is the acceptance problem for finite automata: given a deterministic finite automaton and a string, it is decidable whether the automaton accepts the string, since the finite state space allows simulation in linear time relative to the input length, and regular languages are precisely those recognized by such automata.[11]Rice's theorem states that every non-trivial semantic property of the languages recognized by Turing machines is undecidable. Trivial properties—those that either all or no such languages satisfy—are decidable, since the answer is independent of the specific machine.[12]All decidable problems are computable, meaning they correspond to total recursive functions that halt on every input, though the runtime can range from constant to highly inefficient, depending on the problem.[13] In contrast to undecidable problems like the halting problem, decidable ones guarantee termination and correctness for all inputs.
Undecidable Problems
A decision problem is undecidable if no Turing machine exists that halts on every input and correctly outputs yes or no according to whether the input satisfies the problem's condition; on some inputs, any such machine must either give an incorrect answer or run indefinitely.[3] This notion captures the fundamental limits of algorithmic solvability, distinguishing undecidability from mere computational inefficiency.[3]The halting problem exemplifies undecidability: given a description of a Turing machine and an input, determine whether the machine halts on that input. Alan Turing proved its undecidability in 1936 using a diagonalization argument. Suppose a hypothetical halting oracle H(M, i) exists that decides if machine M halts on input i. Construct a machine D that, on input e (encoding machine M_e), simulates H(M_e, e): if H says yes, D loops forever; if no, D halts. Now apply D to its own encoding: if H(D, e) says yes (meaning D halts on e), then D loops, a contradiction; if no, D halts, another contradiction. Thus, no such H exists.[3]Rice's theorem, proved by Henry Gordon Rice in 1953, provides a broad class of undecidable problems. It states that for any non-trivial semantic property P of the language recognized by Turing machines—meaning P holds for some but not all such languages—the problem of deciding whether a given Turing machine recognizes a language in P is undecidable. The proof reduces the halting problem to membership in P by constructing machines that append irrelevant computations to known halting or non-halting behaviors while preserving the property. This theorem implies that properties like "does the machine accept any string?" or "is the language regular?" (for Turing machines) are undecidable, except for trivial cases like always accepting the empty language.Alonzo Church independently showed in 1936 that the Entscheidungsproblem—determining whether a first-order logic formula is provable from given axioms—is undecidable, using the lambda calculus to encode computations and reducing it to his earlier result on the unsolvability of an analogous number-theoretic problem.[14] Similarly, Emil Post demonstrated in 1946 that the Post correspondence problem is undecidable: given pairs of strings over an alphabet, decide if there exists a sequence of indices such that the concatenations from the top and bottom rows match. The proof reduces the halting problem to PCP by encoding machine simulations into string matches, where a solution corresponds to a halting computation.These undecidability results impose strict limits on formal verification and program analysis in software engineering, as no general algorithm can prove arbitrary properties of programs, requiring instead domain-specific approximations, bounded checks, or manual proofs to mitigate risks in critical systems.[15]
Complexity Aspects
Complexity Classes
Decidable decision problems are classified into complexity classes based on the computational resources required to solve them, primarily time and space bounds on Turing machines. The class \mathsf{DTIME}(f(n)) consists of all decision problems solvable by a deterministic Turing machine in at most O(f(n)) time steps on inputs of length n [16]. Similarly, \mathsf{DSPACE}(f(n)) includes problems solvable using O(f(n)) space[16]. These classes form the foundation of resource-bounded computation, distinguishing problems by efficiency rather than mere decidability.Key complexity classes for polynomial resources include \mathsf{P}, the union over k \geq 1 of \mathsf{DTIME}(n^k), capturing problems solvable in polynomial time [17]. The class \mathsf{NP} comprises problems where "yes" instances have polynomial-time verifiable certificates using nondeterministic Turing machines, formally the union over k \geq 1 of \mathsf{NTIME}(n^k) [17]. \mathsf{PSPACE} is the union over k \geq 1 of \mathsf{DSPACE}(n^k), encompassing problems solvable with polynomial space, potentially requiring exponential time [16]. These classes highlight trade-offs, such as \mathsf{P} \subseteq \mathsf{NP} \subseteq \mathsf{PSPACE}, with open questions like whether \mathsf{P} = \mathsf{NP}.Hierarchy theorems establish strict separations within these frameworks. The time hierarchy theorem proves that for suitable f(n), \mathsf{DTIME}(f(n)) \subsetneq \mathsf{DTIME}(f(n)^2), demonstrating that more time allows solving strictly harder problems [16]. Analogous space hierarchy theorems show \mathsf{[DSPACE](/page/DSpace)}(f(n)) \subsetneq \mathsf{[DSPACE](/page/DSpace)}(f(n) \log f(n)) for space-constructible f(n) [16]. These results imply infinite strict inclusions, such as \mathsf{[P](/page/P′′)} \subsetneq \mathsf{[EXP](/page/Exp)}.Oracle machines extend Turing machines with access to an oracle for a fixed language, enabling relative computations between classes. The seminal relativization results construct oracles A and B such that \mathsf{P}^A = \mathsf{NP}^A relative to A, but \mathsf{P}^B \neq \mathsf{NP}^B relative to B, indicating that relativizing proof techniques cannot resolve \mathsf{P} vs. \mathsf{NP} [18]. Such separations underscore limitations in diagonalization methods for class equalities.Modern extensions incorporate alternative computational models, such as quantum Turing machines. The class \mathsf{[BQP](/page/BQP)} includes decision problems solvable with bounded error by a quantum Turing machine in polynomial time, potentially offering speedups over classical classes for certain problems like factoring [19]. Undecidability marks the boundary beyond which no recursive complexity class can reach, as undecidable problems evade all resource bounds.
Complete Problems
In computational complexity theory, a decision problem is said to be complete for a complexity class if it belongs to the class and every problem in that class can be reduced to it in polynomial time, making it a "hardest" problem within the class that serves as a benchmark for studying the class's properties. This notion of completeness was formalized by Stephen Cook in 1971, who introduced Cook-Turing completeness using polynomial-time many-one reductions for the class NP, demonstrating that the Boolean satisfiability problem (SAT) is NP-complete.[17] These reductions preserve membership: an instance of a problem A reduces to an instance of B if solving B allows solving A in polynomial time, establishing equivalence in hardness.The canonical NP-complete problem is SAT, which asks whether there exists an assignment of truth values to variables in a Boolean formula that makes the formula true. Cook proved SAT's NP-completeness by showing that any nondeterministic Turing machine verification problem reduces to SAT via a polynomial-time many-one reduction that constructs a formula encoding the machine's computation path.[17] A restricted variant, 3-SAT, limits clauses to exactly three literals and is also NP-complete; Richard Karp demonstrated this in 1972 by providing a polynomial-time many-one reduction from general SAT to 3-SAT, which introduces auxiliary variables to break larger clauses into conjunctions of three-literal clauses without altering satisfiability.[7] This makes 3-SAT a standard example due to its simplicity and frequent use in algorithms and proofs.Karp reductions, also known as polynomial-time many-one reductions, extend Cook's framework by showing that numerous combinatorial problems—such as the traveling salesman problem and graph coloring—are NP-complete through chains of such reductions from SAT, highlighting the broad applicability of completeness in unifying disparate hard problems.[7] For other classes, completeness follows analogous definitions: the quantified Boolean formulas (QBF) problem, which determines the truth value of a Boolean formula with alternating quantifiers over all variables, is PSPACE-complete, as shown by Larry Stockmeyer and Albert Meyer in 1973 via reductions that encode alternating Turing machine computations.[20] Similarly, EXP-complete problems include those like the acceptance problem for deterministic Turing machines bounded by exponential time, where hardness arises from reductions encoding computations that require exponential resources.The implications of completeness are profound: if any NP-complete problem like SAT lies in P, then the entire NP class equals P, collapsing the hierarchy and resolving the P=NP conjecture in the affirmative, a central open question in the field since Cook's work.[17] This property holds generally for complete problems in other classes, such as PSPACE or EXP, where solvability in a lower class would imply class equalities.
Related Problem Types
Function Problems
In computability theory, a function problem consists of specifying a function f that maps inputs from a domain (typically strings or natural numbers) to outputs (such as strings, numbers, or tuples), where the task is to compute f(x) for a given input x. A function problem is computable if there exists a Turing machine that, on input x, halts and produces the correct output f(x) whenever x is in the domain of f.[3] This definition extends the notion of decision problems, which are special cases of function problems where the output is restricted to a binary value (yes or no, often encoded as 0 or 1).[21]Function problems may be partial, meaning f(x) is defined only for some inputs, or total, meaning f is defined for all inputs in the domain. For partial functions, the corresponding Turing machine must halt on inputs where f is defined but may loop indefinitely otherwise. Total computable functions correspond to those computable by Turing machines that always halt, forming the class of total recursive functions.[22]Classic examples illustrate the distinction. In integer factorization, the function problem requires outputting the prime factors of a given composite number n > 1, which is computable via exhaustive search but practically challenging for large n. For the traveling salesman problem, the function version outputs the length of the shortest tour visiting all cities in a given weighted graph, again computable but resource-intensive. These examples highlight how function problems demand producing explicit outputs, unlike their decision counterparts (e.g., "does n have a factor less than k?").[23]The theoretical foundation for computable function problems lies in recursive function theory. Stephen Kleene formalized general recursive functions in the 1930s as those obtainable from basic functions (zero, successor, and projections) via composition, primitive recursion, and minimization, showing equivalence to Turing computability. Primitive recursive functions form a proper subclass, defined similarly but without minimization, ensuring total computability and capturing many intuitive arithmetic operations, as introduced by Kurt Gödel.[22]In modern applications, particularly cryptography, function problems appear as one-way functions: total computable functions f that are easy to evaluate but computationally infeasible to invert on average (i.e., finding x given f(x) is hard). Such functions underpin public-key cryptography, assuming their existence enables secure systems like key exchange protocols.[24]
Optimization Problems
Optimization problems seek to find the best solution from a set of feasible solutions according to a specified objective function, such as minimizing cost or maximizing efficiency, in contrast to decision problems that only require a yes/no answer regarding the existence of a solution satisfying certain conditions.[25] These problems arise in fields like operations research and computer science, where the goal is to optimize a measure over a combinatorial structure.[26]In computational complexity theory, optimization problems are frequently studied via their corresponding decision versions to classify hardness, as decision problems provide a cleaner framework for defining classes like NP. The decision version of an optimization problem typically asks whether there exists a feasible solution whose objective value meets or exceeds a given threshold, such as "is there a solution with cost at most k?". Solving the decision problem in polynomial time often allows solving the optimization problem in polynomial time via binary search over possible thresholds, establishing their equivalence in complexity up to polynomial factors.[27][26]A classic example is the Traveling Salesman Problem (TSP), where the optimization variant requires finding the shortest Hamiltonian cycle in a weighted graph, while the decision variant queries whether a cycle of length at most k exists; the latter was proven NP-complete by reduction from the Hamiltonian Cycle problem. Similarly, the Knapsack Problem optimizes the maximum value under weight constraints, with its decision version—does a subset exist with value at least v and weight at most w?—also NP-complete. When the decision version is NP-complete, the optimization problem is NP-hard, implying no efficient exact algorithm exists unless P = NP, motivating approximation algorithms and heuristics for practical instances.[25]