# Geometric discrepancy

Geometric discrepancy theory is a sub-field of discrepancy theory, that deals with balancing geometric sets, such as intervals or rectangles. The general research question in this field is: given a set of points in a geometric space, and a set of objects in the same space, can we color each point in one of two different colors (e.g. black and white), such that each object contains roughly the same number of points of each color?
Formally, the discrepancy of an object is defined as the difference between the number of white points and the number of black points in that object; the objective is to color the points such that the maximum discrepancy of an object is as small as possible.

## Intervals

In the simplest geometric discrepancy setting, the set of objects is the set of all sub-intervals of the real interval [0,1]. In this setting, it is possible to attain discrepancy 1: simply color the points alternately black - white - black - white - etc. Then, the discrepancy of every interval is either 0 or 1.
The problem becomes more challenging when the points are not available in advance, but arrive one by one, and each point should be colored immediately when it arrives. This setting is called the "Online Interval Discrepancy". Jiang, Kulkarni and Singla prove that:$^{:Sec.3.2}$
* No online algorithm can guarantee a constant discrepancy.
* Randomly coloring each point when it arrives gives ${\tilde {O}}({\sqrt {n}})$ expected discrepancy.
* If the point arrival is adversarial, the discrepancy of any online algorithm is $\Omega ({\sqrt {n}})$.
* If the point arrival is stochastic, there is an efficient algorithm that guarantees $O(n^{c/\log {\log {n}}})$ discrepancy, for some universal constant c, with high probability (i.e. with probability 1-1/poly(n), where the exponent of the polynomial depends on c).
Their proof uses a reduction to the problem of Online Tree Balancing, which is a problem of discrepancy in which the set of objects is the set of sub-trees of a complete m-ary tree with height h. For this problem, they prove that, if $h\leq {\log \log n}/C$ for a sufficiently large constant C, and m ≥ 100, then there is an online algorithm that attains discrepancy $O(\log ^{2}n)$.$^{:Sec.2}$

## Rectangles and boxes

Tusnady asked what is the discrepancy when the set of objects is the set of axes-parallel rectangles contained in the unit square.
* Beck proved that the discrepancy is at least Ω(log n) and at most O(log$^4$n).
* Nikolov proved that the discrepancy is at most O(log$^{1.5}$ n).
When the set of objects is the set of all rectangles (possibly rotated), then:
* Beck proved that the discrepancy is at least Ω(n$^{1/4-ε}$) and at most O(n$^{1/2+ε}$) for any ε>0.
Matousek studied the d-dimensional extension of Tusnady's problem. Improving previous results by Roth, Schmidt, Beck, Bohus, and Srinivasan, he proved an upper bound of $O_{d}((\log n)^{d+1/2}{\sqrt {\log \log n}})$ with a simple proof.

### Stripes

When the set of objects is the set of stripes—rectangles of the form [a,b]x[0,1] and [0,1]x[a,b], the setting is equivalent to the problem of "two permutations": given two permutations on a set of n elements, we should color each element either black or white, such that the discrepancy in each interval of each permutation is minimized (the two permutations are the order of the x coordinates and the order of the y coordinates of the points).
* Spencer proved that it is possible to attain a discrepancy of at most 2.
Jiang, Kulkarni and Singla study the online setting with stochastic point arrival, and prove that:
* A random coloring yields an expected discrepancy of ${\tilde {O}}({\sqrt {n}})$.
* There is an efficient algorithm that guarantees $O(n^{c/\log {\log {n}}})$ discrepancy, for some universal constant c, with high probability. They show an application of this result to online fair division.

### Convex polytopes

Matousek and Nikolov studied a more general setting, where the set of objects is induced by dilations and translations of a fixed convex polytope. He proved upper and lower bounds on the discrepancy. The results are analogous to the results for rectangles and boxes.

## Half-spaces

When the set of objects is the set of half-spaces in the Euclidean d-dimensional space:
* Alexander proved a lower bound of $\Omega (n^{1/2-d/2})$ for any dense point set, that is, the ratio of maximum and minimum interior distances is in O(n$^{1/d}$).
* Matousek proved an upper bound of $C_{d}n^{1/2-d/2}$. In fact, this upper bound holds not only for half-spaces but also for any set system for which the primal shatter function is in O(m$^d$).