Algorithmic game theory Created 2026-10-31 Updated 2026-11-05
Algorithmic game theory studies the interaction of algorithms with strategic behavior. It asks both how hard equilibria are to compute and how mechanisms should be designed when participants choose actions to improve their own utility.
For example, a shortest-path algorithm optimizes travel time for one specified traveler, while a routing game asks what happens when many travelers each choose a route. A Nash equilibrium can have a larger total delay than a centrally chosen allocation. Quantifying that loss by a price of anarchy links incentives with computational optimization. The input representation, equilibrium concept and allowed running time must all be specified.
An algorithm portfolio schedule specifies how computational resources are assigned to members of an algorithm portfolio over time. For a sequential algorithm portfolio, it states which algorithm receives each time interval, whether interrupted work is resumed or discarded, and when computation stops. A parallel algorithm portfolio also needs a processor allocation and a rule for accepting and combining results. Listing candidate algorithms alone does not specify a schedule.
An original interleaving example makes the distinction between processor time and elapsed time explicit. Suppose algorithms A and B need respectively and seconds of processor time on a particular input. Give A one second, then B one second, repeating while preserving both states and stopping at the first accepted result. A receives its third second during elapsed interval , so the portfolio finishes at seconds. At that point A has used processor-seconds and B has used . With two dedicated processors, the corresponding parallel algorithm portfolio would finish at seconds. These calculations assume no algorithm portfolio switching overhead and no resource contention.
More generally, let be processor time supplied to candidate by elapsed time , and let be its required processor time. In the resumable, interference-free model, the completion time is
Discarding a state on every interruption changes this model: separate short runs do not necessarily accumulate into one longer run. The original portfolio study compared parallel, interleaved and restart execution precisely because these are different policies.[ref]
Choose an objective before comparing algorithm portfolio schedules: expected value of running time, probability of finishing by a deadline, and total computing work need not favor the same allocation. A schedule chosen using retrospective runtimes also requires evaluation on inputs that did not determine the schedule.
Box nesting Created 2026-10-24 Updated 2026-11-05
Represent a -dimensional box by its side-length vector and allow axis permutations. A box fits another when its permuted dimensions are all strictly smaller. Sorting each vector reduces containment to coordinatewise strict comparison, by the sorted-coordinate criterion for box containment. For an input-order-preserving subsequence, the longest chain ending at position has one plus the greatest chain length at an earlier fitting position. This last-box decomposition proves the dynamic programming recurrence. Sorting all dimensions and testing all ordered index pairs takes running time. Arbitrary reordering is a different convention, handled by the containment directed acyclic graph.
Computational complexity theory Created 2026-09-24 Updated 2026-11-05
Computational complexity theory studies the resources required to solve families of computational problems. A statement specifies an input encoding and a model of computation, then measures resources such as running time, computer memory or query complexity as the encoded input length grows. An algorithm's upper bound describes one method; a problem lower bound constrains every permitted algorithm in the stated model.
For decision problems, a complexity class collects problems with a shared resource guarantee. P uses deterministic polynomial time; NP permits polynomially bounded witnesses checked in polynomial time. The distinction separates finding an answer from verifying a supplied certificate.[ref]
The cost model is part of the mathematics. Bit complexity charges for arithmetic on operands of growing size, while a comparison model counts comparisons of keys. A polynomial-time algorithm also need not be practical at every scale: its exponent and constants still affect actual running time. These distinctions make complexity bounds useful for comparing both mathematical possibilities and concrete implementations.
Computational problem Created 2026-09-24 Updated 2026-11-05
A computational problem specifies what counts as a valid output for each permitted input. A binary relation can express this requirement: means that is a valid answer to . The computational problem is the specification; an algorithm is a proposed way to satisfy it.
For example, given an array and value , under the promise that occurs, a search problem can request any index with . Repeated values may give several valid outputs. The related decision problem only asks whether an occurrence exists and requires a yes-or-no answer. Stating the encoding, permitted instances and required answer prevents these tasks from being confused when comparing running time or verification costs.
Deterministic algorithm 2026-11-05
A deterministic algorithm has one prescribed next step for each permitted input and current computational state. Thus the same input and initial state give the same execution trace and, if execution terminates, the same output. This is a statement about the abstract transition rules, not about identical elapsed time on different computers.
Binary search with a fixed midpoint rule is deterministic: every comparison determines which remaining interval is searched next. Quicksort with a fixed pivot-selection rule is also deterministic, even though different inputs can produce very different running times. Determinism therefore does not imply a constant or small time complexity.
A randomized algorithm additionally receives random choices. Fixing its entire random-choice sequence makes its subsequent execution deterministic, but averaging over those choices is essential to its randomized guarantees. A Nondeterministic Turing machine is a different mathematical model: its branches describe possible computation paths, rather than a probability distribution supplied by an implementation.
For each candidate first index in a sorted array, use lower-bound search for only in the suffix starting at . A matching result is automatically at a different position. The outer loop invariant excludes all solutions whose smaller index precedes ; an unsuccessful suffix search extends this exclusion by one. Exhaustion proves absence of any pair. Searching all suffixes gives running time and constant auxiliary space. Compute the complement in a sufficiently wide type to avoid integer overflow before comparison.
Edit distance 2026-10-24
An edit distance is the minimum cost of allowed edits transforming one finite sequence into another. With unit insertion, deletion and substitution costs, the prefix table has boundaries , and recurrence . The last alignment action gives one of these cases; appending that action to an optimal shorter alignment proves the converse inequality. Thus induction proves the recurrence, yielding running time for nonempty input lengths . Two rolling rows suffice when only the distance is required; retaining predecessor actions supports reconstruction.
Write column of a two-row binary game as , with the row player's payoff first. If there is no pure Nash equilibrium, the column player's maximum payoff in each row must be one. Otherwise every column would be a best response in a zero-payoff row, and excluding an equilibrium there would force the opposite row to dominate in every column, giving an equilibrium in that opposite row.
A column maximizing the column player's top-row payoff must then have , or its top cell would be an equilibrium. Its bottom column-player payoff must be zero, or its bottom cell would be one. Thus a column occurs. The same argument for the bottom row produces . No column can give the column player payoffs , since a row-player best response within that column would be a pure equilibrium.
Consequently, if neither pure equilibrium is found, mix equally over the two rows and equally over those two special columns. The row player's two expected payoffs are ; every column gives the column player at most , and the supported columns achieve . This is a Nash equilibrium. Computing the two row maxima, scanning for pure equilibria and locating the two special columns takes running time for columns.
A parameterized decision problem is fixed-parameter tractable if an algorithm decides every instance of encoded length and parameter in running time at most , for a computable function and a constant independent of . The distinction is in the exponent: has this form, whereas an bound alone does not establish fixed-parameter tractability. Branching on an uncovered edge gives a fixed-parameter tractable vertex cover decision problem.
Formal language Created 2026-09-24 Updated 2026-11-05
A formal language over a fixed finite alphabet is a set of finite words. Here contains every finite word over , including the empty word . A formal language may contain finitely or infinitely many such words.[ref]
For example, over contains , ab and aaabbb, but not abab. The notation specifies a set of permitted words; it does not itself give a running time for deciding membership. The empty language contains no words, whereas contains one.
Concatenation of formal languages combines permitted words from two formal languages. Automata theory and computability theory ask which machine models can recognize such sets, while computational complexity theory asks what resources membership decisions require.
Reverse a finite acyclic linked list using a reversed-prefix head and an untouched-suffix head. Save the suffix head's old successor, redirect its successor to the prefix, then advance both heads. If and are the current sequences of node identities and the original sequence, the loop invariant is , with the two reachable node sets disjoint and all payload fields unchanged. Moving from to preserves this equation. The suffix length decreases, and at exit the prefix is exactly the reversed original list. The method takes linear running time and constant auxiliary space, reusing the original nodes.
In-place merge 2026-10-31
Combining adjacent sorted runs within their existing array segment. A simple constant-auxiliary-space version moves the smaller second-run head before the first-run head by shifting the intervening block one place right. The finished prefix is always a merge of the consumed portions. This can use quadratic running time; minimizing storage does not automatically preserve the linear cost of a disjoint-output merge.
Kevin C. Webb Created 2026-10-13 Updated 2026-11-05
Kevin C. Webb coauthored Dive into Systems by Suzanne J. Matthews and others, which connects computer programs to their machine-level implementation. Its progression through programming languages, instruction set architectures, computer memory and parallel computing explains how the representation and execution of a computer program affect its running time. The authors maintain an open online version with concrete examples.[ref]
Figure 1.
Portrait of Kevin C. Webb
. External portrait hosted by Swarthmore College Department of Computer Science. Source.
Process vertices in a topological sorting, initializing a fixed source to zero and all other labels to . All possible predecessors have already been processed when a vertex is reached, so maximum-relaxation computes the best path ending there. Induction along the order proves correctness for arbitrary signed weights. Initializing every vertex to zero instead allows a path to start anywhere. Each vertex and edge is processed a constant number of times, giving running time. For a nonempty-path requirement, maximize the edge-extension candidates rather than including zero as the final answer.
Machine learning Created 2026-10-18 Updated 2026-11-05
Machine learning develops algorithms that use data or experience to improve performance on a specified task. The task, the experience available to the algorithm and the performance criterion must all be stated. A statistical classification system might learn from labelled training data; an unsupervised learning method instead looks for structure without those labels.[ref]
For example, a linear regression model can learn coefficients predicting a numerical outcome from measured inputs. Minimizing its error on the training data determines a fitted model, but does not establish how well it predicts new observations. A separate test set estimates performance on data withheld from fitting. Overfitting occurs when fitting peculiarities of the training data impairs this generalization; data leakage can make the evaluation misleading.[ref]
Statistical learning supplies tools for reasoning about these prediction and uncertainty questions. A useful learned model is therefore assessed through an explicit task and evaluation, alongside the running time and other resources needed to train and use it.
Maximum priority queue Created 2026-10-24 Updated 2026-10-31
A priority queue whose distinguished entry has largest key. A max-heap implements maximum inspection in constant time, and insertion, extraction of a maximum and increasing the key of a located entry in running time. An entry handle needs its current heap index to support that last bound; searching by an arbitrary key can take linear time. Multiple entries can have equal keys without requiring a particular tie order.
Minimum coin change recurrence Created 2026-10-25 Updated 2026-10-31
For positive integer denominations, the coin change problem asks for coins summing to a target amount ; this recurrence minimizes their number. With unlimited supply, use the recurrence in the title, , and for an unreachable amount. Classifying a solution by its last coin proves the recurrence by induction. Recording that coin reconstructs an optimum. The table uses running time and space complexity; this is a pseudopolynomial time bound.
If each available coin can be used only once, update for amounts in descending order for each coin. Descending order retains the previous row's value at and prevents reuse. Ascending order instead permits repeated use of the current coin. The distinction is a dependency invariant, not a cosmetic loop-order choice.
Monotone threshold activation Created 2026-10-25 Updated 2026-10-31
In a finite graph, start with an active vertex set and thresholds . An inactive vertex becomes active once sufficiently many neighbours are active, and activated vertices remain active. Add eligible vertices until no more can be added. If is any threshold-closed set containing , induction shows every activated vertex lies in . The terminal active set is itself closed, so it is the least such closure and is independent of the eligible-vertex processing order.
For integer thresholds, compute active-neighbour counts and keep a work queue of vertices newly reaching their thresholds. Each vertex is queued once and each edge is inspected a constant number of times, giving running time. Strict-majority activation has , so an isolated inactive vertex never qualifies. A maximum priority queue of activation margins is an alternative implementation.
Parameter passing 2026-10-31
The convention relating a procedure's formal parameters to its arguments. Copying a large array at every recursive call can dominate running time, even when the procedure never modifies the argument.