List of algorithms explained
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.[1]
The following is a list of well-known algorithms along with one-line descriptions for each.
Combinatorial algorithms
General combinatorial algorithms
- Brent's algorithm: finds a cycle in function value iterations using only two iterators[2]
- Floyd's cycle-finding algorithm: finds a cycle in function value iterations[3]
- Gale–Shapley algorithm: solves the stable marriage problem
- Pseudorandom number generators (uniformly distributed—see also List of pseudorandom number generators for other PRNGs with varying degrees of convergence and varying statistical quality):
Graph algorithms
Graph drawing
- Force-based algorithms (also known as force-directed algorithms or spring-based algorithm)
- Spectral layout
Network theory
Routing for graphs
Graph search
Subgraphs
Sequence algorithms
Approximate sequence matching
- Bitap algorithm: fuzzy algorithm that determines if strings are approximately equal.
- Phonetic algorithms
- String metrics: computes a similarity or dissimilarity (distance) score between two pairs of text strings
- Trigram search: search for text when the exact syntax or spelling of the target object is not precisely known
Selection algorithms
See main article: Selection algorithm.
Sequence search
- Linear search: locates an item in an unsorted sequence
- Selection algorithm: finds the kth largest item in a sequence
- 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
- Sorted lists
- Binary search algorithm: locates an item in a sorted sequence
- 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
- Eytzinger binary search: cache friendly binary search algorithm [4]
Sequence merging
See main article: Merge algorithm.
- Simple merge algorithm
- k-way merge algorithm
- Union (merge, with elements on the output not repeated)
Sequence permutations
Sequence alignment
Sequence sorting
See main article: Sorting algorithm.
- 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
- 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
- Merge sorts
- Non-comparison sorts
- 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
- Smoothgamersort
- Other
- Unknown class
Subsequences
- Longest common subsequence problem: Find the longest subsequence common to all sequences in a set of sequences
- Longest increasing subsequence problem: Find the longest increasing subsequence of a given sequence
- Ruzzo–Tompa algorithm: Find all non-overlapping, contiguous, maximal scoring subsequences in a sequence of real numbers
- Shortest common supersequence problem: Find the shortest supersequence that contains two or more sequences as subsequences
Substrings
- Kadane's algorithm: finds the contiguous subarray with largest sum in an array of numbers
- Longest common substring problem: find the longest string (or strings) that is a substring (or are substrings) of two or more strings
- Substring search
- Ukkonen's algorithm: a linear-time, online algorithm for constructing suffix trees
- Matching wildcards
- Rich Salz' wildmat: a widely used open-source recursive algorithm
- Krauss matching wildcards algorithm: an open-source non-recursive algorithm
Computational mathematics
Abstract algebra
Computer algebra
Geometry
See main article: category.
Number theoretic algorithms
Numerical algorithms
Differential equation solving
Elementary and special functions
- Computation of π:
- Division algorithms: for computing quotient and/or remainder of two numbers
- Long division
- Restoring division
- Non-restoring division
- SRT division
- Newton–Raphson division: uses Newton's method to find the reciprocal of D, and multiply that reciprocal by N to find the final quotient Q.
- Goldschmidt division
- Hyperbolic and Trigonometric Functions:
- BKM algorithm: computes elementary functions using a table of logarithms
- CORDIC: computes hyperbolic and trigonometric functions using a table of arctangents
- Exponentiation:
- Addition-chain exponentiation: exponentiation by positive integer powers that requires a minimal number of multiplications
- Exponentiating by squaring: an algorithm used for the fast computation of large integer powers of a number
- Montgomery reduction: an algorithm that allows modular arithmetic to be performed efficiently when the modulus is large
- Multiplication algorithms: fast multiplication of two numbers
- Multiplicative inverse Algorithms: for computing a number's multiplicative inverse (reciprocal).
- Rounding functions: the classic ways to round numbers
- Spigot algorithm: a way to compute the value of a mathematical constant without knowing preceding digits
- Square and Nth root of a number:
- Summation:
- Binary splitting: a divide and conquer technique which speeds up the numerical evaluation of many types of series with rational terms
- Kahan summation algorithm: a more accurate method of summing floating-point numbers
- Unrestricted algorithm
Geometric
- Filtered back-projection: efficiently computes the inverse 2-dimensional Radon transform.
- Level set method (LSM): a numerical technique for tracking interfaces and shapes
Interpolation and extrapolation
Linear algebra
Monte Carlo
Numerical integration
Root finding
See main article: Root-finding algorithm.
Optimization algorithms
See main article: Mathematical optimization. Hybrid Algorithms
Computational science
Astronomy
- Doomsday algorithm: day of the week
- Zeller's congruence is an algorithm to calculate the day of the week for any Julian or Gregorian calendar date
- various Easter algorithms are used to calculate the day of Easter
Bioinformatics
- Basic Local Alignment Search Tool also known as BLAST: an algorithm for comparing primary biological sequence information
- Kabsch algorithm: calculate the optimal alignment of two sets of points in order to compute the root mean squared deviation between two protein structures.
- Velvet: a set of algorithms manipulating de Bruijn graphs for genomic sequence assembly
- Sorting by signed reversals: an algorithm for understanding genomic evolution.
- Maximum parsimony (phylogenetics): an algorithm for finding the simplest phylogenetic tree to explain a given character matrix.
- UPGMA: a distance-based phylogenetic tree construction algorithm.
- Bloom Filter: probabilistic data structure used to test for the existence of an element within a set. Primarily used in bioinformatics to test for the existence of a k-mer in a sequence or sequences.
Geoscience
- Vincenty's formulae: a fast algorithm to calculate the distance between two latitude/longitude points on an ellipsoid
- Geohash: a public domain algorithm that encodes a decimal latitude/longitude pair as a hash string
Linguistics
- Lesk algorithm: word sense disambiguation
- Stemming algorithm: a method of reducing words to their stem, base, or root form
- Sukhotin's algorithm: a statistical classification algorithm for classifying characters in a text as vowels or consonants
Medicine
Physics
Statistics
Computer science
Computer architecture
- Tomasulo algorithm: allows sequential instructions that would normally be stalled due to certain dependencies to execute non-sequentially
Computer graphics
- Clipping
- Contour lines and Isosurfaces
- Marching cubes: extract a polygonal mesh of an isosurface from a three-dimensional scalar field (sometimes called voxels)
- Marching squares: generates contour lines for a two-dimensional scalar field
- Marching tetrahedrons: an alternative to Marching cubes
- Discrete Green's Theorem: is an algorithm for computing double integral over a generalized rectangular domain in constant time. It is a natural extension to the summed area table algorithm
- Flood fill: fills a connected region of a multi-dimensional array with a specified symbol
- Global illumination algorithms: Considers direct illumination and reflection from other objects.
- Hidden-surface removal or Visual surface determination
- Line Drawing: graphical algorithm for approximating a line segment on discrete graphical media.
- Midpoint circle algorithm: an algorithm used to determine the points needed for drawing a circle
- Ramer–Douglas–Peucker algorithm: Given a 'curve' composed of line segments to find a curve not too dissimilar but that has fewer points
- Shading
- Gouraud shading: an algorithm to simulate the differing effects of light and colour across the surface of an object in 3D computer graphics
- Phong shading: an algorithm to interpolate surface normal-vectors for surface shading in 3D computer graphics
- Slerp (spherical linear interpolation): quaternion interpolation for the purpose of animating 3D rotation
- Summed area table (also known as an integral image): an algorithm for computing the sum of values in a rectangular subset of a grid in constant time
- Binary space partitioning
Cryptography
- Asymmetric (public key) encryption:
- Digital signatures (asymmetric authentication):
- DSA, and its variants:
- ECDSA and Deterministic ECDSA
- EdDSA (Ed25519)
- RSA
- Cryptographic hash functions (see also the section on message authentication codes):
- BLAKE
- MD5 – Note that there is now a method of generating collisions for MD5
- RIPEMD-160
- SHA-1 – Note that there is now a method of generating collisions for SHA-1
- SHA-2 (SHA-224, SHA-256, SHA-384, SHA-512)
- SHA-3 (SHA3-224, SHA3-256, SHA3-384, SHA3-512, SHAKE128, SHAKE256)
- Tiger (TTH), usually used in Tiger tree hashes
- WHIRLPOOL
- Cryptographically secure pseudo-random number generators
- Key exchange
- Key derivation functions, often used for password hashing and key stretching
- Message authentication codes (symmetric authentication algorithms, which take a key as a parameter):
- Secret sharing, Secret Splitting, Key Splitting, M of N algorithms
- Symmetric (secret key) encryption:
- Post-quantum cryptography
- Proof-of-work algorithms
Digital logic
Machine learning and statistical classification
Programming language theory
- C3 linearization: an algorithm used primarily to obtain a consistent linearization of a multiple inheritance hierarchy in object-oriented programming
- Chaitin's algorithm: a bottom-up, graph coloring register allocation algorithm that uses cost/degree as its spill metric
- Hindley–Milner type inference algorithm
- Rete algorithm: an efficient pattern matching algorithm for implementing production rule systems
- Sethi-Ullman algorithm: generates optimal code for arithmetic expressions
Parsing
Quantum algorithms
Theory of computation and automata
Information theory and signal processing
See main article: Information theory and Signal processing.
Coding theory
Error detection and correction
Lossless compression algorithms
Lossy compression algorithms
Digital signal processing
- Adaptive-additive algorithm (AA algorithm): find the spatial frequency phase of an observed wave source
- Discrete Fourier transform: determines the frequencies contained in a (segment of a) signal
- Fast folding algorithm: an efficient algorithm for the detection of approximately periodic events within time series data
- Gerchberg–Saxton algorithm: Phase retrieval algorithm for optical planes
- Goertzel algorithm: identify a particular frequency component in a signal. Can be used for DTMF digit decoding.
- Karplus-Strong string synthesis: physical modelling synthesis to simulate the sound of a hammered or plucked string or some types of percussion
Image processing
Software engineering
- Cache algorithms
- CHS conversion: converting between disk addressing systems
- Double dabble: Convert binary numbers to BCD
- Hash Function: convert a large, possibly variable-sized amount of data into a small datum, usually a single integer that may serve as an index into an array
- Unicode Collation Algorithm
- Xor swap algorithm: swaps the values of two variables without using a buffer
Database algorithms
Distributed systems algorithms
Memory allocation and deallocation algorithms
Networking
Operating systems algorithms
- Banker's algorithm: algorithm used for deadlock avoidance
- Page replacement algorithms: for selecting the victim page under low memory conditions
Process synchronization
Scheduling
I/O scheduling
Disk scheduling
See also
Notes and References
- Web site: algorithm . 2023-10-26 . LII / Legal Information Institute . en.
- Gegenfurtner . Karl R. . 1992-12-01 . PRAXIS: Brent's algorithm for function minimization . Behavior Research Methods, Instruments, & Computers . en . 24 . 4 . 560–564 . 10.3758/BF03203605 . 1532-5970. free .
- Web site: 2013-09-30 . richardshin.com Floyd's Cycle Detection Algorithm . 2023-10-26 . en-US.
- Web site: Eytzinger Binary Search - Algorithmica . 2023-04-09.
- Web site: Shannon-Fano-Elias Coding . dead . https://web.archive.org/web/20210228164521/https://my.ece.msstate.edu/faculty/fowler/Classes/ECE8813/Handouts/shannon_fano_elias.pdf . 2021-02-28 . 2023-10-11 . my.ece.msstate.edu.
- Web site: Archived copy . www.vision.ee.ethz.ch . 13 January 2022 . https://web.archive.org/web/20070221214147/http://www.vision.ee.ethz.ch/~surf/eccv06.pdf . 21 February 2007 . dead.
- Web site: Archived copy . 2013-10-05 . dead . https://web.archive.org/web/20131006113018/http://glorfindel.mavrinac.com/~aaron/school/pdf/bay06_surf.pdf . 2013-10-06 .