List of algorithms#Number theoretic algorithms

{{Short description|none}}

An algorithm is fundamentally a set of rules or defined procedures that is typically designed and used to solve a specific problem or a broad set of problems.

Broadly, algorithms define process(es), sets of rules, or methodologies that are to be followed in calculations, data processing, data mining, pattern recognition, automated reasoning or other problem-solving operations. With the increasing automation of services, more and more decisions are being made by algorithms. Some general examples are; risk assessments, anticipatory policing, and pattern recognition technology.{{Cite web |title=algorithm |url=https://www.law.cornell.edu/wex/algorithm |access-date=2023-10-26 |website=LII / Legal Information Institute |language=en}}

The following is a list of well-known algorithms.

Automated planning

{{further|List of algorithms for automated planning}}

Combinatorial algorithms

{{further| Combinatorics}}

=General combinatorial algorithms=

  • Brent's algorithm: finds a cycle in function value iterations using only two iterators{{Cite journal |last=Gegenfurtner |first=Karl R. |date=1992-12-01 |title=PRAXIS: Brent's algorithm for function minimization |journal=Behavior Research Methods, Instruments, & Computers |language=en |volume=24 |issue=4 |pages=560–564 |doi=10.3758/BF03203605 |issn=1532-5970|doi-access=free }}
  • Floyd's cycle-finding algorithm: finds a cycle in function value iterations{{Cite web |date=2013-09-30 |title=richardshin.com {{!}} Floyd's Cycle Detection Algorithm |url=http://www.richardshin.com/floyds-cycle-detection-algorithm/ |access-date=2023-10-26 |language=en-US}}
  • Gale–Shapley algorithm: solves the stable matching problem{{cite web |author=Tesler, G.|url=https://mathweb.ucsd.edu/~gptesler/154/slides/154_galeshapley_20-handout.pdf|website=mathweb.ucsd.edu|title=Ch. 5.9: Gale-Shapley Algorithm|date= 2020|publisher=University of California San Diego|access-date=26 April 2025|url-status=|archive-url=|archive-date=}}{{cite web|last1=Kleinberg|first1=Jon |last2=Tardos|first2=Éva |url=https://www.cs.princeton.edu/~wayne/kleinberg-tardos/pdf/01StableMatching.pdf|website=www.cs.princeton.edu|title=Algorithmn Design: 1. Stable Matching|date= 2005|publisher=Pearson-Addison Wesley: Princeton University|access-date=26 April 2025|url-status=|archive-url=|archive-date=}}{{cite web |last1=Goel|first1=Ashish |editor1-last=Ramseyer|editor1-first=Geo |url=https://web.stanford.edu/~ashishg/cs261/win21/notes/l5_note.pdf|website=web.stanford.edu|title=CS261 Winter 2018- 2019 Lecture 5: Gale-Shapley Algorith|date= 21 January 2019|publisher=Stanford University|access-date=26 April 2025|url-status=|archive-url=|archive-date=}}
  • Pseudorandom number generators (uniformly distributed—see also List of pseudorandom number generators for other PRNGs with varying degrees of convergence and varying statistical quality):{{citation needed|date=June 2024}}
  • ACORN generator
  • Blum Blum Shub
  • Lagged Fibonacci generator
  • Linear congruential generator
  • Mersenne Twister

=Graph algorithms=

{{further|:Category:Graph algorithms|Graph theory}}

==Graph drawing==

{{further|Graph drawing}}

==Network theory==

{{further|Network theory}}

==Routing for graphs==

==Graph search==

{{further|Graph search algorithm|State space search}}

==Subgraphs==

=Sequence algorithms=

{{further|Sequences}}

==Approximate sequence matching==

==Selection algorithms==

{{main|Selection algorithm}}

==Sequence search==

  • Linear search: locates an item in an unsorted sequence
  • Selection algorithm: finds the kth largest item in a sequence
  • Sorted lists
  • Binary search algorithm: locates an item in a sorted sequence
  • Eytzinger binary search: cache friendly binary search algorithm {{Cite web |title=Eytzinger Binary Search - Algorithmica |url=https://algorithmica.org/en/eytzinger |access-date=2023-04-09}}
  • Fibonacci search technique: search a sorted sequence using a divide and conquer algorithm that narrows down possible locations with the aid of Fibonacci numbers
  • Jump search (or block search): linear search on a smaller subset of the sequence
  • Predictive search: binary-like search which factors in magnitude of search term versus the high and low values in the search. Sometimes called dictionary search or interpolated search.
  • Uniform binary search: an optimization of the classic binary search algorithm
  • Ternary search: a technique for finding the minimum or maximum of a function that is either strictly increasing and then strictly decreasing or vice versa

==Sequence merging==

{{main|Merge algorithm}}

==Sequence permutations==

{{further|Permutation}}

==Sequence combinations==

{{further|Combination}}

==Sequence alignment==

==Sequence sorting==

{{main|Sorting algorithm}}

{{contradicts other|Sorting_algorithm#Comparison_of_algorithms|date=March 2011}}

  • Exchange sorts
  • Bubble sort: for each pair of indices, swap the items if out of order
  • Cocktail shaker sort or bidirectional bubble sort, a bubble sort traversing the list alternately from front to back and back to front
  • Comb sort
  • Gnome sort
  • Odd–even sort
  • Quicksort: divide list into two, with all items on the first list coming before all items on the second list.; then sort the two lists. Often the method of choice
  • Humorous or ineffective
  • Bogosort: the list is randomly shuffled until it happens to be sorted
  • Slowsort
  • Stalin sort: all elements that are not in order are removed from the list{{cite web | title=A "Sorting" algorithm | website=Code Golf Stack Exchange | date=October 30, 2018 | url=https://codegolf.stackexchange.com/questions/174964/a-sorting-algorithm | access-date=April 4, 2025}}
  • Stooge sort
  • Hybrid
  • Flashsort
  • Introsort: begin with quicksort and switch to heapsort when the recursion depth exceeds a certain level
  • Timsort: adaptative algorithm derived from merge sort and insertion sort. Used in Python 2.3 and up, and Java SE 7.
  • Insertion sorts
  • Cycle sort: in-place with theoretically optimal number of writes
  • Insertion sort: determine where the current item belongs in the list of sorted ones, and insert it there
  • Library sort
  • Patience sorting
  • Shell sort: an attempt to improve insertion sort
  • Tree sort (binary tree sort): build binary tree, then traverse it to create sorted list
  • Merge sorts
  • Merge sort: sort the first and second half of the list separately, then merge the sorted lists
  • Slowsort
  • Strand sort
  • Non-comparison sorts
  • Bead sort
  • Bucket sort
  • Burstsort: build a compact, cache efficient burst trie and then traverse it to create sorted output
  • Counting sort
  • Pigeonhole sort
  • Postman sort: variant of Bucket sort which takes advantage of hierarchical structure
  • Radix sort: sorts strings letter by letter
  • Selection sorts
  • Heapsort: convert the list into a heap, keep removing the largest element from the heap and adding it to the end of the list
  • Selection sort: pick the smallest of the remaining elements, add it to the end of the sorted list
  • Smoothsort
  • Other
  • Bitonic sorter
  • Pancake sorting
  • Spaghetti sort
  • Topological sort
  • Unknown class
  • Samplesort

==Subsequences==

{{further|Subsequence}}

==Substrings==

{{further|Substrings}}

Computational mathematics

{{further|Computational mathematics}}

{{see also|List of algorithms#Combinatorial algorithms|l1=Combinatorial algorithms|List of algorithms#Computational science|l2=Computational science}}

=Abstract algebra=

{{further|Abstract algebra}}

=Computer algebra=

{{further|Computer algebra}}

=Geometry=

{{main category|Geometric algorithms}}

{{further|Computational geometry}}

=Number theoretic algorithms=

{{further|Number theory}}

=Numerical algorithms=

{{further|List of numerical analysis topics|Numerical analysis}}

==Differential equation solving==

{{further|Differential equation}}

==Elementary and special functions==

{{further|Special functions}}

==Geometric==

==Interpolation and extrapolation==

{{further|Extrapolation|Interpolation}}

==Linear algebra==

{{further|Numerical linear algebra}}

{{anchor|Solving systems of linear equations}}

==Monte Carlo==

{{further|Monte Carlo method}}

==Numerical integration==

{{further|Numerical integration}}

==Root finding==

{{main|Root-finding algorithm}}

=Optimization algorithms=

{{main|Mathematical optimization}}Hybrid Algorithms

Computational science

{{further|Computational science}}

=Astronomy=

=Bioinformatics=

{{further|Bioinformatics}}

{{see also|List of algorithms#Sequence alignment|l1=Sequence alignment algorithms}}

=Geoscience=

{{further|Geoscience}}

  • Geohash: a public domain algorithm that encodes a decimal latitude/longitude pair as a hash string
  • Vincenty's formulae: a fast algorithm to calculate the distance between two latitude/longitude points on an ellipsoid

=Linguistics=

{{further|Computational linguistics|Natural language processing}}

=Medicine=

{{further|Medical algorithms}}

=Physics=

{{further|Computational physics}}

=Statistics=

{{further|Computational statistics}}

Computer science

{{further|Computer science}}

=Computer architecture=

{{further|Computer architecture}}

  • Tomasulo algorithm: allows sequential instructions that would normally be stalled due to certain dependencies to execute non-sequentially

=Computer graphics=

{{further|Computer graphics}}

=Cryptography=

{{further|Cryptography|Topics in cryptography}}

=Digital logic=

=Machine learning and statistical classification=

{{main|List of machine learning algorithms}}

{{further|Machine learning|Statistical classification}}

=Programming language theory=

{{further|Programming language theory}}

==Parsing==

{{further|Parsing}}

=Quantum algorithms=

{{further|Quantum algorithm}}

=Theory of computation and automata=

{{further|Theory of computation}}

Information theory and signal processing

{{main|Information theory|Signal processing}}

=Coding theory=

{{further|Coding theory}}

==Error detection and correction==

{{further|Error detection and correction}}

==Lossless compression algorithms==

{{main|:Category:Lossless compression algorithms|l1=Lossless compression algorithms}}

==Lossy compression algorithms==

{{main|:Category:Lossy compression algorithms|l1=Lossy compression algorithms}}

=Digital signal processing=

{{further|Digital signal processing}}

==Image processing==

{{further|Digital image processing}}

Software engineering

{{further|Software engineering}}

Database algorithms

Distributed systems algorithms

{{further|Distributed algorithm|Distributed systems}}

=Memory allocation and deallocation algorithms=

Networking

{{further|Network scheduler}}

Operating systems algorithms

{{further|Operating systems}}

=Process synchronization=

{{further|Process scheduler|Process synchronization}}

=Scheduling=

=I/O scheduling=

{{further|I/O scheduling}}

{{expand section|date=July 2017}}

==Disk scheduling==

See also

References

{{Reflist}}

{{Algorithmic paradigms}}

{{DEFAULTSORT:Algorithms}}

*

Algorithms