Graph algorithm 2026-11-05
A graph algorithm computes a property of a graph or constructs a related object from its graph vertices and graph edges. The input representation matters: an adjacency list lets an algorithm inspect the neighbours of one graph vertex without scanning every possible pair of graph vertices, whereas an adjacency matrix provides direct tests for individual graph edges.
For example, breadth-first search finds every graph vertex reachable from a starting graph vertex . Mark , place it in a FIFO queue, then repeatedly remove the oldest marked graph vertex and mark/enqueue each previously unmarked neighbour. A graph vertex is enqueued at most once, so scanning adjacency lists costs . The FIFO queue processes distance layers in order; the first discovery of a graph vertex supplies a shortest graph path in an unweighted graph.
For graph edges , , , starting at discovers before , with distances . The same graph can support different questions: depth-first search investigates traversal structure, Dijkstra's algorithm uses nonnegative edge weights for shortest graph paths, and a minimum spanning tree minimizes the total weight needed to connect an undirected graph. Matching the algorithm to its assumptions is part of modelling the problem.
Greedy algorithm Created 2026-10-13 Updated 2026-10-20
A greedy algorithm builds a feasible solution by repeatedly committing to a locally preferred next choice. Each commitment is final: the algorithm does not revisit it when later choices become available. In mathematical optimization, the important question is whether those commitments can still attain the best objective function value.
For example, a shared telescope can accept several observation requests with fixed time slots. In interval scheduling, every completed request counts equally, and overlapping requests cannot both be accepted. Choosing the request that finishes earliest leaves the resource available sooner. The example below turns that intuition into a precise rule, then shows why choosing the earliest start or shortest duration can lose jobs.
Greedy algorithms are attractive because a single pass can replace a search through many candidate subsets. However, "locally best" is only a design proposal. A problem-specific greedy-choice property, often established by an exchange argument, must connect the local decision to the actual objective function. The largest-individual-value rule in the 0-1 knapsack problem fails; Dijkstra's algorithm needs its nonnegative-edge assumptions. A rule's success in one optimization task does not justify it in another.
Greg Humphreys Created 2026-10-13 Updated 2026-11-05
Coauthor with Matt Pharr and Wenzel Jakob of a textbook on physically based rendering, connecting computer graphics algorithms with models of light transport.[ref]
Physically Based Rendering: From Theory to Implementation (4th edition) by Matt Pharr and others. author attribution and the named work’s subject
Halting problem Created 2026-09-24 Updated 2026-10-31
The halting set is computably enumerable but undecidable, and its complement is not computably enumerable.
Harry Buhrman Created 2026-10-14 Updated 2026-11-05
Harry Buhrman coauthored Complexity Measures and Decision Tree Complexity: A Survey by Harry Buhrman and Ronald de Wolf. The survey relates measures of Boolean-function complexity, including deterministic and randomized decision-tree queries, certificate size and quantum query complexity. These comparisons separate how a function is represented from how much information an algorithm must inspect to compute it.[ref]
Herbert Edelsbrunner 2026-11-05
Herbert Edelsbrunner develops algorithms for computational geometry and computational topology. His research account describes a progression from data structures and geometry to topological methods, guided by applications.[ref] He coauthored Computational Topology: An Introduction by Herbert Edelsbrunner and John L. Harer with John L. Harer.[ref]
Computational Topology: An Introduction by Herbert Edelsbrunner and John L. Harer. publisher byline and scope
A central computational challenge is to replace a continuous shape by finite combinatorial data while preserving the invariant being studied. For example, a triangulated surface can be described by vertices, edges and faces, allowing homology to be computed from boundary relations. The representation supplies an algorithmic route to a geometric question; the quality of the input model remains part of interpreting the answer.
Portrait of Herbert Edelsbrunner
. Source. Huffman code Created 2026-10-14 Updated 2026-10-25
A Huffman code is the prefix code returned by Huffman coding; the algorithm chooses a code tree, while the code specifies the actual symbol-to-codeword assignment. For the probability distribution in symbol order , the illustrated binary tree givesThe codeword lengths are . This is a prefix code because no complete codeword is an initial segment of another complete codeword. Thus a decoder can start at the root of a tree, follow one edge per bit, emit a symbol on reaching its leaf, then restart at the root of a tree. In particular,
011010111 splits as 0 | 110 | 10 | 111 and decodes to . No separators are transmitted: the leaf tells the decoder where a codeword ends.The expected codeword length isbits per source symbol. Four symbols would require bits each if all codewords had the same length, so this Huffman code saves bit per symbol on average, or of that fixed-length payload. A particular message can grow: uses nine bits here instead of eight. These lengths count the encoded symbols only; transmitting a code description or message framing can add further cost.
The Kraft inequality is saturated by this Huffman code:Its Shannon entropy isbits per symbol, slightly below the expected codeword length . The entropy lower bound for prefix codes applies to every binary prefix code for this probability distribution. It need not be attainable with integer codeword lengths for individual symbols; Huffman coding reaches the best mean within that class. [ref]
https://web.iitd.ac.in/~sumeet/mackay.pdf. David J. C. MacKay, Information Theory, Inference, and Learning Algorithms, chapter 5, section 5.4: symbol-code bounds
A Huffman code need not be unique. In the first example, the tied and weights can exchange their edge labels, changing codewords but preserving their codeword lengths. Ties can also change the lengths themselves. For a second probability distribution , first merge to weight . The next merge can join with either or the subtree, since both have weight . Joining with permits , with all lengths . Joining with the subtree permits , with lengths . Both are optimal prefix codes with expected codeword length : for the latter, . Tie choices can change the code tree without changing the minimum mean.
// Target: algebra.bigb
Increasing subsequence Created 2026-09-28 Updated 2026-10-13
An increasing subsequence of a finite sequence in a totally ordered set selects indices such thatHere “increasing” means weakly increasing, also called nondecreasing: equal values are allowed, but indices must increase strictly. This is the convention of [ref]
https://cs.carleton.edu/faculty/dlibenno/papers/lis-lcs/lislcs.pdf. Liben-Nowell, Vee and Zhu, Finding Longest Increasing and Common Subsequences in Streaming Data, section 1
. A strictly increasing subsequence instead requires . Always check which convention an algorithm uses, especially when values repeat.An increasing subsequence may skip positions; it neither rearranges values nor requires consecutive positions. Consider the deliberately constructed exampleThe indices select , an increasing subsequence of length four. The indices select , a strictly increasing subsequence of length three. In contrast, rearranges the input and is not a subsequence. The longest consecutive nondecreasing block is , of length three; requiring consecutive positions would therefore solve a different problem.
Think of an increasing subsequence as preserving ordered observations while skipping interruptions. For the example, discarding leaves four observations with no downward step. The longest increasing subsequence asks how much of the original order can be kept. This is an order comparison, rather than a claim about the size of upward or downward changes: replacing all values by their squares when the values are nonnegative leaves every allowed selection unchanged. More generally, any strictly order-preserving relabeling has this property.
Information retrieval 2026-11-05
Information retrieval finds material relevant to an information need within a collection, commonly documents or passages. A query expresses part of that need; a retrieval system selects or ranks candidate material. Relevance is therefore part of the task, beyond simply checking whether a stored identifier matches.[ref]
Introduction to Information Retrieval by Christopher D. Manning and others. Chapter 1, Boolean retrieval, opening definition and search examples
For example, suppose a query returns five documents, three relevant, while the collection contains six relevant documents altogether. Its precision is , while its recall is . Returning everything increases coverage but can overwhelm the user with irrelevant material. An inverted index accelerates term lookup; scoring and evaluation address which retrieved results are useful. Information retrieval consequently combines data structures, ranking algorithms and evidence about the user's task.
Insertion sort 2026-10-13
Insertion sort grows a sorted prefix of an array one entry at a time. In the adjacent-swap version, start with position , compare its current sort key with the preceding sort key, and swap the complete sorting records only when the right sort key is strictly smaller. Continue leftward until no swap is needed or the entry reaches position zero; then process original position . A tie stops the pass. This is the strict comparison and exchange rule in the authored implementation.[ref]
Take , where the subscript labels a complete sorting record and comparisons inspect only its sort key. Starting from index zero, the complete key-comparison trace is:
The loop invariant is that, before pass , positions satisfy sortedness and contain precisely the entries originally in that prefix. Moving the next entry left through strictly larger sort keys extends that prefix, and every swap retains sorting permutation preservation. Equal-key entries never cross, giving stable sorting. Each leftward step decreases the position, and each completed pass increases the prefix length, so the algorithm terminates.
With constant-cost key comparisons and swaps, reverse-ordered distinct sort keys cause comparisons and swaps. Thus worst-case time complexity is in Big O notation. An already sorted array needs only key comparisons for and no swaps. The adjacent-swap version uses constant auxiliary space complexity. Small or nearly sorted arrays can therefore make insertion sort useful despite its quadratic worst case.
Interval scheduling 2026-10-18
Given a finite set of jobs with fixed half-open intervals , where , choose a subset of maximum cardinality. Each job occupies one shared resource throughout its interval. A feasible solution has pairwise disjoint intervals: for distinct selected jobs , either or . Thus a finish and the next start may coincide. Every job has value one; occupied time is not the objective function.[ref]
Lecture 1: Introduction. 6.046J Design and Analysis of Algorithms, Spring 2015; Printed p. 2, Interval Scheduling: fixed requests, one resource, compatibility with endpoint equality, maximum size
Consider these six original jobs, with arbitrary time units:Job can be followed immediately by and . Job conflicts with all three. Starting the resource earlier is therefore not automatically beneficial: one long commitment can displace several shorter requests.
The earliest-finish greedy algorithm uses a sorting algorithm to put jobs in nondecreasing finish time. Scan that order, accepting the first job and then each job whose start is at least the last accepted finish. Break finish-time ties arbitrarily; an empty input returns the empty set. For these jobs, the order and decisions areAfter , job starts before the current finish five and is rejected. Accept ; then reject because six is before seven. Finally accept . The result is , with cardinality four. Leaving idle makes room for more jobs.
By contrast, the earliest-start rule scans . It accepts , skips , accepts , and skips . Its feasible solution contains only two jobs. Here and meet at time six and are compatible; and overlap on .
Earliest finish accepts four jobs; earliest start accepts two
. The same six original intervals appear in both panels. Colored jobs are accepted and gray jobs rejected. A filled start and hollow finish depict a half-open interval; jobs meeting at an endpoint are compatible. Details.There is also an elementary optimality certificate for this example. The four subsets , , and form a partition of a set of the jobs. A feasible solution takes at most one job from each group: overlap, as do , and each other group is a singleton. Hence four is an upper bound, attained by . Checking all subsets gives a unique optimum of size four: .
The earliest-finish theorem states that this greedy algorithm maximizes job count for every finite instance of interval scheduling. For the exchange argument, let be the first job in an optimal feasible solution and an earliest-finishing job. Every later selected job satisfiesReplace by ; compatibility and cardinality survive. The remainder must be optimal among jobs starting at or after , or improving it would improve the whole selection. Mathematical induction on the smaller remaining instance, starting with the empty set, completes the outline.[ref]
Greedy Algorithms. Algorithms by Jeff Erickson; §4.2 Scheduling Classes, Lemma 4.3 and Theorem 4.4, printed pp. 163–164; endpoint equality is allowed by our half-open convention
Why is the algorithm fast? Once sorted, each job is examined once, using only the last accepted finish to decide compatibility. The scan takes time; comparison sorting algorithms give total time complexity for , in Big O notation, assuming constant-cost endpoint comparisons. Already sorted input needs only the scan.[ref]
Lecture 1: Introduction. 6.046J Design and Analysis of Algorithms, Spring 2015; Printed pp. 2–4, earliest-finish rule, compatibility and first-job exchange; scan cost follows by counting one comparison per subsequent request
Inverse Ackermann function 2026-10-18
For the displayed Ackermann function convention, one possible inverse-growth scale is for positive integers . It gives through , from through , and from through . Several inverse Ackermann function conventions occur in algorithm analysis; changing convention can shift these small values without changing the very slow growth relevant to the disjoint-set data structure. This inverse-growth definition does not invert a two-variable function as an ordinary one-variable inverse function.
J. A. Robinson 2026-11-05
J. A. Robinson introduced the resolution principle in his 1965 paper on machine-oriented logic. His clause-based resolution calculus, using unification, supports a complete refutation procedure for first-order logic: an unsatisfiable clause set has a derivation of the empty clause.[ref]
For example, resolving with uses the first-order substitution and produces . The rule separates the logical justification of a step from the search for useful clauses. A complete search procedure can still run indefinitely on a satisfiable input; completeness does not supply a decision algorithm for all first-order logic.
Jeff Erickson Created 2026-10-18 Updated 2026-11-05
Jeff Erickson is a computer scientist whose work concerns computational geometry, computational topology, graph algorithms and data structures. His research also examines how students learn to design algorithms.[ref]
His open textbook Algorithms by Jeff Erickson develops algorithm design through explicit examples, proofs and analysis. Its treatments of dynamic programming and depth-first search show complementary organizing ideas: reuse results of smaller subproblems, or explore the structure of a graph. The explanations connect the procedure with the invariant or recurrence that justifies it.[ref]
Homepage: jeffe.cs.illinois.edu/
Portrait drawing of Jeff Erickson
. Drawing by Damien Erickson (2018), from University of Illinois Urbana-Champaign's official researcher profile. Source. Jeffrey Shallit Created 2026-10-20 Updated 2026-11-05
Jeffrey Shallit studies combinatorics on words, formal languages, automata theory and algorithmic number theory. His work connects finite descriptions of sequences with arithmetic structure and algorithms for deciding properties of those sequences.
His personal page gives a useful caution about experimentation: an apparently valid linear recurrence for one integer sequence fails only at index 11056. Long numerical agreement can motivate a conjecture, but a mathematical proof needs a structural reason that the identity continues indefinitely.[ref]
Portrait of Jeffrey Shallit
. Identified portrait on the author homepage; the page dates the photograph to 27 June 2024. Source. Jiří Matoušek (mathematician) Created 2026-10-24 Updated 2026-11-05
Jiří Matoušek was a mathematician whose research and exposition connected discrete geometry, combinatorics, topology and theoretical computer science. His books and notes made geometric and topological methods accessible for discrete problems, including bounds for graph coloring and the design of algorithms.[ref] His account of applications of topology emphasizes a productive change of viewpoint: a finite combinatorial question can be encoded by a continuous space, where a topological obstruction forces the desired conclusion.[ref]
https://kam.mff.cuni.cz/~matousek/topchap.pdf. Topology, chapter for Mathematics++, introduction
This approach lets qualitative information about continuity and symmetry produce exact conclusions about discrete objects.Portrait of Jiří Matoušek (mathematician)
. Renate Schmid; copyright Mathematisches Forschungsinstitut Oberwolfach, 2005. CC BY-SA 2.0, via Wikimedia Commons. Source. Joe Sawada Created 2026-10-20 Updated 2026-11-05
Joe Sawada studies combinatorial generation: efficient ways to list all objects in a specified family. His author homepage highlights Gray codes, where consecutive objects differ by a small change, and De Bruijn sequences, which encode many short words through overlapping windows. These viewpoints make the order of generation part of an algorithm's design.[ref]
Jonas Almström Duregård Created 2026-10-14 Updated 2026-11-05
Jonas Almström Duregård is a computer scientist and a coeditor, with Peter Ljunglöf and Alex Gerdes, of Data Structures and Algorithms edited by Peter Ljunglöf and others. The book connects data structures with algorithms that operate on them, including linked lists, dynamic arrays and binary trees. Its organization illustrates the distinction between an interface's promised operations and the representation used to implement them.[ref]
Homepage: www.chalmers.se/en/persons/almstroj/
Jonathan Richard Shewchuk 2026-11-05
Jonathan Richard Shewchuk developed adaptive exact arithmetic methods for robust computational geometry predicates. Orientation and incircle tests depend on the sign of a determinant; an incorrectly rounded sign near zero can corrupt the geometric decisions of an algorithm. His method spends additional precision only when needed to establish the correct sign.[ref]
For example, three nearly collinear points may give an orientation determinant extremely close to zero even when their coordinates are individually unexceptional. A fast approximate evaluation can resolve an easy case, while a difficult case triggers more exact work. This connects numerical accuracy to a discrete geometric decision, not merely to the number of printed decimal places.
Homepage: people.eecs.berkeley.edu/~jrs/
Portrait of Jonathan Richard Shewchuk
. Source. Kahan summation algorithm 2026-10-20
A summation algorithm that keeps a correction for low-order information lost when adding floating-point numbers. Feeding that correction into subsequent additions can greatly reduce accumulated rounding error compared with straightforward summation.







