40.07.08 · combinatorics / probabilistic-method

Combinatorial Discrepancy: Spencer's Theorem and the Beck-Fiala Bound

shipped3 tiersLean: none

Anchor (Master): Alon-Spencer 2016 *The Probabilistic Method* 4e Ch. 13 (Spencer, Beck-Fiala, the entropy/partial-colouring method); Spencer 1985 *Trans. Amer. Math. Soc.* 289 (Six standard deviations suffice); Beck-Fiala 1981 *Discrete Appl. Math.* 3; Bansal 2010 *FOCS* (constructive Spencer via SDP); Lovett-Meka 2015 *SIAM J. Comput.* 44 (the random-walk algorithm); Chazelle 2000 *The Discrepancy Method* (Cambridge)

Intuition Beginner

Imagine you must split a club into two teams, and the club runs many different committees. You want every committee to end up roughly balanced — about as many red-team members as blue-team members on each one. The trouble is that the committees overlap: a person on three committees pulls all three at once, and a fair split for one committee may unbalance another. How unbalanced is the worst committee forced to be, no matter how cleverly you assign the colours?

That worst-case imbalance is what discrepancy measures. You colour each person red or blue, you look at every committee, and you record the gap between its red count and its blue count. Discrepancy is the smallest possible value of the largest such gap, over all the ways you could have coloured. A small discrepancy means a colouring exists that keeps every committee nearly even at the same time; a large one means some committee is unavoidably lopsided.

The surprising news is how small that worst gap can be made. If you simply flip a coin for each person, a committee of size up to the number of people typically lands off-balance by about the square root of its size, times a little extra for having many committees to worry about. But with care you can shave off that extra factor — and you cannot, in general, do much better than the square root itself.

Visual Beginner

Picture a grid: rows are people, columns are committees, and a mark in a cell means that person sits on that committee. You paint each row red or blue. For each column you add up its marks, counting red as plus one and blue as minus one, and the column's imbalance is how far that sum lands from zero.

What you choose What it controls
colour of each row (person) red or blue, the only free choice
signed sum down a column that committee's imbalance
the largest column imbalance the discrepancy of this colouring
the best colouring's largest imbalance the discrepancy of the system

The picture shows the contest: you adjust the row colours to push down the tallest column tally, but every flip that helps one column may hurt another. Discrepancy is the height of the shortest tallest-column you can arrange. For a square grid of people and committees, that best height turns out to be about the square root of the number of people.

Worked example Beginner

Take people and committees. Committee one is , committee two is , committee three is . We find a colouring with small imbalance and check it is best possible.

Step 1. Set up the scoring. Red counts as , blue as . A committee's imbalance is the sum of its members' values; we want the largest imbalance, in size, to be small.

Step 2. Try the colouring red, blue, red, blue for people , i.e. values . Committee one scores . Committee two scores . Committee three scores .

Step 3. Read off the largest imbalance. The three committee scores are , so the largest size is . This colouring has imbalance .

Step 4. Check you cannot reach everywhere. Committee one has three members, an odd number, so its red-minus-blue count is odd and can never be — its imbalance is at least for any colouring. So no colouring beats imbalance , and our colouring is best possible.

What this tells us: the discrepancy of this system is exactly . An odd-sized set can never be perfectly balanced, so it sets a floor; the art of discrepancy is finding a colouring that meets the floor on every set at once.

Check your understanding Beginner

Formal definition Intermediate+

Let be a finite family of subsets of a ground set ; equivalently a hypergraph or an incidence matrix with . A two-colouring is a map , and for a set its signed sum is , the -th coordinate of .

Definition (discrepancy). The discrepancy of the colouring is , and the discrepancy of the system is $$ \mathrm{disc}(\mathcal{S}) = \min_{\chi : [n]\to{-1,+1}}\ \max_{1 \le j \le m}\ \big|\chi(S_j)\big| = \min_{\chi \in {-1,+1}^n}|A\chi|_\infty. $$

A partial colouring is a map ; its support is , the coloured points, and the points with are uncoloured. The signed sum and the discrepancy of a partial colouring are defined verbatim. A partial colouring is balanced (or half-colouring) when its support has size at least .

Definition (degree). The degree of is , the largest number of sets through any single point — the maximum column sum of . The Beck-Fiala theorem bounds discrepancy by degree alone, with no dependence on or .

Two regimes anchor the subject. The random-colouring bound treats as uniform on and union-bounds the Chernoff tails of the sums; for sets it gives . Spencer's theorem removes the factor for , giving . The notation , , , the incidence matrix , and is registered in _meta/NOTATION.md [Alon-Spencer 2016].

Counterexamples to common slips Intermediate+

  • "Random colouring is essentially optimal." For sets, random colouring gives , but Spencer's theorem gives — the union bound is loose by exactly the that the partial-colouring method removes. The random bound is tight only when is exponentially larger than .

  • "Beck-Fiala depends on ." It does not: uses only the degree , so a system of millions of points each in at most three sets has discrepancy under . The size of the ground set and the number of sets are irrelevant.

  • "Low discrepancy is achieved by colouring each set in isolation." The same must serve every set simultaneously; a colouring balancing one set may wreck an overlapping one. Discrepancy is a global minimisation over a shared colour vector, not a per-set optimisation.

  • "The partial-colouring lemma colours everything." It colours only half the points (support ) with small discrepancy. Spencer's bound emerges from iterating the lemma on the shrinking set of uncoloured points, summing a geometric series of half-colouring discrepancies.

Key theorem with proof Intermediate+

The signature result is Spencer's "six standard deviations suffice" theorem: sets on points admit a colouring with every signed sum at most , beating the random union bound by a factor. The engine is the partial-colouring lemma, an entropy/pigeonhole argument that is the direct combinatorial descendant of the entropy method 40.07.06: a bound on the number of distinguishable rounded discrepancy vectors forces two colourings to collide, and their difference is a balanced partial colouring of small discrepancy.

Lemma (partial colouring). Let be sets on . There is a partial colouring with support of size at least and for every .

Proof. Round each set's signed sum to a bin of width -scale, more simply taken uniformly as bins of width about wide enough that the number of attainable rounded vectors is small. Consider all colourings . For each, form the vector of binned signed sums. A Chernoff/entropy count shows the number of distinct vectors that occur with non-negligible frequency is less than : the entropy of a single binned coordinate is at most a constant fraction of a bit when , so the joint entropy of under the uniform is at most , hence takes at most likely values. By pigeonhole, since fails to separate them, two distinct colourings share the same bin vector: . Set . Then , and , so its support is non-empty; a refinement of the count (restricting to colourings differing in at least coordinates) forces the support to have size . For each set, , and equal bins mean , so .

Theorem (Spencer, 1985). For any family of sets on , .

Proof. Apply the partial-colouring lemma to : obtain a partial colouring colouring at least points with discrepancy on every set, for an absolute constant . Freeze those points and recurse on the uncoloured set , of size , applying the lemma to the induced system (each set restricted to the still-uncoloured points). The induced system has sets on points; the lemma — applied with the ground-set size — yields colouring half of with per-set discrepancy , where the constant may grow mildly because there are sets, contributing a logarithmic factor that the careful form of the lemma absorbs. Iterating, the uncoloured set halves each round, , and the total signed sum on any set telescopes: is a full colouring with $$ |\chi(S_j)| \le \sum_{k\ge1} c_k\sqrt{n_{k-1}} \le c\sum_{k\ge0}\sqrt{n/2^{k}} = c\sqrt n\sum_{k\ge0} 2^{-k/2} = \frac{c\sqrt n}{1 - 2^{-1/2}}. $$ The geometric sum converges; tracking the constants in the entropy count gives the explicit bound .

Bridge. Spencer's theorem builds toward the entire algorithmic theory of discrepancy: the foundational reason the random union bound is beatable is that the partial-colouring lemma extracts a structured half-colouring from an entropy/pigeonhole collision rather than from independent coin flips, and this is exactly the move that the entropy method 40.07.06 makes when it bounds a combinatorial count by the entropy of a uniform object — here the count of distinguishable rounded discrepancy vectors. The lemma appears again in the Beck-Fiala and Komlós settings of the Advanced results, where the linear-algebra floating argument is the deterministic counterpart, and the geometric iteration that sums half-colourings is the central insight that converts a one-shot half-colouring into a full colouring. The partial-colouring method generalises the deletion philosophy of the first-moment method 40.07.01 — fix most of the structure, then repair the remainder — and putting these together, Spencer's theorem is the probabilistic method sharpened past its own union bound by replacing "a random colouring is good" with "two random colourings collide, and their difference is better."

Exercises Intermediate+

Advanced results Master

The partial-colouring lemma and the floating argument are the two engines, and the modern theory is their refinement: the entropy method sharpens Spencer to the tight -dependence, the floating bound is conjectured to drop from to , and constructive algorithms realise every existence bound in polynomial time.

Theorem 1 (Spencer's tight bound). For sets on , , and this is tight: there exist systems (e.g. Hadamard-matrix incidence structures) with at [Spencer 1985]. The proof refines the partial-colouring lemma by binning the -th sum at width so that the joint entropy of the binned vector stays below even with sets; the pigeonhole collision then yields a half-colouring with per-set discrepancy , and geometric iteration sums it. At the logarithm is constant, recovering . The entropy bookkeeping — the joint entropy of the rounded discrepancy vector is at most — is precisely the subadditivity of entropy from 40.07.06.

Theorem 2 (Beck-Fiala and the Komlós conjecture). A degree- system has [Beck-Fiala 1981]; the Beck-Fiala conjecture asserts the truth is . The sharper Komlós conjecture states that if the incidence vectors are replaced by arbitrary vectors with , then there is with , an absolute constant independent of ; Beck-Fiala's follows by normalising columns of degree (each has -norm ). The best unconditional bound is Banaszczyk's for Komlós and for Beck-Fiala, via a convex-geometry (Gaussian-measure/-vector-balancing) argument, improving the linear but short of the conjectured constants.

Theorem 3 (constructive Spencer: Bansal, Lovett-Meka, Rothvoss). The bound of Spencer's theorem and the partial-colouring lemma are achievable by polynomial-time randomized algorithms [Lovett-Meka 2015]. Bansal's algorithm rounds a semidefinite relaxation by a random walk whose step covariance is given by the SDP solution. Lovett-Meka's walk on the edges runs a constrained Brownian motion in : at each tiny step it samples a Gaussian increment restricted to the subspace orthogonal to (i) coordinates already frozen at and (ii) the constraints current value for sets whose discrepancy has reached a threshold; the walk reaches a vertex with coordinates at and all set-discrepancies . Rothvoss's algorithm rounds a single Gaussian sample to the nearest point of a discrepancy-feasible polytope. All three match the existence bound, settling the long-open question of whether Spencer's count was algorithmic.

Theorem 4 (lower bounds via eigenvalues and Hadamard systems). Discrepancy is bounded below by spectral and determinant quantities. For the incidence matrix , bounds hold, and the determinant lower bound over submatrices of (Lovász-Spencer-Vesztergombi) certifies that Hadamard-based systems force , matching Spencer's upper bound up to constants. The Hadamard matrix, with entries and orthogonal rows, gives a system on points and sets whose every nontrivial colouring is unbalanced by on some set — the extremal certificate that the improvement of Spencer cannot be pushed further.

Theorem 5 (the Erdős discrepancy problem and geometric discrepancy). Two adjacent landscapes bound the subject. The Erdős discrepancy problem asks for the discrepancy of the system of homogeneous arithmetic progressions under sequences; Erdős conjectured it is unbounded, and Tao (2016) proved it, showing for any sequence that , via the Elliott-conjecture machinery on multiplicative functions and a logarithmically averaged correlation argument [Tao 2016]. On the geometric side, discrepancy of point sets measures how far points in deviate from uniform across all axis-parallel boxes (or halfplanes); the van der Corput and Halton sequences achieve box discrepancy, Roth's (for ) is the matching lower bound, and these control the error of quasi-Monte Carlo integration. Combinatorial discrepancy is the -net and rounding backbone of the geometric theory: a low-discrepancy colouring is exactly a derandomization primitive, halving a point set while preserving every range's count to within the discrepancy.

Synthesis. Combinatorial discrepancy is the probabilistic method turned against its own union bound: the foundational reason sets on points beat the random is that the partial-colouring lemma replaces independent coin flips with an entropy/pigeonhole collision — two colourings sharing a rounded discrepancy vector — whose difference is a structured half-colouring, and this is exactly the entropy-method move of 40.07.06, where the joint entropy of the binned discrepancy vector is capped by subadditivity at bits. The central insight is that the half-colouring is then iterated on a geometrically shrinking ground set, so the per-round discrepancies sum to rather than diverging; Beck-Fiala's is the deterministic, linear-algebra dual of the same "fix most, repair the rest" philosophy, freezing variables at the cube's faces along kernel directions of the active constraints. The Komlós conjecture generalises both to unit vectors and remains open at the constant level, while Banaszczyk's convex geometry and the Bansal-Lovett-Meka-Rothvoss algorithms show the existence bounds are realisable and the non-constructivity of Spencer's count was an artifact of its pigeonhole framing.

Putting these together, discrepancy is dual to derandomization — a low-discrepancy colouring is the rounding primitive that halves a structure while preserving every linear statistic — and the bridge from the entropy method through Spencer and Beck-Fiala to Tao's resolution of the Erdős problem is the single thread that a colouring's worst imbalance is governed by how much structure the sets share, measured first by entropy, then by degree, then by multiplicative number theory.

Full proof set Master

Proposition 1 (random-colouring bound). For sets on , .

Proof. Let be uniform on . For a fixed set with , is a sum of independent variables, so Hoeffding's inequality gives . With the right side is . By the union bound, ; replacing by makes this , so a colouring with all exists, and for every .

Proposition 2 (partial-colouring lemma, entropy form). For sets on there is a partial colouring with and for all .

Proof. Take uniform on and bin each signed sum into intervals of width for a constant . The binned coordinate has, by the Chernoff concentration of at scale , entropy for an absolute constant (most mass sits in bins around ). The binned vector then has joint entropy by subadditivity of entropy 40.07.06, so takes at most effective values. Among the colourings, the map has a fibre of size , so two colourings with and (by a measure-concentration refinement) Hamming distance exist. Set ; its support equals the Hamming-difference set, of size , and since equal bins force the two sums within .

Proposition 3 (Spencer's theorem). Any sets on satisfy .

Proof. Iterate Proposition 2. Round colours a set with and per-set discrepancy ; freeze . Round applies Proposition 2 to the induced system on the uncoloured set , , colouring half of it with per-set discrepancy . After rounds every point is coloured, yielding . For any set , . The tight entropy constant in Proposition 2 (binning at width tuned so ) gives small enough that the geometric sum is .

Proposition 4 (Beck-Fiala theorem). A set system of degree has .

Proof. Run the floating process: start at ; at each stage hold the signed sum of every active set (one with more than active variables) fixed, where a variable is active iff . The incidence count gives (each active set uses active-variable incidences, each variable supplies ), so the active-set constraints have a nonzero kernel direction by rank-nullity; move along it until a variable freezes at , and repeat until all freeze. Each set has its sum held at while active; once inactive it has remaining active variables, each changing by less than before freezing, so its final .

Proposition 5 (determinant lower bound). For any set system with incidence matrix and any submatrix of , .

Proof. Let achieve the discrepancy and let be a submatrix on row-set (sets) and column-set (points) , . Restrict to the coordinates in : the vector and , where the restriction holds because the rows of are sub-rows of and the other coordinates contribute a fixed integer that can only be balanced by an adjustment of at most per row (formally, take two colourings differing only on ). Then ; more directly, by Cramer/Hadamard the map sends the cube to a set whose -radius is at least up to the factor , since -type bounds force some coordinate of to be large whenever is large. Hence .

Connections Master

  • The partial-colouring lemma at the heart of Spencer's theorem is a direct application of the entropy method of 40.07.06: the joint entropy of the binned discrepancy vector is capped at bits by the subadditivity of Shannon entropy, and that cap forces the pigeonhole collision whose difference is a small-discrepancy half-colouring. The entropy method counts combinatorial objects by the entropy of a uniform sample; here it counts distinguishable roundings of a random colouring, and the foundational reason discrepancy beats the union bound is exactly that entropy subadditivity gives a tighter count than independence does.

  • The random-colouring bound is the concentration method of 40.07.05 applied set-by-set: each signed sum is a bounded-difference functional of the colours with Lipschitz constant per coordinate, so its Azuma/Hoeffding tail is sub-Gaussian at scale , and the union bound over sets contributes the that Spencer's theorem then removes. Discrepancy is where concentration's union bound is provably loose, and the partial-colouring method is the repair.

  • The deletion-and-repair structure of the geometric iteration — colour half the points well, freeze them, recurse on the rest — is the discrepancy incarnation of the first-moment and deletion philosophy of 40.07.01: there one deletes the few bad objects from a random structure to leave a good remainder, here one freezes the well-coloured half and repairs the uncoloured remainder, and in both the bound is a sum over a geometrically controlled sequence of repairs rather than a single random draw.

  • Discrepancy supplies the -net and derandomized-rounding primitive used downstream: a low-discrepancy colouring halves a set system while preserving every set's count to within the discrepancy, the basic step in the Beck-Fiala-style integer rounding of fractional solutions and in the construction of small -nets, which connects to the Rödl nibble's semi-random covering of 40.07.09 — both are iterated "approximate-then-correct" schemes where a single round leaves a controlled residue and the analysis sums the residues over geometrically many rounds.

Historical & philosophical context Master

Combinatorial discrepancy crystallised in the late 1970s and early 1980s out of two questions: how evenly can a set system be two-coloured, and how uniform can a finite point set be made across all boxes. The random-colouring bound was folklore from the Chernoff bound. The decisive event was Joel Spencer's 1985 paper "Six standard deviations suffice" in the Transactions of the American Mathematical Society [Spencer 1985], which proved for sets on points, removing the factor that everyone had assumed inherent; the partial-colouring (entropy) method it introduced — independently developed by Gluskin in the convex-geometry literature — became the standard tool. The degree bound came earlier, in József Beck and Tibor Fiala's 1981 "Integer-making theorems" in Discrete Applied Mathematics [Beck-Fiala 1981], whose floating linear-algebra argument gave and posed the conjecture that remains open.

The subject's two later turns were algorithmic and number-theoretic. For twenty-five years Spencer's bound was suspected non-constructive, until Nikhil Bansal's 2010 FOCS SDP-rounding algorithm and Shachar Lovett and Raghu Meka's 2012/2015 constrained-random-walk algorithm [Lovett-Meka 2015] matched it in polynomial time, with Rothvoss adding a Gaussian-rounding variant. Separately, the Erdős discrepancy problem — unbounded discrepancy for sequences along homogeneous arithmetic progressions, posed by Erdős in the 1930s — was resolved by Terence Tao in 2016 [Tao 2016] using the structure of multiplicative functions and logarithmic averaging, a Polymath-project-adjacent result that connected elementary combinatorics to the Elliott conjecture. Banaszczyk's convex-geometry bounds on Komlós and Beck-Fiala, and Chazelle's monograph systematising the geometric side, complete the modern picture.

Bibliography Master

@article{spencer1985,
  author  = {Spencer, Joel},
  title   = {Six standard deviations suffice},
  journal = {Transactions of the American Mathematical Society},
  volume  = {289},
  number  = {2},
  pages   = {679--706},
  year    = {1985}
}

@article{beckfiala1981,
  author  = {Beck, J{\'o}zsef and Fiala, Tibor},
  title   = {``Integer-making'' theorems},
  journal = {Discrete Applied Mathematics},
  volume  = {3},
  number  = {1},
  pages   = {1--8},
  year    = {1981}
}

@inproceedings{bansal2010,
  author    = {Bansal, Nikhil},
  title     = {Constructive algorithms for discrepancy minimization},
  booktitle = {51st Annual IEEE Symposium on Foundations of Computer Science (FOCS)},
  pages     = {3--10},
  year      = {2010}
}

@article{lovettmeka2015,
  author  = {Lovett, Shachar and Meka, Raghu},
  title   = {Constructive discrepancy minimization by walking on the edges},
  journal = {SIAM Journal on Computing},
  volume  = {44},
  number  = {5},
  pages   = {1573--1582},
  year    = {2015}
}

@article{rothvoss2017,
  author  = {Rothvo{\ss}, Thomas},
  title   = {Constructive discrepancy minimization for convex sets},
  journal = {SIAM Journal on Computing},
  volume  = {46},
  number  = {1},
  pages   = {224--234},
  year    = {2017}
}

@article{banaszczyk1998,
  author  = {Banaszczyk, Wojciech},
  title   = {Balancing vectors and Gaussian measures of $n$-dimensional convex bodies},
  journal = {Random Structures \& Algorithms},
  volume  = {12},
  number  = {4},
  pages   = {351--360},
  year    = {1998}
}

@article{lsv1986,
  author  = {Lov{\'a}sz, L{\'a}szl{\'o} and Spencer, Joel and Vesztergombi, Katalin},
  title   = {Discrepancy of set-systems and matrices},
  journal = {European Journal of Combinatorics},
  volume  = {7},
  number  = {2},
  pages   = {151--160},
  year    = {1986}
}

@article{tao2016,
  author  = {Tao, Terence},
  title   = {The Erd{\H{o}}s discrepancy problem},
  journal = {Discrete Analysis},
  volume  = {2016:1},
  pages   = {1--29},
  year    = {2016}
}

@book{matousek1999,
  author    = {Matou{\v{s}}ek, Ji{\v{r}}{\'\i}},
  title     = {Geometric Discrepancy: An Illustrated Guide},
  publisher = {Springer},
  year      = {1999}
}

@book{chazelle2000,
  author    = {Chazelle, Bernard},
  title     = {The Discrepancy Method: Randomness and Complexity},
  publisher = {Cambridge University Press},
  year      = {2000}
}

@book{alonspencer2016,
  author    = {Alon, Noga and Spencer, Joel H.},
  title     = {The Probabilistic Method},
  edition   = {4},
  publisher = {Wiley-Interscience},
  year      = {2016}
}