encyclopegia.org

Search algorithm

, a data structure that allows for fast retrieval of information In computer science, a search algorithm is an algorithm designed to solve a search problem. Search algorithms work to retrieve information stored within a particular data structure, or calculated in the search space of a problem domain, with either discrete or continuous values. Although search engines use search algorithms, they belong to the study of information retrieval, not algorithmics. The appropriate search algorithm to use often depends on the data structure being searched, and may also include prior knowledge about the data. Search algorithms can be made faster or more efficient by specially constructed database structures, such as search trees, hash maps, and database indexes. Search algorithms can be classified based on their mechanism of searching into three types of algorithms: linear, binary, and hashing. Linear search algorithms check every record for the one associated with a target key in a linear fashion. Binary, or half-interval, searches repeatedly target the center of the search structure and divide the search space in half. Comparison search algorithms improve on linear searching by successively eliminating records based on comparisons of the keys until the target record is found, and can be applied on data structures with a defined order.…

, a data structure that allows for fast retrieval of information In computer science, a search algorithm is an algorithm designed to solve a search problem. Search algorithms work to retrieve information stored within a particular data structure, or calculated in the search space of a problem domain, with either discrete or continuous values. Although search engines use search algorithms, they belong to the study of information retrieval, not algorithmics. The appropriate search algorithm to use often depends on the data structure being searched, and may also include prior knowledge about the data. Search algorithms can be made faster or more efficient by specially constructed database structures, such as search trees, hash maps, and database indexes. Search algorithms can be classified based on their mechanism of searching into three types of algorithms: linear, binary, and hashing. Linear search algorithms check every record for the one associated with a target key in a linear fashion. Binary, or half-interval, searches repeatedly target the center of the search structure and divide the search space in half. Comparison search algorithms improve on linear searching by successively eliminating records based on comparisons of the keys until the target record is found, and can be applied on data structures with a defined order. Digital search algorithms work based on the properties of digits in data structures by using numerical keys. Finally, hashing directly maps keys to records based on a hash function. Algorithms are often evaluated by their computational complexity, or maximum theoretical run time. Binary search functions, for example, have a maximum complexity of , or logarithmic time. In simple terms, the maximum number of operations needed to find the search target is a logarithmic function of the size of the search space. ==Classes== ===For virtual search spaces=== Algorithms for searching virtual spaces are used in the constraint satisfaction problem, where the goal is to find a set of value assignments to certain variables that will satisfy specific mathematical equations and inequations / equalities. They are also used when the goal is to find a variable assignment that will maximize or minimize a certain function of those variables. Algorithms for these problems include the basic brute-force search (also called "naïve" or "uninformed" search), and a variety of heuristics that try to exploit partial knowledge about the structure of this space, such as linear relaxation, constraint generation, and constraint propagation. An important subclass are the local search algorithms that view the elements of the search space as the vertices of a graph, with edges defined by a set of heuristics applicable to the case; and scan the space by moving from item to item along the edges, for example according to the steepest descent or best-first criterion, or in a stochastic search. This category includes a great variety of general metaheuristic methods, such as simulated annealing, tabu search, A-teams, and genetic programming, that combine arbitrary heuristics in specific ways. The opposite of local search would be global search methods. This method is applicable when the search space is not limited and all aspects of the given network are available to the entity running the search algorithm. tree search algorithms are local graph search algorithms designed to work efficiently on directed acyclic graphs with a single root or starting node (trees). Tree search algorithms traverse the nodes of a tree in a particular order prescribed by an algorithm designed for a particular application. Examples of tree search algorithms include exhaustive methods such as depth-first search and breadth-first search, as well as heuristic-based search tree pruning algorithms such as backtracking, branch and bound and alpha-beta_pruning. Unlike metaheuristic algorithms, which may only prescribe a traversal order that is best in some probabilistic sense, many tree-search methods are guaranteed to find the exact optimal solution, if given enough time. In mathematics and logic, this is called a "completeness" guarantee. Another important sub-class consists of algorithms for exploring the game tree of multiple-player games, such as chess or backgammon, whose nodes consist of all possible game situations that could result from the current situation. The goal in these problems is to find the move that provides the best chance of a win, taking into account all possible moves of the opponent(s). Similar problems occur when humans or machines have to make successive decisions whose outcomes are not entirely under one's control, such as in robot guidance or in marketing, financial, or military strategy planning. This kind of problem — combinatorial search — has been extensively studied in the context of artificial intelligence. Examples of algorithms for this class are the minimax algorithm, alpha–beta pruning, and the A* algorithm and its variants. ===For sub-structures of a given structure=== An important and extensively studied subclass are the graph algorithms, in particular graph traversal algorithms, for finding specific sub-structures in a given graph — such as subgraphs, paths, circuits, and so on. Examples include Dijkstra's algorithm, Kruskal's algorithm, the nearest neighbour algorithm, and Prim's algorithm. Another important subclass of this category are the string searching algorithms, that search for patterns within strings. Two famous examples are the Boyer–Moore and Knuth–Morris–Pratt algorithms, and several algorithms based on the suffix tree data structure. ===Search for the maximum of a function=== In 1953, American statistician Jack Kiefer devised Fibonacci search which can be used to find the maximum of a unimodal function and has many other applications in computer science. ===For quantum computers=== There are also search methods designed for quantum computers, like Grover's algorithm, that are theoretically faster than linear or brute-force search even without the help of data structures or heuristics. While the ideas and applications behind quantum computers are still entirely theoretical, studies have been conducted with algorithms like Grover's that accurately replicate the hypothetical physical versions of quantum computing systems. ==See also== hardware , also use statistical methods to rank results in very large data sets , necessary for executing certain search algorithms Categories: :Category:Search algorithms ==References== ===Citations=== ===Bibliography=== ====Books==== ====Articles==== ==External links== Uninformed Search Project at the Wikiversity.

References

  1. Asynchronous Teams: Cooperation Schemes for Autonomous Agents · retrieved 2026-11-20 · rev 1376670198
    Cite this reference

    MLA "Asynchronous Teams: Cooperation Schemes for Autonomous Agents." Talukdar, Sarosh; Baerentzen, Lars; Gove, Andrew; De Souza, Pedro (1998-12-01). 2026-11-20. https://en.wikipedia.org/wiki/Doi_(identifier). Accessed 24 November 2026.

    Chicago "Asynchronous Teams: Cooperation Schemes for Autonomous Agents." Talukdar, Sarosh; Baerentzen, Lars; Gove, Andrew; De Souza, Pedro (1998-12-01). 2026-11-20. https://en.wikipedia.org/wiki/Doi_(identifier).

    APA Talukdar, Sarosh; Baerentzen, Lars; Gove, Andrew; De Souza, Pedro (1998-12-01). (2026). Asynchronous Teams: Cooperation Schemes for Autonomous Agents. Retrieved November 24, 2026, from https://en.wikipedia.org/wiki/Doi_(identifier)

  2. Local versus global search in channel graphs · retrieved 2026-11-20 · rev 1376670198
    Cite this reference

    MLA "Local versus global search in channel graphs." Hunter, A. 2026-11-20. https://en.wikipedia.org/wiki/ArXiv_(identifier). Accessed 24 November 2026.

    Chicago "Local versus global search in channel graphs." Hunter, A. 2026-11-20. https://en.wikipedia.org/wiki/ArXiv_(identifier).

    APA Hunter, A. (2026). Local versus global search in channel graphs. Retrieved November 24, 2026, from https://en.wikipedia.org/wiki/ArXiv_(identifier)

  3. Simulation of Grover's quantum search algorithm in an Ising-nuclear-spin-chain quantum computer with first- and second-nearest-neighbour couplings · retrieved 2026-11-20 · rev 1376670198
    Cite this reference

    MLA "Simulation of Grover's quantum search algorithm in an Ising-nuclear-spin-chain quantum computer with first- and second-nearest-neighbour couplings." López, G V; Gorin, T; Lara, L (26 February 2008). 2026-11-20. https://en.wikipedia.org/wiki/ArXiv_(identifier). Accessed 24 November 2026.

    Chicago "Simulation of Grover's quantum search algorithm in an Ising-nuclear-spin-chain quantum computer with first- and second-nearest-neighbour couplings." López, G V; Gorin, T; Lara, L (26 February 2008). 2026-11-20. https://en.wikipedia.org/wiki/ArXiv_(identifier).

    APA López, G V; Gorin, T; Lara, L (26 February 2008). (2026). Simulation of Grover's quantum search algorithm in an Ising-nuclear-spin-chain quantum computer with first- and second-nearest-neighbour couplings. Retrieved November 24, 2026, from https://en.wikipedia.org/wiki/ArXiv_(identifier)

  4. Beame & Fich 2002 , p. 39. Wikipedia revision 1376670198, retrieved 2026-11-21 · retrieved 2026-11-20 · rev 1376670198
    Cite this reference

    MLA "Beame & Fich 2002 , p. 39. Wikipedia revision 1376670198, retrieved 2026-11-21." Beame & Fich 2002 , p. 2026-11-20. https://en.wikipedia.org/w/index.php?oldid=1376670198. Accessed 24 November 2026.

    Chicago "Beame & Fich 2002 , p. 39. Wikipedia revision 1376670198, retrieved 2026-11-21." Beame & Fich 2002 , p. 2026-11-20. https://en.wikipedia.org/w/index.php?oldid=1376670198.

    APA Beame & Fich 2002 , p. (2026). Beame & Fich 2002 , p. 39. Wikipedia revision 1376670198, retrieved 2026-11-21. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1376670198

  5. Sequential Searching · retrieved 2026-11-20 · rev 1376670198
    Cite this reference

    MLA "Sequential Searching." Knuth 1998 , §6. 2026-11-20. https://en.wikipedia.org/w/index.php?oldid=1376670198. Accessed 24 November 2026.

    Chicago "Sequential Searching." Knuth 1998 , §6. 2026-11-20. https://en.wikipedia.org/w/index.php?oldid=1376670198.

    APA Knuth 1998 , §6. (2026). Sequential Searching. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1376670198

  6. Searching by Comparison of Keys · retrieved 2026-11-20 · rev 1376670198
    Cite this reference

    MLA "Searching by Comparison of Keys." Knuth 1998 , §6. 2026-11-20. https://en.wikipedia.org/w/index.php?oldid=1376670198. Accessed 24 November 2026.

    Chicago "Searching by Comparison of Keys." Knuth 1998 , §6. 2026-11-20. https://en.wikipedia.org/w/index.php?oldid=1376670198.

    APA Knuth 1998 , §6. (2026). Searching by Comparison of Keys. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1376670198

  7. Knuth 1998 , §6.3 (Digital Searching). Wikipedia revision 1376670198, retrieved 2026-11-21 · retrieved 2026-11-20 · rev 1376670198
    Cite this reference

    MLA "Knuth 1998 , §6.3 (Digital Searching). Wikipedia revision 1376670198, retrieved 2026-11-21." Knuth 1998 , §6. 2026-11-20. https://en.wikipedia.org/w/index.php?oldid=1376670198. Accessed 24 November 2026.

    Chicago "Knuth 1998 , §6.3 (Digital Searching). Wikipedia revision 1376670198, retrieved 2026-11-21." Knuth 1998 , §6. 2026-11-20. https://en.wikipedia.org/w/index.php?oldid=1376670198.

    APA Knuth 1998 , §6. (2026). Knuth 1998 , §6.3 (Digital Searching). Wikipedia revision 1376670198, retrieved 2026-11-21. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1376670198

  8. Knuth 1998 , §6.4, (Hashing). Wikipedia revision 1376670198, retrieved 2026-11-21 · retrieved 2026-11-20 · rev 1376670198
    Cite this reference

    MLA "Knuth 1998 , §6.4, (Hashing). Wikipedia revision 1376670198, retrieved 2026-11-21." Knuth 1998 , §6. 2026-11-20. https://en.wikipedia.org/w/index.php?oldid=1376670198. Accessed 24 November 2026.

    Chicago "Knuth 1998 , §6.4, (Hashing). Wikipedia revision 1376670198, retrieved 2026-11-21." Knuth 1998 , §6. 2026-11-20. https://en.wikipedia.org/w/index.php?oldid=1376670198.

    APA Knuth 1998 , §6. (2026). Knuth 1998 , §6.4, (Hashing). Wikipedia revision 1376670198, retrieved 2026-11-21. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1376670198

  9. Retrieval on Secondary Keys · retrieved 2026-11-20 · rev 1376670198
    Cite this reference

    MLA "Retrieval on Secondary Keys." Knuth 1998 , §6. 2026-11-20. https://en.wikipedia.org/w/index.php?oldid=1376670198. Accessed 24 November 2026.

    Chicago "Retrieval on Secondary Keys." Knuth 1998 , §6. 2026-11-20. https://en.wikipedia.org/w/index.php?oldid=1376670198.

    APA Knuth 1998 , §6. (2026). Retrieval on Secondary Keys. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1376670198

Cite this article

MLA

"Search algorithm." encyclopegia.org, 2026, https://encyclopegia.org/wiki/search-algorithm. Accessed 24 November 2026.

Chicago

"Search algorithm." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/search-algorithm.

APA

encyclopegia.org. (2026). Search algorithm. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/search-algorithm

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Amiga Original Chip Set

enwiki · references available

Quinquagesima

enwiki · references available

Economy of Syria

enwiki · references available

Vienna Convention on Diplomatic Relations

enwiki · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1376670198 · 0.5 · snapshot enwiki-001376670198

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.