Theoretical Computer Science
Data Structures and Optimization for Fast Algorithms
1. The central idea: combine optimization, data structures, and sketching
Many foundational problems in theoretical computer science have long been known to be solvable in polynomial time, yet obtaining algorithms close to the input-size lower bound remained difficult. Examples include solving linear programs, computing maximum flows, analyzing Markov chains, and finding graph connectivity structures.
A recent line of work has made substantial progress on these problems by combining three kinds of tools:
Optimization methods provide iterative procedures for approaching a solution.
Data structures exploit shared structure among the subproblems that arise during those iterations.
Randomized sketching and sampling compress information so that relevant updates or features can be detected quickly.
The key insight is that the subproblems generated by an optimization method often form a structured sequence. Solving each subproblem from scratch may be expensive, but maintaining solutions or useful summaries across the entire sequence can be much faster.
A powerful general strategy is to treat an iterative optimization algorithm as a dynamic sequence of related subproblems, then design a data structure that processes the sequence efficiently.
This strategy can be used in two directions:
Static problem to dynamic subproblems: An optimization algorithm reduces a static task, such as solving a linear program, to a sequence of computations. A data structure maintains the information needed across these computations.
Dynamic problem to static subproblems: A dynamic task, such as maintaining a matching as edges are deleted, can sometimes be handled by periodically solving static optimization problems and reusing their solutions across many updates.
These connections have produced algorithms with nearly linear or near-optimal running times for several important problems.
2. Iterative optimization and dynamic maintenance
2.1 The usual iterative viewpoint
Many optimization methods proceed in rounds. In each round, the method:
Obtains information about the current state of the problem.
Uses that information to choose an update.
Repeats until it has reached a sufficiently accurate solution.
For example, an iterative method might repeatedly solve a linear system, compute a path in a graph, or evaluate a gradient. A standard runtime analysis considers:
How many iterations are required?
How expensive is each iteration?
This viewpoint can miss an opportunity: the subproblems in successive iterations may be closely related.
2.2 The dynamic viewpoint
Instead of treating every iteration independently, the sequence can be viewed as a dynamic problem. The method generates a series of related inputs, and a data structure maintains the information needed as those inputs change.
If the cost of maintaining a solution across the full sequence is lower than solving every subproblem separately, the overall algorithm can become faster—even if the number of optimization iterations does not decrease.
This idea has classical precedents. Interior-point methods for linear programming have used shared structure among their repeated linear systems, and maximum-flow algorithms have used dynamic tree structures to make repeated graph operations more efficient. The newer developments extend this approach with randomized sketching and more specialized data structures.
2.3 Why the combination is challenging
Sketching can accelerate an iteration by compressing the input or identifying important coordinates. However, in iterative algorithms, the output of one iteration affects the next input. Consequently, the algorithm’s later inputs may depend on the random choices made by earlier sketches.
This creates an adaptive-input problem: a sketching method that is valid when its input is independent of its randomness may not remain valid when the input is chosen based on previous sketch outputs.
Effective algorithms therefore need both:
A sketch or data structure that is fast enough to make each update economical.
A method for ensuring that adaptivity does not invalidate the sketch’s guarantees.
3. Linear programming as a central example
Linear programming is a foundational optimization problem with broad applications. Many specialized tasks—including maximum flow, certain Markov decision processes, and some regression problems—can be expressed as linear programs or solved using techniques closely related to general linear programming.
A linear program optimizes a linear objective subject to linear constraints. In a generic form, it can be written as minimizing a linear cost over nonnegative variables subject to linear inequalities. Its dual form maximizes a linear objective subject to another system of linear inequalities. The primal and dual formulations reveal complementary structural information about the problem.
3.1 Geometric interpretation
In a dual formulation with variables in d dimensions, each linear constraint defines a half-space. The feasible region is the intersection of these half-spaces, forming a convex polytope.
The objective points in a particular direction. Optimizing the objective amounts to finding an appropriate extreme point or boundary location of the polytope in that direction. Thus, a geometric picture of linear programming is the search for an optimum within a high-dimensional convex body.
3.2 Major families of methods
Several well-known algorithmic approaches solve linear programs:
Simplex methods move from one vertex of the feasible polytope to another. They can be very effective in practice, although their worst-case theoretical behavior is not generally the best known.
Ellipsoid methods repeatedly shrink a region known to contain an optimum. They have important theoretical properties, but their practical performance may be less favorable.
Interior-point methods move through the interior of the feasible region and are among the leading methods in both theory and practice.
The discussion here focuses on interior-point methods designed to solve the problem to high accuracy. First-order methods also offer useful approaches for approximate optimization, but they are a distinct line of work.
4. Interior-point methods and the central path
4.1 Barrier functions
An interior-point method can use a barrier function defined inside the feasible polytope. A barrier function grows without bound as a point approaches the boundary. This discourages iterates from violating constraints or moving too close to them.
A path-following method combines the objective with a barrier. In a minimization convention, a representative penalized objective has the form
where:
c⊤x is the linear objective,
p(x) is the barrier function,
t controls the relative importance of the objective.
At t=0, minimizing the barrier seeks a central point in the polytope. As t grows, the objective receives greater weight, and the minimizer moves toward an optimum of the linear program.
The curve traced by these minimizers is called the central path.
4.2 Newton steps and linear systems
A typical path-following method repeatedly:
Starts from a point close to the central path.
Increases the parameter t.
Computes a Newton step using the gradient and Hessian of the penalized objective.
Moves to a new point that remains close to the central path.
Computing a Newton step involves solving a linear system. This leads to a useful interpretation:
An interior-point method reduces linear programming to a sequence of related linear-system computations.
The linear systems are not arbitrary. They are determined by the current point and the structure of the original constraints. That shared structure is what makes dynamic maintenance promising.
5. Iteration counts, data structures, and faster linear programs
5.1 The iteration-count barrier
Classical interior-point methods provide iteration bounds involving square roots of problem dimensions. For example, some methods require on the order of n iterations, while methods based on stronger barrier constructions can achieve a dependence on d, where n is the number of constraints and d is the number of variables.
A central open challenge is to reduce the number of iterations further. But faster algorithms need not rely exclusively on reducing iteration counts. They can instead make the cost of maintaining the information needed at each iteration much smaller.
5.2 Improving the cost per iteration
Several advances have used data structures to speed up the repeated linear systems inside interior-point methods. In some settings, these methods achieve runtimes comparable to the cost of solving the systems after an initial preprocessing step. Other approaches obtain runtimes involving matrix-multiplication complexity.
However, these results are not always nearly linear in the input size, especially when both the number of constraints and the number of variables are large.
A further line of work combines improved interior-point methods with specialized data structures. For dense, sufficiently tall input matrices, a representative bound is
which is nearly linear in the input size when the matrix has at least nd nonzero entries and the dimension is sufficiently smaller than the number of constraints. More generally, the goal is to make the total running time close to the number of entries that must be read.
The precise bounds depend on the setting and on suppressed accuracy and condition-number factors, but the structural lesson is consistent: the optimization method and the data structure should be designed together.
5.3 A difficult data-structure subproblem
During an interior-point method, the algorithm needs information about how close its current point is to each constraint. Even if only approximate distances are required, updating all of them explicitly after every step would be too costly.
Suppose the distances to the constraints are stored in a nonnegative vector s. If the algorithm moves by a direction Δi, the distances change according to a matrix-vector update of the form
The goal is to maintain multiplicative approximations to the entries of s without examining every constraint after every update.
This is difficult because an individual constraint can become important unexpectedly. For instance, if many constraints are arranged around a central point, a movement in the direction of one particular constraint may make that constraint much more relevant than the others. Simply discarding a large fraction of the constraints, as one might do in some regression settings, can therefore fail.
5.4 Why limited total movement helps
Although any one constraint may become important, interior-point methods constrain the total amount by which the distances change. In an appropriate rescaled Euclidean measure, the cumulative movement is bounded.
Informally, this means that over a suitable number of iterations, only a limited total number of constraints can undergo a large multiplicative change. If a data structure can detect each substantial change at a cost proportional to the amount of change, it can avoid repeatedly scanning all constraints.
This leads to a dynamic data-structure problem: maintain multiplicative information about a nonnegative vector under repeated matrix-vector updates, given a bound on the cumulative movement.
6. Sketching to detect important changes
6.1 The warm-up problem
Consider a matrix A and a small update direction Δ. The product AΔ describes how the constraints change. If Δ is small in Euclidean norm, only a limited number of coordinates of AΔ can be large.
The task is to find those large coordinates quickly, rather than computing the entire product explicitly.
This is a heavy-coordinate recovery problem: given a vector through a compressed representation, identify coordinates whose magnitudes are large relative to an appropriate norm.
6.2 CountSketch-style projections
Randomized sketches, such as CountSketch-type projections, can compress a vector while preserving enough information to recover its large coordinates. A sketch of a matrix can be precomputed so that, for a later vector Δ, the sketch can be applied to estimate which coordinates of AΔ are large.
A multiscale version handles changes of varying magnitudes:
Construct sketches at several thresholds, often chosen at powers of two.
Estimate the scale of the update.
Use the sketch at the appropriate scale to identify candidate coordinates.
Update detailed information only for those candidates.
This allows large changes to be detected without explicitly examining every constraint on every iteration.
6.3 Handling adaptive inputs
A sketch’s usual guarantee assumes the input is independent of the sketch’s random choices. In an iterative optimization method, the sketch output may influence later movements, so that assumption is not automatically valid.
A robustness technique uses a threshold margin:
The sketch identifies candidates whose changes exceed a threshold larger than the one of real interest.
The algorithm checks the candidates directly using the original data.
The data structure exposes only coordinates verified to have changed by the desired amount.
Because the final output is determined by exact verification rather than by the sketch’s random fluctuations near the threshold, the sketch can be reused more safely across adaptive iterations. This approach addresses a general issue in randomized algorithms where later inputs depend on earlier outputs.
6.4 The broader role of sketching
In this application, sketching does not replace the original linear program with a smaller approximate program. Instead, it provides compressed, dynamic access to the original constraints. It helps maintain selected information over time while retaining the ability to respond to whichever constraints become important.
This distinction is important:
Static reduction: discard or sparsify parts of a problem once, then solve a smaller approximation.
Dynamic sketching: retain a compressed representation that can reveal relevant information as the algorithm evolves.
The latter is especially useful when no fixed small subset of constraints is guaranteed to preserve the solution.
7. Dynamic bipartite matching
7.1 The decremental problem
In a bipartite graph, a matching is a set of edges such that no vertex is incident to more than one selected edge. A maximum matching has the greatest possible number of edges.
A decremental dynamic matching problem begins with a graph and processes a sequence of edge deletions. After each deletion, the algorithm must maintain a matching that approximates the maximum matching in the remaining graph.
A matching is called (1−ε)-approximate if its size is at least a (1−ε) fraction of the maximum matching size, where ε is the allowed approximation error.
There are many variants of dynamic matching. Results depend on whether updates are additions or deletions, whether updates affect edges or vertices, and how much approximation is allowed.
7.2 Fractional matchings
A fractional matching assigns a nonnegative value to each edge. For every vertex, the total value assigned to its incident edges must be at most one. Its size is the sum of the values on all edges.
A fractional matching can be viewed as a convex combination of ordinary matchings. If its size is large enough, it certifies the existence of large matchings in an appropriate averaged sense. There are reductions that use dynamic fractional matchings to maintain ordinary matchings.
Fractional matchings are useful because they can spread weight across multiple edges rather than committing to a single brittle matching. A matching concentrated on a few edges may be damaged by a small number of deletions; a more distributed fractional solution can remain useful longer.
8. Reusing solutions under deletions
A simple general strategy for decremental optimization problems is:
Compute a sufficiently good solution for the current graph.
Keep using it as edges are deleted, removing any deleted edges from the solution.
Recompute only after enough of the solution has been invalidated.
For a fractional matching, suppose the initial solution has value close to the optimum. If only a small fraction of its total value is lost to deletions, the remaining solution is still approximately optimal. This makes it possible to amortize the cost of computing a fresh solution over many deletion updates.
The central design questions are:
Which fractional matching should be computed?
How long will that matching remain useful?
Can the static computation be performed quickly enough to make the dynamic algorithm efficient?
A general framework can provide an amortized update bound when the chosen fractional solutions are stable under deletions.
9. Entropy regularization and stable fractional matchings
9.1 Regularized optimization
A useful way to choose a fractional matching is to optimize not only its size, but also a regularizer that encourages desirable structure. A representative optimization problem has the form
where the feasible vectors x satisfy the fractional-matching constraints and r(x) is a regularization term.
The regularizer can serve two purposes:
It helps ensure the computed solution has sufficiently large value.
It discourages the solution from concentrating all its weight on a small, fragile set of edges.
9.2 Entropy as a regularizer
Entropy is a natural choice because it favors distributions of weight that are spread across available alternatives. In a highly symmetric graph, for example, an entropy-regularized solution may distribute weight uniformly rather than choosing one particular matching.
The regularizer can be defined on feasible fractional matchings and assigned an infinite penalty outside the feasible region. The optimization then finds a fractional matching balancing total size and entropy.
9.3 Stability under edge deletions
The regularized solution has useful stability properties. Using its optimality conditions, one can show that the solution does not need to be recomputed after every deletion. Across a sequence of updates, the objective decreases in a controlled way; consequently, only a limited number of recomputations are needed.
In the described approach, the number of recomputations can be bounded on the order of ε−2, up to logarithmic factors and details of the setting. This separates two issues that are often entangled:
How to compute a good fractional matching.
Why it remains useful for many updates.
The stability argument comes from the regularized optimization structure, while the static matching computation can be handled by a suitable fast optimization algorithm.
9.4 Using fast flow algorithms
Certain regularized matching computations can be expressed as instances of broader flow-optimization problems. Consequently, fast maximum-flow algorithms can be used to compute the fractional matching. If the static computation takes nearly linear time in the graph size, and each computed solution lasts for many deletions, the result is an efficient decremental matching algorithm.
With an efficient reduction from fractional matching to ordinary matching, this framework also yields a dynamic algorithm for maintaining an integer matching. The overall update bounds include approximation-dependent and logarithmic factors.
This example illustrates the reverse direction of the earlier linear-programming strategy: a dynamic problem is handled by repeatedly solving structured static optimization problems, while carefully exploiting the stability of each solution.
10. General lessons and applications
The techniques described for linear programming and matching illustrate several broader principles.
10.1 Co-design the algorithm and the data structure
A data structure may be difficult to justify as a standalone object. Its usefulness becomes clear when it is designed around the exact information an optimization method needs. Conversely, the choice of optimization method affects which data-structure operations must be supported.
The two components should therefore be designed jointly rather than optimized independently.
10.2 Track only what the method needs
An iterative algorithm may not need exact access to every coordinate or constraint at every step. It may suffice to maintain approximate values and detect only significant changes. Carefully identifying the minimum information required can turn an apparently impossible maintenance task into a tractable one.
10.3 Use stability to amortize dynamic updates
For dynamic problems, a solution can remain valid or approximately valid after many updates. If the algorithm can establish this stability, the cost of recomputing a solution can be spread across many updates.
Regularization is one tool for producing stable solutions; bounded cumulative movement is another.
10.4 Expect adaptivity when reusing randomness
Randomized sketches are most straightforward when inputs are independent of the sketch. Iterative algorithms often violate that condition. Robust thresholding, direct verification, and related techniques can help preserve guarantees when the sketch is reused in an adaptive process.
10.5 The framework reaches beyond linear programming and matching
The same style of reasoning appears in work on:
Dynamic maximum flow and linear programming.
Approximate optimization methods, including algorithms for zero-sum games.
Dynamic graph problems more broadly.
Parallel algorithms for convex optimization with access through subgradient oracles.
Classical and quantum algorithmic settings.
The central research opportunity is to identify which static or dynamic problems have enough structural regularity for these methods to apply, and which require different tools. Advances in optimization, data structures, sketching, and dynamic algorithms continue to create new problems and connections across these areas.

Ask anything
We've read this whole study set, so questions about it get the best answers.