Hubbry Logo
Search problemSearch problemMain
Open search
Search problem
Community hub
Search problem
logo
7 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Search problem
Search problem
from Wikipedia

In computational complexity theory and computability theory, a search problem is a computational problem of finding an admissible answer for a given input value, provided that such an answer exists. In fact, a search problem is specified by a binary relation R where xRy if and only if "y is an admissible answer given x".[note 1] Search problems frequently occur in graph theory and combinatorial optimization, e.g. searching for matchings, optional cliques, and stable sets in a given undirected graph.

An algorithm is said to solve a search problem if, for every input value x, it returns an admissible answer y for x when such an answer exists; otherwise, it returns any appropriate output, e.g. "not found" for x with no such answer.

Definition

[edit]

PlanetMath defines the problem as follows:[1]

If is a binary relation such that and is a Turing machine, then calculates if:[note 2]

  • If is such that there is some such that then accepts with output such that . (there may be multiple , and need only find one of them)
  • If is such that there is no such that then rejects .
Note that the graph of a partial function is a binary relation, and if calculates a partial function then there is at most one possible output.
A can be viewed as a search problem, and a Turing machine which calculates is also said to solve it. Every search problem has a corresponding decision problem, namely
This definition can be generalized to n-ary relations by any suitable encoding which allows multiple strings to be compressed into one string (for instance by listing them consecutively with a delimiter).

See also

[edit]

Notes

[edit]

References

[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
In , particularly and algorithms, a search problem is a computational problem that requires finding a sequence of actions to reach a goal state from an initial state within a defined state space. It formalizes tasks such as pathfinding, planning, and puzzle solving by specifying key components: an initial state, a set of possible actions applicable to states, a transition model that determines the resulting state after an action, a goal test to identify goal states, and optionally a path cost function to evaluate solution quality. Search problems serve as the foundation for various search algorithms, which explore the state space systematically or heuristically to find optimal or feasible solutions. They are central to applications in , game AI, and optimization, where the structure enables analysis of efficiency and completeness.

Definition and Formalism

Core Definition

In , a search problem is a type of computational problem where, given an input instance x{0,1}x \in \{0,1\}^*, the task is to find a corresponding solution y{0,1}y \in \{0,1\}^* (typically of length polynomial in x|x|) that satisfies a specified relation, or determine that no such solution exists. This contrasts with decision problems, which only require determining existence via a yes/no answer, by demanding the explicit output of the solution itself. Search problems are fundamental to understanding the practical , particularly in contexts where verification is easy but discovery is hard. The formulation emphasizes efficient verifiability: for problems in the class FNP, there exists a polynomial-time that, given xx and a candidate yy, checks whether (x,y)(x, y) satisfies the relation. This structure underpins many NP-hard challenges, where solving the search version efficiently would imply P = NP. The concept developed in the 1970s alongside the study of , with early examples drawn from . Search problems can be partial (solutions may not exist for all inputs) or total (solutions always exist), influencing subclasses like TFNP for total functions in FNP. Unlike optimization problems that seek the best solution among many, basic search problems focus on finding any valid , though extensions often incorporate quality measures.

Formal Components

A search problem is formally defined by a R{0,1}×{0,1}R \subseteq \{0,1\}^* \times \{0,1\}^* that is efficiently computable (decidable in polynomial time), along with a pp bounding the solution length. For input xx, a solution is any yy with yp(x)|y| \leq p(|x|) such that (x,y)R(x, y) \in R; if no such yy exists, the problem may require outputting an indicator of non-existence. The input xx represents the problem instance, encoded as a binary string, while the solution yy is the output witness, also binary, encoding the required information (e.g., a satisfying assignment). The relation RR encodes the validity condition, often via a verifier function V(x,y)V(x, y) that runs in polynomial time and accepts if (x,y)R(x, y) \in R. For FNP problems, this verifier is deterministic and polynomial-time. The bound pp ensures solutions remain feasible in size, preventing trivial inflation. In cases where solutions always exist (total search problems), the output is guaranteed; otherwise, algorithms must handle non-solution cases, often via the decision version in NP. Reductions between search and decision problems, such as self-reducibility, allow leveraging oracles for solution construction. For example, in the search version of SAT, xx is a , yy is a variable assignment, and RR checks under that assignment. This framework avoids assumptions of or full inherent in other models, focusing instead on worst-case computational resources for solution finding and verification.

Representation and Modeling

Search problems in are formally represented by a R{0,1}×{0,1}R \subseteq \{0,1\}^* \times \{0,1\}^* that is computable in polynomial time by a deterministic . For an input instance x{0,1}nx \in \{0,1\}^n, a solution yy satisfies (x,y)R(x, y) \in R and has length yp(n)|y| \leq p(n) for some pp. The relation RR encodes the problem's structure, such as verifying a satisfying assignment for a Boolean formula in SAT or a valid coloring for a graph in the graph coloring problem.

State Space

The state space for a search problem refers to the domain of possible instances xx and the corresponding solution space for each xx, which is the set of strings y{0,1}p(n)y \in \{0,1\}^{p(n)} such that (x,y)R(x, y) \in R. This solution space has exponential size 2p(n)2^{p(n)}, reflecting the inherent computational challenge of exhaustive search. In practice, for concrete problems, the state space is modeled more compactly; for example, in SAT, states can represent partial assignments to variables, with the full space being 2m2^m for mm variables, but only satisfying ones are valid solutions. The effective exploration of this space relies on the problem's structure, such as sparsity of solutions or self-reducibility, to avoid enumerating the entire exponential domain. A key aspect is the solution density or the expected number of valid yy per xx, analogous to a in search trees derived from self-reducibility. For NP-hard search problems, the state space's size underscores why polynomial-time solutions are unlikely unless P = NP. Challenges like the "search explosion" arise when attempting to enumerate or sample from large state spaces, similar to but distinct from AI contexts, emphasizing theoretical limits over practical enumeration. For instance, in the search version of 3-SAT, the state space of assignments grows as 2n2^n for nn variables, with verification ensuring only valid ones are accepted.

Actions and Transition Model

Modeling the solution process for search problems often uses self-reducibility, where the search version reduces to polynomially many queries to the decision version. Here, the "state space" is partial solutions, and "actions" correspond to extending the partial solution by setting the next bit or variable. For a state ss (a partial assignment), the actions are assigning 0 or 1 to the next unset variable, leading to successor states ss' via a deterministic transition: T(s,a)=sT(s, a) = s', where a{0,1}a \in \{0,1\} appends the value to ss. The process continues until a full assignment yy is obtained or inconsistency is detected via decision calls. In self-reducible problems like SAT, the transition model is total for applicable actions but may prune branches if a partial assignment renders the unsatisfiable, as checked by the NP . The generates at most two children per state ( 2), forming a of depth equal to the number of variables. This model is reversible, as unsetting a variable returns to the parent state, enabling techniques like recursive querying. For , actions might assign colors to vertices sequentially, with transitions enforcing adjacency constraints via verification. Such modeling highlights how decision oracles facilitate search without explicit enumeration, central to classes like FNP.

Types and Variations

Deterministic vs. Nondeterministic

In , search problems are classified as deterministic or nondeterministic based on the computational resources required to find a solution yy for an input xx such that (x,y)R(x, y) \in R, where RR is the defining relation. Deterministic search problems belong to the FP (function P), consisting of those solvable by a deterministic in polynomial time. These problems allow efficient computation of solutions without nondeterministic choices, assuming the relation RR permits direct polynomial-time resolution. A classic example is the uniform cost search analogue in graphs, such as computing the shortest path in an unweighted graph using , which runs in polynomial time O(V+E)O(|V| + |E|) for sparse graphs. Such problems are in P for their decision versions and extend naturally to search via deterministic algorithms. Nondeterministic search problems, in contrast, fall into the class FNP, the function analogue of NP, where a solution yy (of polynomial length) can be verified in polynomial time given xx, but finding yy may require nondeterministic computation if the problem is hard. Membership in FNP means there exists a polynomial-time verifier for RR, but solving the search version might not be feasible deterministically unless P = NP. The search version of the problem (SAT), requiring a satisfying assignment for a formula if one exists, exemplifies an FNP-complete problem; its decision version is NP-complete, and self-reducibility allows solving the search problem via polynomially many oracle calls to the decision problem. This distinction underscores that while verification is efficient, generation often relies on nondeterminism or in the worst case, highlighting the core challenges in complexity theory. The boundary between and FNP captures the essence of efficient solvability: problems in yield practical algorithms for exact solutions, whereas FNP problems drive research into approximations and heuristics when exact solutions are intractable. Reductions between search and decision problems facilitate studying these classes, with implications for whether NP search problems can be derandomized or approximated.

Total vs. Partial Search Problems

Search problems in FNP can be further varied as partial or total based on whether solutions are guaranteed to exist for every instance. Partial search problems, the general case in FNP, may have instances with no solution yy such that (x,y)R(x, y) \in R; the task is to find yy if it exists or report none. Factoring large integers—finding non-trivial factors of a —is a partial FNP problem, as some numbers (primes) have no such factors, and its hardness underpins like RSA. These problems correspond closely to NP decision versions, where "no" instances are possible. Total search problems, captured by the class TFNP, are a subclass of FNP where a solution is guaranteed for every input xx, eliminating the need to check for existence and focusing purely on computation. TFNP includes problems with combinatorial guarantees, such as parity arguments ensuring solutions in certain structures. A prominent subclass is PPAD (polynomial parity arguments), which addresses fixed-point problems in directed graphs with indegree/outdegree at most 1, where a source-sink pair is known, and another must exist by parity. Finding a Nash equilibrium in a two-player game is PPAD-complete, as shown by reductions from ; solutions can be verified in polynomial time, but no polynomial-time is known as of 2025. Other TFNP subclasses include PPA (polynomial parity arguments for undirected graphs) and PLS (polynomial local search) for optimization landscapes with local minima. This total/partial distinction emphasizes structural promises: partial problems allow "no" answers and relate to , while total problems like those in TFNP avoid checks but remain hard due to the need to locate solutions efficiently. into TFNP subclasses explores whether they contain problems or require exponential time, informing fields like and .

Solution Methods

Search Algorithms Overview

In , algorithms for search problems aim to compute a solution yy such that (x,y)R(x, y) \in R for a given input xx, where RR is the defining relation. For general FNP search problems, exact solutions are not known to be computable in polynomial time unless P = NP. A basic approach is brute-force : generate all possible yy of length polynomial in x|x| and verify each against RR, which requires exponential time in the worst case due to the size of the search . Many natural NP search problems are self-reducible, allowing the search version to be solved via polynomially many queries to a decision for the corresponding NP problem. In self-reducibility, the solution is constructed incrementally: for problems like the search-SAT (finding a satisfying assignment), fix bits of the assignment one by one by querying the decision on whether a solution exists for the current prefix with the next bit set to 0; if affirmative, set it to 0, else to 1. This requires O(x)O(|x|) oracle calls and polynomial time otherwise, reducing search to decision. Similar techniques apply to and other NP-complete search problems. If the decision problem is in P, the search is solvable in . For total search problems in TFNP, where a solution is guaranteed to exist, subclasses have specialized methods. In PPAD, encompassing fixed-point problems like computing equilibria in games, algorithms such as the Lemke-Howson method can find solutions for two-player games, though general PPAD-complete problems resist efficient solving. When exact solutions are intractable, algorithms provide near-solutions, such as approximate equilibria within a small , computable in time for certain parameters. Heuristics and practical solvers, like DPLL-based SAT solvers (e.g., MiniSat), are used for real-world instances despite worst-case hardness.

Evaluation Metrics

Algorithms for search problems are evaluated based on measures, solution guarantees, and practical performance. Time complexity classifies solvability, with for polynomial-time search functions and EXP for brute-force methods. For oracle reductions, query complexity counts decision calls, polynomial in self-reducible cases. evaluates memory, crucial for bounded-resource models like LOGSPACE analogs for search. For approximation and optimization-oriented search problems, the quantifies how close the output is to optimal (e.g., within factor ρ\rho), defining classes like PTAS (polynomial-time approximation schemes). Randomized algorithms are assessed by success probability (e.g., vs. ) and expected runtime, relevant for classes like BPP^NP. Hardness results, such as inapproximability from PCP theorems, set limits on achievable ratios without P=NP implications. Solution quality metrics, like the value of the objective function relative to the optimum CC^*, inform utility in applications. These evaluations drive research into efficient solvers and theoretical barriers.

Applications and Examples

Pathfinding and Navigation

Search problems in computational complexity often arise in graph-theoretic settings, where the input is a graph and the goal is to find a structure satisfying a relation, such as a path or tour. A prominent example is the search version of the traveling salesman problem (TSP), where given a complete weighted graph G=(V,E)G = (V, E) with edge weights representing distances, the task is to find a Hamiltonian cycle (tour visiting each vertex exactly once and returning to the start) of minimum total weight, if one exists with weight below a threshold. This is an FNP search problem, as solutions (tours) can be verified in polynomial time, but finding the optimal is NP-hard. TSP underpins applications in and route optimization, where exact solutions are intractable for large instances (e.g., thousands of cities), leading to algorithms or heuristics in practice. Another key example is the : given a GG, find a path visiting each vertex exactly once, or determine none exists. This search problem is NP-complete in its decision version and belongs to FNP, with applications in scheduling (e.g., ordering tasks with precedence constraints) and network design (e.g., sequencing routes in communication networks). Unlike polynomial-time solvable shortest-path problems (e.g., via in P), Hamiltonian path highlights the hardness of exact "navigation" in complex graphs, motivating reductions from other NP problems. In navigation-like scenarios, such as , the search problem generalizes to the (VRP), where multiple vehicles must serve customers from a depot while minimizing total distance. The relation R defines valid routes satisfying capacity and time constraints; finding such routes is FNP-hard, with real-world use in and , where combinatorial explosion limits exact solutions to small instances (e.g., <50 customers).

Puzzle and Game Solving

Combinatorial puzzles often formalize as search problems in FNP, requiring a configuration (solution y) satisfying constraints for input puzzle x. The satisfiability (SAT) problem exemplifies this: given a Boolean formula φ in , find an assignment to variables making φ true, if possible. Here, R(φ, a) holds if a is a satisfying assignment, verifiable in polynomial time. SAT search is complete for FNP under parsimonious reductions and models puzzle-solving like logic grid puzzles or Sudoku (reducible to SAT), with applications in verification (e.g., checking hardware designs for bugs) and AI . As of 2025, SAT solvers handle industrial instances with millions of clauses using heuristics, but worst-case exponential time underscores P vs. NP implications. Graph coloring extends this to puzzles like : given graph G and integer k, find a k-coloring c: V → {1,...,k} such that no adjacent vertices share colors. The 3-coloring search problem is FNP-complete, used in scheduling (assigning resources without conflicts) and in compilers. Solutions exist for bipartite graphs (k=2, in P), but general k=3 is hard, illustrating how puzzle solvability ties to complexity classes. In , search problems capture strategic reasoning. The problem, in PPAD ⊆ TFNP, requires finding a mixed-strategy profile (probabilities over actions) for a finite game where no player benefits from unilateral deviation. For input game matrix x, output y such that R(x,y) (equilibrium condition) holds; solutions always exist by Nash's theorem, but computing approximate equilibria is PPAD-complete. Applications include auction design, , and , where finding equilibria aids in predicting outcomes in economic models or network formation. As of 2025, no polynomial-time algorithm exists, with quantum approaches explored but unproven. Another TFNP example is : given composite N, find nontrivial factors p,q such that N = p·q. Verifiable in polynomial time, it's total (always solvable) and believed hard, forming the basis of RSA cryptography for secure communication (e.g., ). Quantum algorithms like Shor's (1994) solve it in polynomial time on quantum computers, but as of 2025, no large-scale quantum threat exists, preserving classical hardness assumptions.

Complexity Analysis

Computational Complexity

Search problems in theory are analyzed through function complexity classes that extend decision classes like NP. The class FNP includes search problems where, given an input xx and proposed solution yy, there exists a polynomial-time verifier confirming (x,y)R(x, y) \in R. This mirrors NP but requires constructing yy rather than deciding existence. If the corresponding (existence of yy) is in , the search problem is in FP, solvable in polynomial time by a deterministic . A key subclass is TFNP, comprising total search problems in FNP where a solution is guaranteed for every input, based on combinatorial principles ensuring existence (e.g., via fixed-point theorems). TFNP has natural subclasses capturing specific totality arguments: PPAD for polynomial-time problems related to directed graphs with unequal in/out-degrees (e.g., finding Brouwer fixed points or approximate Nash equilibria in games); PPA for parity arguments in undirected graphs; and others like PPP and PLS for potential maximization. These classes are believed incomparable, with no known complete problems under standard assumptions, highlighting the nuanced hardness within TFNP. Hardness for search problems often follows from decision versions via . A search problem is NP-hard if every NP decision problem reduces to it in polynomial time, implying P = NP if solvable in polynomial time. For instance, the search-SAT problem (finding a satisfying assignment) is NP-hard by parsimonious reductions from decision-SAT. Many NP search problems are self-reducible, allowing solution via polynomially many queries to the decision : for SAT, fix variables one by one, checking satisfiability after each. This technique extends to problems like . Search problems can also be complete for higher classes, such as PSPACE, where the Quantified Boolean Formulas (QBF) search variant requires finding satisfying assignments to alternating quantifier formulas, hard even with polynomial space.

Practical Challenges

The intractability of NP-hard and TFNP-complete search problems poses challenges in applications requiring exact solutions, such as (e.g., as a search problem) and optimization (e.g., TSP tour finding). To address this, approximation algorithms seek solutions within a guaranteed factor of optimality; for example, Christofides' 1.5-approximation for metric TSP, though the general case resists constant-factor approximation unless P = NP. Parameterized complexity fixes parameters beyond input size (e.g., in graph problems), yielding fixed-parameter tractable (FPT) algorithms like O(2^w n) for on graphs of treewidth w, where n is input size. These mitigate hardness for restricted instances common in practice, such as logistics routing or . Proving hardness for search problems often requires novel reductions, as totality in TFNP complicates standard NP techniques; for PPAD, reductions from End-of-the-Line preserve approximate solutions. Recent results (as of 2023) show fine-grained hardness, linking PPAD to algebraic problems like finding short vector lattices, impacting . Challenges include distinguishing average-case from worst-case hardness, with random self-reducibility enabling derandomization for some problems. In real-world deployment, hybrid approaches combine exact solvers for small instances with heuristics, but verifying approximation ratios remains computationally intensive.
Add your contribution
Related Hubs
User Avatar
No comments yet.