Search algorithm

Visual representation of a hash table, 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 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.[1][2]

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.[3] 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.[4] Digital search algorithms work based on the properties of digits in data structures by using numerical keys.[5] Finally, hashing directly maps keys to records based on a hash function.[6]

Algorithms are often evaluated by their computational complexity, or maximum theoretical run time. Binary search functions, for example, have a maximum complexity of O(log n), 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.

Applications of search algorithms

Specific applications of search algorithms include:

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 methods, 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.[7]

This class also includes various tree search algorithms, that view the elements as vertices of a tree, and traverse that tree in some special order. Examples of the latter include the exhaustive methods such as depth-first search and breadth-first search, as well as various heuristic-based search tree pruning methods such as backtracking and branch and bound. Unlike general metaheuristics, which at best work only in a probabilistic sense, many of these tree-search methods are guaranteed to find the exact or optimal solution, if given enough time. This is called "completeness".

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

The name "combinatorial search" is generally used for algorithms that look for a specific sub-structure of a given discrete structure, such as a graph, a string, a finite group, and so on. The term combinatorial optimization is typically used when the goal is to find a sub-structure with a maximum (or minimum) value of some parameter. (Since the sub-structure is usually represented in the computer by a set of integer variables with constraints, these problems can be viewed as special cases of constraint satisfaction or discrete optimization; but they are usually formulated and solved in a more abstract setting where the internal representation is not explicitly mentioned.)

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.[8]

See also

Categories:

References

Citations

  1. ^ Beame & Fich 2002, p. 39.
  2. ^ Knuth 1998, §6.5 ("Retrieval on Secondary Keys").
  3. ^ Knuth 1998, §6.1 ("Sequential Searching").
  4. ^ Knuth 1998, §6.2 ("Searching by Comparison of Keys").
  5. ^ Knuth 1998, §6.3 (Digital Searching).
  6. ^ Knuth 1998, §6.4, (Hashing).
  7. ^ Hunter, A.H.; Pippenger, Nicholas (4 July 2013). "Local versus global search in channel graphs". Networks: An International Journey. arXiv:1004.2526.
  8. ^ López, G V; Gorin, T; Lara, L (26 February 2008). "Simulation of Grover's quantum search algorithm in an Ising-nuclear-spin-chain quantum computer with first- and second-nearest-neighbour couplings". Journal of Physics B: Atomic, Molecular and Optical Physics. 41 (5): 055504. arXiv:0710.3196. Bibcode:2008JPhB...41e5504L. doi:10.1088/0953-4075/41/5/055504. S2CID 18796310.

Bibliography

Books

Articles

Read other articles:

Heinrich KuhlLahir17 September 1797Hanau, JermanMeninggal14 September 1821(1821-09-14) (umur 23)BogorKebangsaanJermanPekerjaanZoologiwanDikenal atasZoologi dan naturalis Heinrich Kuhl (17 September 1797 – 14 September 1821) adalah seorang peneliti alam (naturalis) dan zoologiwan berkebangsaan Jerman, yang wafat di Bogor. Kuhl lahir di Hanau (Hesse, Jerman). Antara tahun 1817 dan 1820, Kuhl bekerja sebagai asisten profesor Th. van Swinderen, pengajar Sejarah Alam di Universitas Groning...

 

Artikel ini sebatang kara, artinya tidak ada artikel lain yang memiliki pranala balik ke halaman ini.Bantulah menambah pranala ke artikel ini dari artikel yang berhubungan atau coba peralatan pencari pranala.Tag ini diberikan pada Januari 2023. Quick Charge (bahasa Inggris: pengisian cepat) adalah sebuah teknologi dari Qualcomm yang ditujukan untuk perangkat ponsel atau baterai yang membuat proses pengisian daya agar lebih cepat. Penggunaan metode pengisian cepat ini membutuhkan beberapa pera...

 

Alcorcón BenderaLambang kebesaranLocation in the Community of Madrid, SpainNegaraSpanyolKomunitas otonomiKomunitas MadridProvinsiMadridComarcaWilayah metropolitan MadridPembagian administratif3Founded13th centuryPemerintahan • Wali kotaEnrique Cascallana (PSOE)Luas • Luas daratan33,7 km2 (130 sq mi)Ketinggian695 m (2,280 ft)Populasi (2007) • Total166.553 • Kepadatan4.822,67/km2 (1,249,070/sq mi) peringkat...

خوليو سيزار كاسيرس معلومات شخصية الاسم الكامل خوليو سيزار كاسيرس لوبيز الميلاد 5 أكتوبر 1979 (العمر 44 سنة)سان خوسيه دي لوس أرويوس الطول 1.81 م (5 قدم 11 1⁄2 بوصة) مركز اللعب قلب دفاع الجنسية باراغواي  معلومات النادي النادي الحالي أوليمبيا أسونسيون مسيرة الشباب سنو�...

 

Artikel ini sebatang kara, artinya tidak ada artikel lain yang memiliki pranala balik ke halaman ini.Bantulah menambah pranala ke artikel ini dari artikel yang berhubungan atau coba peralatan pencari pranala.Tag ini diberikan pada Januari 2023. Teresia Kim-i (1811-1846) adalah salah seorang martir Katolik Korea yang ditangkap pada tanggal 10 Juli 1846, di rumah Karolus Hyon. Teresia lahir pada tahun 1811 di Seoul di sebuah keluarga Katolik. Sejak muda, dia sangat suka membaca kisah para kudus...

 

Dana ekuitas swasta (disingkat dana ES) adalah skema investasi kolektif yang digunakan untuk melakukan investasi di berbagai sekuritas ekuitas (dan pada tingkat yang lebih rendah utang) menurut salah satu strategi investasi yang terkait dengan ekuitas swasta. Dana ekuitas swasta biasanya kemitraan terbatas dengan jangka waktu tetap 10 tahun (sering kali dengan perpanjangan tahunan). Pada awal, investor institusional membuat komitmen tanpa dana untuk persekutuan komanditer, yang kemudian ditar...

Swedish indie pop band Miike SnowMiike Snow performing at SXSW 2010Background informationOriginStockholm, SwedenGenresIndie rockindie popsynthpopindietronicaalternative danceYears active2007–presentLabelsDowntownMapleMusicColumbiaRCRD LBLMembers Christian Karlsson Pontus Winnberg Andrew Wyatt Websitemiikesnow.com Miike Snow (pronounced Mike Snow)[1] is a Swedish indie pop band formed in 2007. The band consists of producing team Bloodshy & Avant and American singer Andrew Wyatt. ...

 

Cet article est une ébauche concernant le jeu vidéo et une entreprise. Vous pouvez partager vos connaissances en l’améliorant (comment ?) (voir l’aide à la rédaction). Gamesplanet Création Mars 2007 Fondateurs Metaboli Forme juridique Société par actions simplifiée[1] Siège social Paris France Direction Pierre ForestChris Vandebroek Activité Industrie vidéoludique et vente à distance sur catalogue spécialisé (d)[1] SIREN 438915415[1] Site web gamesplanet.com modi...

 

Marietta Martin X-24A adalah pesawat eksperimental supersonik AS yang dikembangkan dari gabungan program USAF - NASA bernama PILOT (1963-1975). Marietta Martin X-24A ini dirancang dan dibangun untuk menguji konsep mengangkat tubuh, bereksperimen dengan konsep dari unpowered reentry dan mendarat, kemudian digunakan oleh Space Shuttle . Spesifikasi (X-24A) Karakteristik umum Kru: satu pilot Panjang: 24 ft 6 in (7.47 m) Lebar sayap: 11 ft 6 in (3.51 m) Tinggi: 9 ft 7 in (2.92 m) Area sayap: 195...

1 Korintus 12Surat 1 Korintus 7:33-8:4 yang tertulis pada naskah Papirus 15, dibuat sekitar abad ke-3 M.KitabSurat 1 KorintusKategoriSurat-surat PaulusBagian Alkitab KristenPerjanjian BaruUrutan dalamKitab Kristen7← pasal 11 pasal 13 → 1 Korintus 12 (atau I Korintus 12, disingkat 1Kor 12) adalah bagian surat rasul Paulus yang pertama kepada jemaat di Korintus dalam Perjanjian Baru di Alkitab Kristen.[1][2] Dikarang oleh rasul Paulus dan Sostenes[3] di Efesu...

 

American businessman and politician Zachariah ChandlerUnited States Senatorfrom MichiganIn officeFebruary 22, 1879 – November 1, 1879Preceded byIsaac P. ChristiancySucceeded byHenry P. BaldwinIn officeMarch 4, 1857 – March 3, 1875Preceded byLewis CassSucceeded byIsaac P. ChristiancyChair of the Republican National CommitteeIn officeJune 1876 – November 1, 1879Preceded byEdwin D. MorganSucceeded byJ. Donald Cameron12th United States Secretary of the InteriorIn ...

 

Type of pump This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Sump pump – news · newspapers · books · scholar · JSTOR (April 2017) (Learn how and when to remove this message) The examples and perspective in this article may not represent a worldwide view of the subject. You may improve this article, discuss t...

Hotel in Mandaluyong, Philippines This article is about the hotel. For the nearby shopping mall, see Shangri-La Plaza. This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages) This article contains content that is written like an advertisement. Please help improve it by removing promotional content and inappropriate external links, and by adding encyclopedic content written from a neutral point of...

 

Clotaire IKoin perak Clotaire IRaja SoissonsBerkuasa511–558PendahuluClovis IPenerusChilperic IRaja OrléansBerkuasa524–558PendahuluClodomirPenerusSt. GuntramRaja ReimsBerkuasa555–558PendahuluThibaudPenerusSigebert IRaja ParisBerkuasa558PendahuluChildebert IPenerusCaribert IRaja FrankaBerkuasa558–561PendahuluKosong (terakhir dijabat oleh Clovis I)PenerusKosong (terakhir dijabat oleh Clotaire II)Informasi pribadiKelahiranskt. 497Kematian29 November 561CompiègneDinastiMerovingAyahClovis...

 

Shoulder-launched anti-tank weapon For similar terms, see Shoulder-fired missile. A rocket-propelled grenade (left) and RPG-7 launcher. For use, the thinner cylinder part of the rocket-propelled grenade is inserted into the muzzle of the launcher. Soviet/Russian rocket launchers. From top to bottom: RPO-A Shmel, RPG-22, RPG-26, RPG-18. A rocket-propelled grenade (RPG) is a shoulder-fired rocket weapon that launches rockets equipped with an explosive warhead. Most RPGs can be carried by an ind...

Failed terror attack Cargo planes bomb plotLocationUnited States of America (target); East Midlands Airport and Dubai International Airport (discovered)DateOctober 29, 2010 (discovered)Target2 planesAttack typeBombing (failed)WeaponsTwo packages, each containing a printer cartridge packed with a bomb made from the plastic explosive PETNDeaths0Injured0PerpetratorAl-Qaeda in the Arabian Peninsula On October 29, 2010, two packages, each containing a bomb consisting of 300 to 400 grams (11�...

 

Диня Біологічна класифікація Царство: Рослини (Plantae) Клада: Судинні рослини (Tracheophyta) Клада: Покритонасінні (Angiosperms) Клада: Евдикоти (Eudicots) Клада: Розиди (Rosids) Порядок: Гарбузоцвіті (Cucurbitales) Родина: Гарбузові (Cucurbitaceae) Рід: Cucumis Вид: Диня (C. melo) Біноміальна назва Cucumis meloL., 1753 Ди́...

 

American composer and multi-instrumentalist This biography of a living person includes a list of general references, but it lacks sufficient corresponding inline citations. Contentious material about living persons that is unsourced or poorly sourced must be removed immediately, especially if potentially libelous or harmful. Please help to improve this article by introducing more precise citations. (August 2012) (Learn how and when to remove this message) Vinny GoliaBackground informationBorn...

DC Comics superhero This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages) This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Hawkman Carter Hall – news · newspapers · books · scholar · JSTOR (February 2011) ...

 

この項目では、シリーズ第1作目について説明しています。 映画のシリーズ全体については「ワイルド・スピードシリーズ」をご覧ください。 タイトーのアーケードゲームについては「ファスト アンド フューリアス」をご覧ください。 バンダイナムコの家庭用ゲームについては「THE FAST AND THE FURIOUS (ゲーム)」をご覧ください。 ワイルド・スピード The Fast and the Furious �...