Topic domain
Algorithms
Correctness, cost, and the design techniques behind efficient computation.
- Articles
- 120
- Clusters
- 12
- Foundational
- 36
- Intermediate
- 48
- Advanced
- 36
Asymptotic bounds, recurrences, and amortized accounting.
- Amortized Analysis of Dynamic Arrays
- Asymptotic Notation as Sets of Functions, Not Growth Rates
- The Master Theorem and the Recursion Tree Behind Its Three Cases
- Comparison Lower Bounds From Decision Trees and Adversaries
- Expected Cost, Amortized Cost, and Where the Average Comes From
- Space Complexity Accounting for Recursion, Auxiliary Buffers and Output
Comparison sorts, distribution sorts, and order statistics.
- The Comparison Sorting Lower Bound and What It Actually Counts
- Insertion Sort and the Inversion Count That Predicts Its Runtime
- Merge Sort: Why Stability Survives the Merge and What the Buffer Costs
- Quicksort Partition Schemes and the Duplicate-Key Quadratic
- Counting and Radix Sort: Choosing the Pass Count and the Digit Width
- Comparator Contracts and Why a Bad One Crashes the Sort
Trees, hashing, and structures that answer lookup queries.
- Lower Bound, Upper Bound, and the Invariant That Makes Binary Search Correct
- Interpolation Search and What Uniform Key Distribution Buys
- Eytzinger Layout: Storing a Search Tree in Level Order
- B-Tree Fanout Arithmetic and the Cost of a Point Lookup
- Extendible Hashing and Why the Directory Doubles
- Probe Sequences in Open-Addressed Hash Tables
Reachability, connectivity, and traversal order.
- Adjacency Lists, Matrices, and the Cost of Asking Who Is Adjacent
- Why Breadth-First Search Cannot Discover Vertices Out of Distance Order
- Discovery and Finish Times: What DFS Edge Classification Encodes
- Iterative Depth-First Search Without Losing Finish Times
- Labelling Connected Components Once Versus Maintaining Them Under Insertions
- Two-Colouring a Graph: Why BFS Decides Bipartiteness and Odd Cycles Do Not
Path costs, relaxation, and all-pairs methods.
- Relaxation and the Optimality Condition Behind Shortest-Path Algorithms
- Dijkstra and the Settled-Set Invariant
- Bellman-Ford, Round Counts, and Negative-Cycle Detection
- Priority Queues for Dijkstra: Decrease-Key, Lazy Deletion, and Buckets
- A* and the Conditions on a Heuristic
- Bidirectional Search and the Problem of Knowing When to Stop
Optimal substructure, state design, and memoization.
- Recurrences as DAGs: Why Optimal Substructure Makes Tables Work
- Memoization Mechanics: Cache Keys, Laziness, and Recursion Depth
- State Sufficiency: What the Past Must Leave Behind
- Pseudo-Polynomial Knapsack: Why the Capacity State Is Not Polynomial
- Edit Distance and the Shape of a Two-Dimensional Table
- Interval DP: Choosing the Last Operation Instead of the First
Exchange arguments, matroids, and ratio guarantees.
- The Exchange Argument: Proving a Greedy Choice Is Safe
- Earliest-Finish-First for Interval Scheduling
- Huffman Coding and the Greedy Merge
- Matroid Structure and the Exact Boundary of Greedy Optimality
- Fractional Relaxation and the Knapsack Integrality Gap
- Kruskal, the Cut Property, and Why Any Minimum Edge Is Safe
Pattern matching, suffix structures, and text compression.
- The Prefix Function and Linear-Time Exact Matching
- Polynomial Rolling Hashes and the Rabin-Karp Trade
- Right-to-Left Scanning and the Boyer-Moore Shift Tables
- Aho–Corasick Failure Links and Multi-Pattern Scanning
- Suffix Arrays, Prefix Doubling, and the Kasai LCP Scan
- Suffix Automata and Counting Distinct Substrings Online
Convexity, intersections, and spatial queries.
- Convex Hulls by Monotone Chain
- Point in Polygon: Crossing Number and Winding Number
- Detecting Segment Intersections with Orientation Tests
- Exact Geometric Predicates and Adaptive Precision
- Bentley–Ottmann: Reporting All Crossings with a Sweep Line
- Delaunay Triangulation and the Empty Circumcircle Test
Probability in algorithm design and analysis.
- Unbiased Random Integers from a Finite Random Source
- Uniform Random Permutations and the Fisher-Yates Shuffle
- Randomized Quicksort and the Expected Comparison Count
- Randomized Recurrences and the Indicator Variable Method
- The Probabilistic Method: Proving That a Good Object Exists
- Universal Hashing and Guarantees That Hold for Every Input
Sublinear sketches over unbounded input.
- The Streaming Model: One Pass, Sublinear Space, Approximate Answers
- Counting Distinct Elements with HyperLogLog Registers
- Frequency Moments and the Tug-of-War Sketch
- Count-Min Sketch: Why the Minimum of Overestimates Is the Estimate
- Heavy Hitters with Misra-Gries Counters and Space-Saving Buckets
- Reservoir Sampling and Priority Sampling on a Single Pass
Work, span, and concurrency in algorithm design.
- Work, Span, and the Bound on Parallel Execution Time
- Reduction Trees and What Associativity Buys
- Work Stealing: Per-Processor Deques and Why Thieves Take the Oldest Task
- Parallel Prefix Scan: Hillis-Steele Versus Blelloch
- Merge-Path Partitioning: Splitting Two Sorted Runs Without Sampling
- Granularity and the Sequential Cut-Off
All Algorithms articles
- Oct 9, 2026 Counting and Radix Sort: Choosing the Pass Count and the Digit Width How stable counting sort works in one linear pass, how LSD radix composes passes, and how digit width trades passes against counter size.
- Oct 9, 2026 Topological Order From Finish Times and Why the Reverse Is the Answer The finish-time argument that makes reverse post-order a valid topological sort, why the reverse prefix order is not, and how cycle detection folds into the same traversal.
- Oct 7, 2026 Bidirectional Search and the Problem of Knowing When to Stop Why two frontiers can meet without the answer being final, which stopping rules are provably safe, and how the meeting point is recovered from two label arrays.
- Sep 26, 2026 Adjacency Lists, Matrices, and the Cost of Asking Who Is Adjacent How adjacency matrices, per-vertex lists, and compressed sparse row arrays differ in memory, neighbour iteration, and edge lookup, and which graph shapes favour each.
- Sep 22, 2026 Quicksort Partition Schemes and the Duplicate-Key Quadratic How Lomuto and Hoare partitioning differ in swap count and branch behaviour, why two-way partitions degrade on equal keys, and what three-way partitioning restores.
- Sep 17, 2026 Unbiased Random Integers from a Finite Random Source How taking a remainder from a random word introduces measurable bias, and how rejection sampling and multiply-and-reject produce exact uniformity at a bounded cost.
- Sep 14, 2026 Monotone Decision Points: Divide-and-Conquer Optimization in DP When the argmin of a one-dimensional recurrence is monotone in the state, the transition scan collapses from a factor of n to a logarithm, and the Monge condition is what licenses it.
- Aug 19, 2026 Right-to-Left Scanning and the Boyer-Moore Shift Tables How comparing the pattern from its end lets a matcher skip whole alignments, what the bad-character and good-suffix tables each guarantee, and where the two rules disagree about the shift.
- Jul 27, 2026 Gap Amplification and Why Some Ratios Cannot Be Improved How the PCP theorem turns a gap in a constraint system into an inapproximability result, and what that means for the approximation ratios of the algorithms it bounds.
- Jul 24, 2026 Bit-Parallel Approximate Matching with Packed DP Rows How a whole column of the edit-distance table fits into one machine word, what the bit-vector recurrence computes, and where the 64-character pattern limit forces blocking.
- Jul 21, 2026 Counting Distinct Elements with HyperLogLog Registers How a fixed array of small registers estimates cardinality to within about one percent, why the estimator uses a harmonic mean, and how register-wise maximum makes sketches mergeable.
- Jul 20, 2026 The Harmonic Bound for Greedy Set Cover How cost-per-new-element selection yields an H(n) approximation, why that bound is tight, and what the frequency parameter changes.
- Jul 17, 2026 Quantile Summaries: Greenwald-Khanna Bounds and the KLL Compactor How a deterministic summary tracks ranks within a guaranteed error using tuple invariants, and how randomised compaction reaches constant space per item with a smaller constant.
- Jul 15, 2026 Trapezoidal Maps and Randomized Point Location How a planar subdivision becomes a DAG of trapezoids that answers containment queries in expected O(log n), and why the search structure is a second, separate object.
- Jul 8, 2026 Bellman-Ford, Round Counts, and Negative-Cycle Detection Why |V|-1 passes suffice, what the extra pass detects, how queue-driven label correction changes the cost without changing the answer, and why detection is easier than extracting the cycle.
- Jul 5, 2026 Recurrences as DAGs: Why Optimal Substructure Makes Tables Work How a recurrence defines a graph of states, why overlapping subproblems collapse an exponential recursion tree into a polynomial one, and where the optimal-substructure argument fails.
- Jun 22, 2026 Introsort: Bounding Quicksort with a Depth Counter and a Heap How a recursion-depth budget converts quicksort into a worst-case n log n algorithm, and why heapsort is the fallback rather than merge sort.
- Jun 6, 2026 Insertion Sort and the Inversion Count That Predicts Its Runtime How the shift loop makes insertion sort cost exactly n plus the number of inversions, why that adaptivity matters more than the quadratic worst case, and what binary insertion does not fix.
- May 28, 2026 Expected Cost, Amortized Cost, and Where the Average Comes From Three kinds of average appear in algorithm analysis. They average over different things, hold under different adversary models, and cannot be substituted for one another.
- May 11, 2026 Space Complexity Accounting for Recursion, Auxiliary Buffers and Output Stack depth, explicit work arrays and output storage are three separate memory costs, and the convention for counting them decides whether an algorithm is called O(1) space, O(log n) or O(n).
- May 3, 2026 Minimal Perfect Hashing for Static Key Sets How two-level displacement schemes map a fixed set of keys onto consecutive slots with no collisions, and why the result costs about two bits per key.
- Apr 30, 2026 Median-of-Medians and the Deterministic Linear Selection Bound Why grouping into fives makes the pivot provably good, how the recurrence resolves to a linear bound, and why the constant keeps it out of hot paths.
- Apr 27, 2026 Granularity and the Sequential Cut-Off How to size parallel tasks so that scheduling overhead stays below the work they contain, and how the optimum shifts with span, memory behaviour, and the runtime.
- Apr 18, 2026 Iterative Depth-First Search Without Losing Finish Times Why a stack of vertices does not reproduce recursive DFS, how to keep an explicit frame with a resume index, and what changes when the traversal can be paused and resumed.
- Apr 12, 2026 Convex Hulls by Monotone Chain How a lexicographic sort followed by two stack scans produces the convex hull in O(n log n), and why the collinearity rule decides which points survive.
- Feb 12, 2026 Parallel Prefix Scan: Hillis-Steele Versus Blelloch Two scan algorithms with the same span class and different work, the up-sweep and down-sweep that make Blelloch work-optimal, and the arithmetic that decides between them.
- Feb 2, 2026 The Comparison Sorting Lower Bound and What It Actually Counts Why comparison sorts need about n log n comparisons, how the decision-tree and adversary arguments differ, and which cost models the bound leaves out.
- Jan 31, 2026 Contraction Hierarchies and Preprocessing for Road Networks How contracting vertices in a fixed order adds shortcut edges that preserve all distances, and why a bidirectional search that only moves upward then answers queries with a small fraction of the work.
- Jan 29, 2026 Edit Distance and the Shape of a Two-Dimensional Table How the Levenshtein recurrence fills a grid, why three neighbouring cells are enough, and how the band and Hirschberg variants trade the full matrix for time and reconstruction ability.
- Jan 21, 2026 Fortune's Sweep and the Beach Line of Parabolic Arcs How a moving line and a growing chain of parabola arcs produce the Voronoi diagram in O(n log n), and why circle events are the subtle part.
- Jan 21, 2026 The Prefix Function and Linear-Time Exact Matching How the prefix function records the longest proper border of each pattern prefix, and why following failure links keeps total matching work linear in the text length.
- Jan 17, 2026 Comparison Lower Bounds From Decision Trees and Adversaries Counting distinguishable outcomes gives the n log n sorting bound. When that counting is not available, an adversary argument supplies the same conclusion by a different route.
- Dec 5, 2025 Quickselect and the Cost of Finding One Element in Place How the selection recursion differs from quicksort, why the expected cost is linear, and which inputs make the linear promise fail.
- Dec 5, 2025 Work, Span, and the Bound on Parallel Execution Time How a computation DAG yields two numbers, work and span, and why their ratio rather than the processor count sets the achievable speedup.
- Dec 1, 2025 Asymptotic Notation as Sets of Functions, Not Growth Rates Big-O names a set of functions fixed by a constant and a threshold. What those witnesses promise for two-input bounds, for logarithms, and for small n.
- Nov 28, 2025 Matroid Structure and the Exact Boundary of Greedy Optimality The independence axioms that make greedy weight-ordering optimal, how spanning trees and interval scheduling fit them, and the obstruction that knapsack exhibits.
- Nov 23, 2025 Heavy Hitters with Misra-Gries Counters and Space-Saving Buckets Two deterministic summaries that find every item exceeding a fraction of the stream, why decrementing all counters preserves the guarantee, and how their error differs in direction.
- Nov 17, 2025 Longest Increasing Subsequence and the Tails Array Invariant The O(n log n) patience-sorting method keeps one number per length instead of a full two-dimensional table, and the invariant explaining why is a dominance argument.
- Oct 30, 2025 Floyd-Warshall, Johnson Reweighting, and the All-Pairs Choice Two all-pairs methods with opposite preconditions: one tolerates negative edges through a triple loop, the other restores nonnegativity by changing the weights and then runs Dijkstra from every vertex.
- Oct 29, 2025 Universal Hashing and Guarantees That Hold for Every Input How choosing a hash function at random from a pairwise-independent family removes the adversary s advantage, and what a family costs to evaluate and to build.
- Oct 28, 2025 External Sorting: Run Generation, k-Way Merge, and the Fan-In Limit How replacement selection builds long runs from a bounded buffer, how a loser tree merges k runs, and why the merge width is capped by seeks rather than memory.
- Oct 14, 2025 Comparator Contracts and Why a Bad One Crashes the Sort Strict weak ordering is the precondition every library sort relies on; violating it turns a sort into an out-of-bounds read, and the failure is silent until it is not.
- Oct 9, 2025 The Potential Function Behind the Inverse-Ackermann Union-Find Bound Disjoint-set forests with union by rank and path compression cost O(m alpha(n)) for m operations, and the proof is a ranked accounting over nodes rather than any single tree shape.
- Sep 27, 2025 Dijkstra and the Settled-Set Invariant Why extracting the minimum tentative label is safe only when weights are nonnegative, how the exchange argument proves it, and what a settled set costs in memory and bookkeeping.
- Sep 25, 2025 Exact Geometric Predicates and Adaptive Precision Why the sign of a determinant is the fragile part of computational geometry, how error bounds let a fast float path stay exact, and when exact arithmetic becomes unavoidable.
- Sep 4, 2025 Randomized Rounding of Linear Programs into Integer Solutions How solving a linear relaxation and rounding each variable by its own probability produces integer solutions whose expected cost is within the relaxation bound, and where the argument needs repair.
- Aug 29, 2025 Relaxation and the Optimality Condition Behind Shortest-Path Algorithms How one comparison operation encodes the shortest-path optimality condition, why the schedule of relaxations determines which algorithm results, and what happens when the answer is unbounded below.
- Aug 8, 2025 Merge Sort: Why Stability Survives the Merge and What the Buffer Costs The merge invariant that preserves equal-key order, the three places extra memory is required, and how natural runs turn the algorithm adaptive.
- Aug 4, 2025 Earliest-Finish-First for Interval Scheduling Why sorting intervals by finishing time and accepting each compatible one yields a maximum set, and why sorting by start time or by length does not.
- Aug 1, 2025 Subset DP with Bitmask States: Held-Karp and the 2-to-the-n Wall Encoding a visited set as an integer makes the traveling-salesman recurrence exact in O(2^n n^2), and the same encoding supports submask enumeration and the sum-over-subsets transform.
- Jul 26, 2025 The Probabilistic Method in Derandomized Form: Conditional Expectations and Small-Bias Spaces How to remove randomness from an algorithm without losing its guarantee, using conditional expectations, pairwise-independent sample spaces, and epsilon-biased distributions.
- Jul 24, 2025 Learned Indexes: Fitting a Function Instead of Storing Keys How a model that predicts a key position can replace a B-tree search, what the error bound guarantees, and why the last mile is always a search.
- Jul 24, 2025 The Exchange Argument: Proving a Greedy Choice Is Safe How replacing the first divergence between an optimal solution and a greedy one establishes correctness, and why the same swap fails on problems like 0/1 knapsack.
- Jun 13, 2025 Labelling Connected Components Once Versus Maintaining Them Under Insertions How a single traversal assigns component identifiers in linear time, why the same problem becomes hard when edges arrive online, and what the two approaches cost on either side of that line.
- May 30, 2025 Bentley–Ottmann: Reporting All Crossings with a Sweep Line How a moving vertical line reduces segment intersection from all-pairs to neighbour checks, which events drive the sweep, and why degeneracies make the textbook algorithm hard to ship.
- May 17, 2025 Discovery and Finish Times: What DFS Edge Classification Encodes How the two timestamps recorded by depth-first search partition a directed graph into tree, back, forward, and cross edges, and why undirected graphs admit only two of those classes.
- May 14, 2025 Linear Sketches and Recovering Sparse Signals from Bucket Measurements How a sketch that only stores bucket sums can still return the identities of heavy items, why recovery needs a median over rows, and what the restricted isometry property guarantees.
- May 8, 2025 Two-Colouring a Graph: Why BFS Decides Bipartiteness and Odd Cycles Do Not The equivalence between bipartite graphs and odd-cycle-free graphs, how a colouring traversal detects the failure in linear time, and what the check does not decide.
- Apr 22, 2025 Detecting Segment Intersections with Orientation Tests How four orientation signs decide whether two segments cross, why the collinear cases need separate handling, and where the all-pairs test stops being affordable.
- Apr 15, 2025 Merge-Path Partitioning: Splitting Two Sorted Runs Without Sampling How binary search over the merge path cuts two sorted arrays into equal-sized pieces at the correct values, and why the split is exact rather than statistical.
- Apr 9, 2025 Frontier Traversal When the Graph Exceeds Cache: Top-Down Against Bottom-Up Why breadth-first search becomes memory-bound on large graphs, how a bottom-up step inverts the loop over unvisited vertices, and when switching directions pays.
- Apr 5, 2025 Huffman Coding and the Greedy Merge How repeatedly merging the two lowest-weight nodes builds an optimal prefix code, what the sibling-property exchange shows, and where the code length bound comes from.
- Mar 25, 2025 Bitmap and Roaring Indexes for Combining Predicates How one bit per document per value makes conjunctions word-parallel, why the space cost forces chunked container formats, and where the crossover thresholds sit.
- Mar 25, 2025 PRAM Variants and the Cost of Ignoring Memory What the EREW, CREW, and CRCW models permit, how work and depth carry over from the DAG, and why a model with free memory access mispredicts real parallel time.
- Mar 20, 2025 Amortized Analysis of Dynamic Arrays Why appending to a growable array is O(1) on average despite occasional O(n) reallocations, and how the accounting argument is constructed.
- Mar 15, 2025 Randomized Recurrences and the Indicator Variable Method How expected cost is derived from indicator variables and conditional expectations, and why a recurrence over the random split point needs a different treatment from a deterministic one.
- Mar 5, 2025 The Master Theorem and the Recursion Tree Behind Its Three Cases Divide-and-conquer recurrences are solved by comparing the work at the root with the work at the leaves. Where the three cases come from, and which recurrences slip past them.
- Feb 19, 2025 Lowlink Values: How One DFS Pass Finds Strongly Connected Components Why the minimum reachable discovery index identifies component roots, why edges to finished components must be ignored, and how the output order relates to the condensation.
- Feb 6, 2025 Concentration Inequalities for Algorithm Analysis: Chernoff, Azuma, and Their Assumptions How to turn an expected cost into a probability of exceeding a threshold, which inequality applies to which dependency structure, and what each one silently assumes.
- Jan 30, 2025 Extendible Hashing and Why the Directory Doubles How a trie of hash bits lets a file grow one bucket at a time, why the directory doubles rather than the file, and what the indirection costs on every probe.
- Jan 17, 2025 Minimum Mean Cycle and the Shape of Negative-Weight Answers How to find the cycle with the smallest weight per edge when every cycle has negative total weight, why the answer is a ratio rather than a sum, and how a parametric search reduces it to negative-cycle detection.
- Jan 6, 2025 Eytzinger Layout: Storing a Search Tree in Level Order How laying out a binary search tree in breadth-first order removes pointer chasing, enables branch-free traversal and prefetching, and what it costs on updates.
- Dec 14, 2024 Point in Polygon: Crossing Number and Winding Number Why two standard containment tests disagree on self-intersecting polygons, how each handles rays through vertices, and what the boundary rule costs.
- Dec 7, 2024 Separating Axes and Support Functions for Convex Intersection Tests How the Minkowski difference turns two convex bodies into one, why a finite set of axes suffices for polygons, and how GJK searches the difference without building it.
- Dec 3, 2024 Priority Queues for Dijkstra: Decrease-Key, Lazy Deletion, and Buckets The four practical queue designs behind the same greedy loop, what each costs per operation, and how integer weight bounds turn a comparison heap into an array of buckets.
- Nov 28, 2024 Amdahl, Gustafson, and the Fixed-Problem Fallacy Why the two scaling laws disagree, which quantity each holds constant, and how the choice of fixed time versus fixed problem size changes the predicted ceiling.
- Nov 19, 2024 Interval DP: Choosing the Last Operation Instead of the First Why splitting a contiguous range at its final split point turns exponential enumeration into an O(n cubed) table, and how the quadrangle inequality later removes a factor of n.
- Nov 8, 2024 Reduction Trees and What Associativity Buys Why a reduction needs an associative operator to be reordered, how tree shape changes floating-point results, and what error bounds the shapes imply.
- Oct 20, 2024 Memoization Mechanics: Cache Keys, Laziness, and Recursion Depth How top-down memoization turns a recursion tree into a DAG, what the cache key must contain to be sound, and why the lazy traversal sometimes loses to a full table.
- Oct 12, 2024 LZ77 and LZ78 Parsing: Offsets Versus a Phrase Dictionary How a sliding window turns repetition into (distance, length) pairs, why LZ78 replaces the window with an explicit phrase table, and what each costs at decode time.
- Oct 4, 2024 Suffix Arrays, Prefix Doubling, and the Kasai LCP Scan How sorting all suffixes of a text supports substring queries with one integer array, why doubling sorts in O(n log n), and how the LCP array is computed in a single pass.
- Oct 3, 2024 Sliding Windows and Exponential Histograms for Recent Data Why a window over the last W items needs a different summary from a whole-stream sketch, how bucket merging bounds error to a constant factor, and what late-arriving data does to the guarantee.
- Sep 4, 2024 B-Tree Fanout Arithmetic and the Cost of a Point Lookup Why page-sized nodes give B-trees a fanout in the hundreds, how that collapses tree height to three or four levels, and where the arithmetic stops paying off.
- Aug 31, 2024 Uniform Random Permutations and the Fisher-Yates Shuffle Why swapping each element with a random position from the whole array produces biased permutations, and how the inside-out variant shuffles a stream without knowing its length.
- Aug 22, 2024 A* and the Conditions on a Heuristic Admissibility versus consistency, why a consistent heuristic removes the need to reopen closed nodes, and what weighting the heuristic buys and costs in solution quality.
- Aug 9, 2024 Probe Sequences in Open-Addressed Hash Tables How linear, quadratic and double hashing differ in clustering behaviour, why deletion needs tombstones or backward shifting, and what Robin Hood ordering buys.
- Aug 4, 2024 Pseudo-Polynomial Knapsack: Why the Capacity State Is Not Polynomial The O(nW) knapsack table is polynomial in the capacity value and exponential in its bit length, which is why the problem stays NP-hard and why scaling the weights yields an approximation scheme.
- Jul 16, 2024 State Sufficiency: What the Past Must Leave Behind How to decide which facts about a partial solution a DP state must record, why insufficient states produce wrong answers rather than slow ones, and what each extra dimension costs.
- Jul 1, 2024 Interpolation Search and What Uniform Key Distribution Buys How probing by estimated position turns logarithmic search into log-log search, the exact arithmetic it needs, and the degenerate inputs that make it linear.
- Jun 27, 2024 The Primal-Dual Schema: Dual Variables as a Certificate How charging primal costs against a feasible dual solution yields approximation guarantees for facility location and prize-collecting problems, without solving an LP.
- Jun 17, 2024 Reservoir Sampling and Priority Sampling on a Single Pass How to hold a uniform sample of a stream of unknown length with one pass, how priority sampling generalises it to weighted elements with unbiased totals, and where the sample stops being uniform.
- May 27, 2024 Fractional Relaxation and the Knapsack Integrality Gap Why the density-ordered greedy rule is exactly optimal for fractional knapsack, how the 0/1 version loses a factor of two, and what value scaling buys back.
- May 24, 2024 Kruskal, the Cut Property, and Why Any Minimum Edge Is Safe The cut and cycle properties that justify sorting edges by weight, how the proof differs from a plain exchange, and what happens when weights tie.
- May 19, 2024 Tree DP and Rerooting: Computing an Answer at Every Node Subtree DP evaluates a rooted tree in post-order, and a second top-down pass propagates the parent contribution so that every node gets the answer for the tree rooted at it.
- Apr 8, 2024 Why Breadth-First Search Cannot Discover Vertices Out of Distance Order The queue invariant behind BFS distances, why vertices must be marked on enqueue rather than on dequeue, and where the layer argument stops holding.
- Mar 28, 2024 The Probabilistic Method: Proving That a Good Object Exists How a random construction with nonzero success probability establishes existence without producing an example, and how the Lovász local lemma weakens the independence the argument needs.
- Feb 27, 2024 Triangles and Connectivity in Edge-Stream Graphs Why graph streams get n polylog n space rather than sublinear space, how wedge sampling estimates triangle counts, and how l0 samplers build spanning forests without storing edges.
- Feb 4, 2024 Posting List Encoding and the Cost of a Term Lookup How inverted indexes compress sorted document lists with delta and variable-byte codes, why skipping is needed for intersections, and where compression stops paying.
- Jan 11, 2024 The Burrows–Wheeler Transform and Backward Search in the FM-Index Why sorting cyclic rotations clusters equal characters, how the LF mapping inverts the transform, and how the same mapping turns the last column into a searchable index.
- Dec 28, 2023 Lyndon Factorization and the Structure of Minimal Rotations How Duval splits any word into a non-increasing sequence of Lyndon words in linear time, why the longest Lyndon prefix equals the next smaller suffix, and how that decides the smallest rotation.
- Dec 20, 2023 Unit-Cost RAM, Word RAM and Bit Complexity as Three Different Machines The same algorithm can be linear, logarithmic or quadratic depending on whether operations are charged per step, per word, or per bit, and the choice of model decides which bounds are comparable.
- Nov 27, 2023 Dominator Trees and the Cooper-Harvey-Kennedy Iterative Method What it means for one vertex to dominate another, why the immediate dominator relation forms a tree, and how reverse post-order makes the iterative fixpoint converge quickly.
- Oct 27, 2023 Data Races, Memory Models, and Where Parallel Algorithms Lose Determinism How relaxed memory ordering breaks the intuitive interleaving model, what the C and C++ memory model guarantees, and why race-free parallel code can still be non-deterministic.
- Oct 12, 2023 Smoothed Analysis: Why the Simplex Method Beats Its Worst Case Worst-case bounds are exponential and average-case bounds assume a distribution nobody can justify. Perturbing the input by a Gaussian turns the question into a function of how much noise the input carries.
- Oct 11, 2023 Randomized Incremental Construction and Backward Analysis How building a structure by inserting elements in random order turns a quadratic insertion cost into an expected linear one, and why the analysis runs the process backwards.
- Sep 30, 2023 Stranded Credit: Why Amortized Bounds Fail Under Persistence and Laziness Credit earned by earlier operations is only spendable if the state carrying it survives, so persistent versions and deferred computation can strand potential, and the potential argument has to be redesigned rather than reapplied.
- Sep 23, 2023 Frequency Moments and the Tug-of-War Sketch How a random sign vector turns the second frequency moment into a sum of squares, why the estimator is unbiased, and how the same construction generalises to higher moments.
- Sep 14, 2023 Work Stealing: Per-Processor Deques and Why Thieves Take the Oldest Task How a work-stealing scheduler keeps locality by pushing and popping on one end of a deque while idle processors take from the other, and where the contention lands.
- Aug 25, 2023 Delaunay Triangulation and the Empty Circumcircle Test Why maximising the minimum angle reduces to a single determinant test, how incremental insertion repairs the mesh locally, and what happens when four points share a circle.
- Aug 24, 2023 Resource-Constrained Shortest Paths and Label-Setting with Dominance Why a second additive cost breaks the optimal-substructure argument, how multi-dimensional labels and a dominance rule restore a workable search, and what makes the label count explode.
- Jul 20, 2023 The Streaming Model: One Pass, Sublinear Space, Approximate Answers What the one-pass model forbids, how cash-register and turnstile streams differ, and why exact answers cost linear space while sketches can be merged by addition.
- Jul 10, 2023 Count-Min Sketch: Why the Minimum of Overestimates Is the Estimate The counter grid, the derivation of width e over epsilon and depth ln of one over delta, and why conservative update shrinks error without changing the guarantee.
- Apr 18, 2023 k-d Trees for Range Search and Nearest Neighbours How median splits over alternating axes turn a point set into a pruning structure, what the O(√n + k) range bound really assumes, and why high dimensions break it.
- Mar 28, 2023 Polynomial Rolling Hashes and the Rabin-Karp Trade How a rolling hash compares substrings in constant time, why collision probability depends on the modulus, and which arithmetic choices fail under adversarial input.
- Mar 24, 2023 Supersteps and Message Bounds: Why Distributed Parallelism Costs More How the BSP model charges for latency and bandwidth per round, what the h-relation says about all-to-all traffic, and why matrix multiplication needs more memory per processor to avoid moving data.
- Dec 23, 2022 Lower Bound, Upper Bound, and the Invariant That Makes Binary Search Correct Why binary search is best expressed as a loop invariant over a half-open interval, how lower and upper bound answer different questions, and which arithmetic breaks first.
- Oct 5, 2022 Randomized Quicksort and the Expected Comparison Count How choosing the pivot uniformly at random makes the 2n ln n comparison bound hold for every input, and where the expectation stops describing a single run.
- Sep 13, 2022 Suffix Automata and Counting Distinct Substrings Online How a suffix automaton stores every substring of a text in linear states, why cloning a state preserves end-position sets, and how the state graph yields the distinct-substring count.
- Jul 2, 2022 Aho–Corasick Failure Links and Multi-Pattern Scanning Why a trie of patterns needs a second set of edges, how the failure link of a node is derived from its parent, and what output propagation costs when patterns nest.
- Feb 24, 2022 Christofides: Matching the Odd Vertices to Reach 3/2 Why doubling a minimum spanning tree gives a factor of 2, how a minimum-weight matching on the odd-degree vertices recovers the remaining half, and where the metric assumption is spent.