# Discrepancy of hypergraphs

Discrepancy of hypergraphs is an area of discrepancy theory.

## Hypergraph discrepancies in two colors

In the classical setting, we aim at partitioning the vertices of a hypergraph $\displaystyle{ \mathcal{H}=(V, \mathcal{E}) }$ into two classes in such a way that ideally each hyperedge contains the same number of vertices in both classes. A partition into two classes can be represented by a coloring $\displaystyle{ \chi \colon V \rightarrow \{-1, +1\} }$. We call −1 and +1 colors. The color-classes $\displaystyle{ \chi^{-1}(-1) }$ and $\displaystyle{ \chi^{-1}(+1) }$ form the corresponding partition. For a hyperedge $\displaystyle{ E \in \mathcal{E} }$, set

$\displaystyle{ \chi(E) := \sum_{v\in E} \chi(v). }$

The discrepancy of $\displaystyle{ \mathcal{H} }$ with respect to $\displaystyle{ \chi }$ and the discrepancy of $\displaystyle{ \mathcal{H} }$ are defined by

$\displaystyle{ \operatorname{disc}(\mathcal{H},\chi) := \; \max_{E \in \mathcal{E}} |\chi(E)|, }$
$\displaystyle{ \operatorname{disc}(\mathcal{H}) := \min_{\chi:V\rightarrow\{-1,+1\}} \operatorname{disc}(\mathcal{H}, \chi). }$

These notions as well as the term 'discrepancy' seem to have appeared for the first time in a paper of Beck.[1] Earlier results on this problem include the famous lower bound on the discrepancy of arithmetic progressions by Roth[2] and upper bounds for this problem and other results by Erdős and Spencer[3][4] and Sárközi (described on p. 39).[5] At that time, discrepancy problems were called quasi-Ramsey problems.

To get some intuition for this concept, let's have a look at a few examples.

• If all edges of $\displaystyle{ \mathcal{H} }$ intersect trivially, i.e. $\displaystyle{ E_1 \cap E_2 = \varnothing }$ for any two distinct edges $\displaystyle{ E_1, E_2 \in \mathcal{E} }$, then the discrepancy is zero, if all edges have even cardinality, and one, if there is an odd cardinality edge.
• The other extreme is marked by the complete hypergraph $\displaystyle{ (V, 2^V) }$. In this case the discrepancy is $\displaystyle{ \lceil \frac{1}{2} |V|\rceil }$. Any 2-coloring will have a color class of at least this size, and this set is also an edge. On the other hand, any coloring $\displaystyle{ \chi }$ with color classes of size $\displaystyle{ \lceil \frac{1}{2} |V|\rceil }$ and $\displaystyle{ \lfloor \frac{1}{2} |V|\rfloor }$ proves that the discrepancy is not larger than $\displaystyle{ \lceil \frac{1}{2} |V|\rceil }$. It seems that the discrepancy reflects how chaotic the hyperedges of $\displaystyle{ \mathcal{H} }$ intersect. Things are not that easy, however, as the following example shows.
• Set $\displaystyle{ n=4k }$, $\displaystyle{ k \in \mathcal{N} }$ and $\displaystyle{ \mathcal{H}_n = ([n], \{E \subseteq [n] \mid | E \cap [2k]| = | E \setminus [2k]|\}) }$. Now $\displaystyle{ \mathcal{H}_n }$ has many (more than $\displaystyle{ \binom{n/2}{n/4}^2 = \Theta(\frac 1 n 2^n) }$) complicatedly intersecting edges, but discrepancy zero.

The last example shows that we cannot expect to determine the discrepancy by looking at a single parameter like the number of hyperedges. Still, the size of the hypergraph yields first upper bounds.

## Theorems

• $\displaystyle{ \operatorname{disc}(\mathcal{H}) \leq \sqrt{2n \ln (2m)}. }$

with n the number of vertices and m the number of edges.

The proof is a simple application of the probabilistic method: Let $\displaystyle{ \chi:V \rightarrow \{-1,1\} }$ be a random coloring, i.e. we have

$\displaystyle{ \Pr(\chi(v) = -1) = \Pr(\chi(v) = 1) = \frac{1}{2} }$

independently for all $\displaystyle{ v \in V }$. Since $\displaystyle{ \chi(E) = \sum_{v \in E} \chi(v) }$ is a sum of independent −1, 1 random variables. So we have $\displaystyle{ \Pr(|\chi(E)|\gt \lambda)\lt 2 \exp(-\lambda^2/(2n)) }$ for all $\displaystyle{ E \subseteq V }$ and $\displaystyle{ \lambda \geq 0 }$. Put $\displaystyle{ \lambda = \sqrt{2n \ln (2m)} }$ for convenience. Then

$\displaystyle{ \Pr(\operatorname{disc}(\mathcal{H},\chi)\gt \lambda) \leq \sum_{E \in \mathcal{E}} \Pr(|\chi(E)| \gt \lambda) \lt 1. }$

Since a random coloring with positive probability has discrepancy at most $\displaystyle{ \lambda }$, in particular, there are colorings that have discrepancy at most $\displaystyle{ \lambda }$. Hence $\displaystyle{ \operatorname{disc}(\mathcal{H}) \leq \lambda. \ \Box }$

• For any hypergraph $\displaystyle{ \mathcal{H} }$ such that $\displaystyle{ m \geq n }$ we have $\displaystyle{ \operatorname{disc}(\mathcal{H}) = O(\sqrt{n}). }$

To prove this, a much more sophisticated approach using the entropy function was necessary. Of course this is particularly interesting for $\displaystyle{ m = O(n) }$. In the case $\displaystyle{ m=n }$, $\displaystyle{ \operatorname{disc}(\mathcal{H}) \leq 6 \sqrt{n} }$ can be shown for n large enough. Therefore, this result is usually known to as 'Six Standard Deviations Suffice'. It is considered to be one of the milestones of discrepancy theory. The entropy method has seen numerous other applications, e.g. in the proof of the tight upper bound for the arithmetic progressions of Matoušek and Spencer[6] or the upper bound in terms of the primal shatter function due to Matoušek.[7]

• Assume that each vertex of $\displaystyle{ \mathcal{H} }$ is contained in at most t edges. Then
$\displaystyle{ \operatorname{disc}(\mathcal{H}) \lt 2t }$

This result, the Beck–Fiala theorem, is due to Beck and Fiala.[8] They bound the discrepancy by the maximum degree of $\displaystyle{ \mathcal{H} }$. It is a famous open problem whether this bound can be improved asymptotically (modified versions of the original proof give 2t−1 or even 2t−3). Beck and Fiala conjectured that $\displaystyle{ \operatorname{disc}(\mathcal{H}) = O(\sqrt t) }$, but little progress has been made so far in this direction. Bednarchak and Helm[9] and Helm[10] improved the Beck-Fiala bound in tiny steps to $\displaystyle{ \operatorname{disc}(\mathcal{H}) \leq 2t - 3 }$ (for a slightly restricted situation, i.e. $\displaystyle{ t \geq 3 }$). A corollary of Beck's paper[1] – the first time the notion of discrepancy explicitly appeared – shows $\displaystyle{ \operatorname{disc}(\mathcal{H}) \leq C \sqrt{t \log m} \log n }$ for some constant C. The latest improvement in this direction is due to Banaszczyk:[11] $\displaystyle{ \operatorname{disc}(\mathcal{H}) = O(\sqrt{t \log n}) }$.

### Classic theorems

• Axis-parallel rectangles in the plane (Roth, Schmidt)
• Discrepancy of half-planes (Alexander, Matoušek)
• Arithmetic progressions (Roth, Sárközy, Beck, Matoušek & Spencer)
• Beck–Fiala theorem
• Six Standard Deviations Suffice (Spencer)

## Major open problems

• Axis-parallel rectangles in dimensions three and higher (Folklore)
• Komlos conjecture

## Applications

• Numerical Integration: Monte Carlo methods in high dimensions.
• Computational Geometry: Divide and conquer algorithms.
• Image Processing: Halftoning

## Notes

1. J. Beck: "Roth's estimate of the discrepancy of integer sequences is nearly sharp", page 319-325. Combinatorica, 1, 1981
2. K. F. Roth: "Remark concerning integer sequences", pages 257–260. Acta Arithmetica 9, 1964
3. J. Spencer: "A remark on coloring integers", pages 43–44. Canadian Mathematical Bulletin 15, 1972.
4. P. Erdős and J. Spencer: "Imbalances in k-colorations", pages 379–385. Networks 1, 1972.
5. P. Erdős and J. Spencer: "Probabilistic Methods in Combinatorics." Budapest: Akadémiai Kiadó, 1974.
6. J. Matoušek and J. Spencer: "Discrepancy in arithmetic progressions", pages 195–204. Journal of the American Mathematical Society 9, 1996.
7. J. Matoušek: "Tight upper bound for the discrepancy of half-spaces", pages 593–601. Discrepancy and Computational Geometry 13, 1995.
8. J. Beck and T. Fiala: "Integer making theorems", pages 1–8. Discrete Applied Mathematics 3, 1981.
9. D. Bednarchak and M. Helm: "A note on the Beck-Fiala theorem", pages 147–149. Combinatorica 17, 1997.
10. M. Helm: "On the Beck-Fiala theorem", page 207. Discrete Mathematics 207, 1999.
11. Banaszczyk, W. (1998), "Balancing vectors and Gaussian measure of n-dimensional convex bodies", Random Structures & Algorithms, 12: 351–360, doi:10.1002/(SICI)1098-2418(199807)12:4<351::AID-RSA3>3.0.CO;2-S.

## References

• Beck, József; Chen, William W. L. (2009). Irregularities of Distribution. Cambridge University Press. ISBN 978-0-521-09300-2.
• Chazelle, Bernard (2000). The Discrepancy Method: Randomness and Complexity. Cambridge University Press. ISBN 0-521-77093-9.
• Doerr, Benjamin (2005). Integral Approximation (PDF) (Habilitation thesis). University of Kiel. OCLC 255383176. Retrieved 20 October 2019.
• Matoušek, Jiří (1999). Geometric Discrepancy: An Illustrated Guide. Springer. ISBN 3-540-65528-X.