Randomized incremental construction
Analyze a fixed input through a random insertion order and a backward certificate.
On this page
The question for today
What you’ll understand
- Identify the probability space as uniform insertion permutations of a fixed input.
- Use constant-size defining sets in a backward-analysis argument.
- Separate structural update cost, point-location cost, and worst-case guarantees.
An incremental geometric algorithm inserts objects one at a time and repairs the affected structure. Randomization can make this strategy efficient even for adversarially chosen coordinates, provided the insertion order is uniformly random. The input need not come from a spatial probability distribution. Backward analysis conditions on the current subset and asks which uniformly random last object could have created a feature. This often turns a complicated forward evolution into a short certificate count. The resulting expected bound does not promise that every insertion order is fast.
Features have small defining sets
Consider noncrossing segments in an enclosing rectangle, with no vertical segments and a generic sweep direction; shared endpoints use fixed consistent conventions. A cell of their vertical trapezoidal decomposition is defined by a top segment, a bottom segment, and left and right endpoint-producing segments, with some sides possibly supplied by the enclosing box. At most four input objects define one cell. Removing an object outside that set leaves the cell unchanged, which is the key backward implication.
Condition on the first i inserted objects as an unordered subset. Every object in that subset is equally likely to have been inserted last. Thus a particular resulting cell could have just appeared only if the last object belongs to its defining set. Since the decomposition has only linearly many cells, summing this probability over its cells bounds the expected number newly created by a constant. This uses the canonical geometry of a subset; an insertion-order-dependent tie rule would undermine that conditioning argument.
A fixed query accumulates a harmonic number of changes
A history directed acyclic graph replaces a deleted cell's leaf by a small decision structure. For a fixed query independent of the random permutation, its containing cell changes only when one of that cell's defining objects was inserted last. At most a constant number of comparisons is added per change. Summing the inverse-stage probability gives an expected logarithmic path. The same bookkeeping, combined with linear expected total structural changes and appropriate endpoint location, yields expected sorting-scale construction and expected linear storage.
The quantifiers are crucial: a fixed query is arbitrary but selected independently of the algorithm's random choices. Its expected path length does not bound the maximum path of every resulting graph. Achieving simultaneous guaranteed query time can use certification and rebuilding or another point-location method, with a separate proof. Likewise, constant expected update size is not enough to establish total running time if locating the affected feature still scans the whole current structure at each insertion.
The same principle appears in Delaunay insertion
In a general-position planar Delaunay triangulation, the graph of a fixed site subset is independent of insertion order. A uniformly random last site has degree equal in expectation to the graph's average degree, which is bounded by a planar-graph constant. An insertion procedure whose local changes are charged to that degree therefore has constant expected structural work, with appropriate handling of hull changes or auxiliary outer vertices. Exact point location and cavity repair remain algorithmic obligations, not consequences of the degree average alone.
With a suitable history or conflict structure, randomized incremental planar Delaunay construction has expected sorting-scale total time. The expectation is over permutations for every fixed admissible input; a bad prescribed order can have quadratic work. Correctness should hold for every order when predicates and tie rules are correct, making this a Las Vegas style use of randomness rather than accepting incorrect geometry with small probability. General-position exclusions can be replaced by a coherent fixed perturbation scheme, but that scheme and its output interpretation must be specified.
Work it through
A defining-set probability and a finite path bound
At stage eight of a random trapezoidal construction, condition on the eight segments. Suppose the fixed query's cell has four distinct input definers. Bound its change probability at that stage, bound the expected added decisions, and evaluate the displayed path bound for all eight stages.
The last inserted segment is uniform among the eight. Only the four candidate definers can change this cell on deletion, so the change probability is at most . A shared endpoint can preserve a wall after deleting one producer, so distinct definer labels do not justify equality.
Each changed containing cell adds at most three decisions in the local history replacement. Thus the expected number of added decisions at this stage is at most ; it need not equal that bound.
For all stages use . The expression is an upper bound, not an exact realized path length.
The harmonic bound controls an average over insertion orders for this fixed query. It does not certify that every constructed graph has maximum depth below that number.
The living notebook
Explore the model
Interactive lab · probability
Inspect one stage’s candidate-definer indicator
Pause/Reset and set BOTH controls to success probability , trials . Interpret success as selecting one of four definers among eight: probability and expected count are . For a fresh comparison Pause/Reset and set BOTH to , , representing two definers among eight: the success probability becomes . Changes retain the paused clock.
- Mean · np
- 5
- Variance · np(1−p)
- 2.5
- Total probability
- 1
These are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forThese exact Bernoulli laws describe selecting a candidate definer, which bounds possible cell changes. The instrument does not generate insertion permutations or assume independence between construction stages.
Pause & reason
Check your understanding
Your turn
Try it yourself
A fixed general-position planar Delaunay triangulation has ten sites, five on its convex hull. If a uniformly random insertion permutation is viewed backward, what is the expected degree of its last site in this final graph? Does this number by itself prove the total construction-time bound?
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Use the triangulation edge formula and the sum-of-degrees identity before interpreting the algorithmic implication.
Compare with the solution
The graph has edges, so its degree sum is . Each of ten sites is equally likely to be last, giving expected degree . This is a graph-degree expectation, not an exact flip count or point-location cost. A complete runtime proof must also relate local repair work to degree, handle hull or auxiliary-vertex cases, and bound the cost of finding the affected region. The average alone does not supply those steps.
Keep the idea
Take it with you
- Backward analysis conditions on a subset and randomizes its last member.
- Small defining sets produce inverse-stage probabilities and harmonic query bounds.
- Expected structural work, total runtime, and simultaneous query guarantees require distinct arguments.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.