Entropy and applications in combinatorics

Entropy and applications in combinatorics

assembled by Andrey Kupavskii

This block is devoted to an important information-theoretic concept, called Shannon entropy. Roughly speaking, it is a measure of information in a random variable, or, even simpler, an average number of bits that we need to encode its outcomes. It is also a unique such function.

Summary: We describe the entropy function using a set of natural axioms, derive its functional form and different properties. We apply it to different counting problems, in particular, to bounding the permanent of a matrix and number of paths in a bipartite graph. We show Shearer's inequality for entropy and use it to derive results about triangle-intersecting families of graphs.

Prerequisites: Basic probability, basic graph theory

Contents:

Basic properties and applications

Given a random variable $\eta$ taking values in a finite set $X$, its entropy $H(\eta)$ can be simply defined as follows: $H(\eta) = \sum_{a\in X} {\rm Pr}[\eta = a]\log_2 \frac{1}{{\rm Pr}[\eta = a]}$ with the convention that $0\log_2\frac 10 = 0$. Note that $H(\eta) = 1$ for a random variable that takes values $0$ and $1$ with probability $1/2$. Alternatively, we can define the entropy axiomatically, as the unique function that satisfies a certain set of axioms that formalize our intuition about what a function that measures information should look like. This approach is probably more instructive. Below, we give a set of lectures by Tim Gowers that follows this approach. In the first two lectures, he gives the five axioms that the entropy function satisfies and deduces some simple properties of such a function (without proving existence or uniqueness of such function).

Hide videos
Show videos

In the next lecture, he applies the properties of the entropy to deduce the following result: given a bipartite graph with edge density $\alpha>0$, he shows that the density of the number of paths of edge length $3$ in this bipartite graph is at least $\alpha^3$. Here, the density of edges equal to $\alpha$ means that, if we choose a random pair $x,y$ from different parts, then the probability that it is an edge is $\alpha$. The density for any subgraph is defined similarly. Note that $\alpha^3$ is what we would expect for a random bipartite graph, where each edge is included in the graph independently and with probability $\alpha$. Note that this result is deduced without actually having/using the formula for the entropy.

Hide video
Show video

In the following lecture, Tim Gowers gives the formula for the entropy, thus showing existence of a function that satisfies the axioms, and shows uniqueness of this function.

Hide video
Show video

Given an $n\times n$ matrix $A = (a_{ij})$, the permanent ${\rm per}(A)$ is a "sign-free" determinant, i.e., ${\rm per}(A) = \sum_{\sigma}\prod_{i=1}^n a_{i\sigma(i)}$, where the sum is over all permutations $\sigma$ of the set $[n]:=\{1,\ldots, n\}$. In the next lecture, Tim Gowers gives a proof of Bregman's theorem that allows to bound the permanent of a zero-one matrix (i.e., matrix with only zeroes and ones) in terms of its sums of rows.

Hide video
Show video

I find the explanation of the "averaging over the order of $x_i$" part, starting minute 20, a bit confusing. The detail that is missing is that when we apply the chain rule, we can write it using any permutation $\pi: [n]\to [n]$, which would then give $$H[\sigma] = H[\sigma(x_{\pi(1)})]+H[\sigma(x_{\pi(2)})|\sigma(x_{\pi(1)})]+\ldots+H[\sigma(x_{\pi(n)})|\sigma(x_{\pi(1)}), \ldots,\sigma(x_{\pi(n-1)})],$$ and thus we can average over the uniform choice of $\pi$, getting $$H[\sigma] = {\rm E}_{\pi}\big[ H[\sigma(x_{\pi(1)})]+H[\sigma(x_{\pi(2)})|\sigma(x_{\pi(1)})]+\ldots+H[\sigma(x_{\pi(n)})|\sigma(x_{\pi(1)}), \ldots,\sigma(x_{\pi(n-1)})]\big].$$ Next, we apply the bound to each term using the log of cardinality: $${\rm E}_{\pi}\big[H[\sigma(x_{\pi(r)})|\sigma(x_{\pi(1)}), \ldots,\sigma(x_{\pi(r-1)})]\big]\le {\rm E}_{\pi}\big[\log\big|N(x_{\pi(r)})\setminus\big\{\sigma(x_{\pi(1)}), \ldots,\sigma(x_{\pi(r-1)})\big\}\big|\big].$$ This bound is true on average because it's true for each choice of $\pi$. Now look at the set $A:=\sigma^{-1}(N(x_{\pi(r)}))$. It has cardinality $d(x_{\pi(r)})$ and of course includes $x_{\pi(r)}$ itself. Since $\pi$ is chosen uniformly, any order of appearance of the elements of $A$ in $\pi$ is equally likely, and thus the chance that there are exactly $i$ neighbors of $x_{\pi(r)}$ among $\sigma(x_{\pi(1)}), \ldots,\sigma(x_{\pi(r-1)})$ is exactly $1/d(x_{\pi(r)})$ for each $i=0,\ldots, d(x_{\pi(r)})-1$. This part is already in the video (without the $\pi$-notation). The last bit of the video explains well how to finish the argument from here.

In the next video, Tim Gowers first shows the subadditivity of the entropy. This requires showing $H[X|Y]\le H[X]$ for any random variables $X,Y$, and the proof relies on Jensen's inequality, which we recast here: if $\alpha_1,\ldots, \alpha_n\ge 0$ are such that $\sum \alpha_i = 1$ and $f$ is a concave function (such as $\log x$ or $\sqrt x$), then $$\sum_{i=1}^n \alpha_i f(x_i)\le f\Big(\sum_{i=1}^n \alpha_ix_i\Big).$$

Of course, the opposite inequality holds for convex functions like $x^2$, $e^x$ etc.

He then proves Shearer's lemma, which generalizes the subadditivity property. Shearer's lemma has many different forms and is one the most powerful tools that entropy supplies. Let us state it in a form that is slightly different from the one given in the video below and is maybe easier to comprehend.

We need the following notation: given a random variable $(X_1,\ldots, X_n)$ and a set $S\subset [n]$, $S = \{i_1,\ldots, i_s\}$, we write $X_S$ for $(X_{i_1},\ldots, X_{i_s})$.

Shearer's lemma: Given a random variable $X:=(X_1,\ldots,X_n)$ and a collection $\mathcal S$ of subsets of $[n]$ such that each element in $[n]$ is contained in at least $k$ sets from $\mathcal S$, then $$kH[X]\le \sum_{S\in \mathcal S} H[X_S].$$

Here is the video:

Hide video
Show video

In the last lecture of the series, Tim Gowers gives two applications of Shearer's lemma: to counting triangles in a graph and to bounding the largest family of graphs (on the same set of vertices) such that any two graphs share a common triangle. It may be worth looking at Erdos-Ko-Rado theorem proofs in Combinatorial Operations block for more on intersecting families.

Hide video
Show video

Advanced topics

Here are two lectures given by Shachar Lovett as a part of Information Theory base camp, organized by Simons Institute. The tempo of the lectures is pretty high, but it also contains some parts that we have seen in the previous section.

In the first video, he introduces entropy and Shearer's inequality, and then applies it to:

  1. To upper bound the size of a set in $\mathbb R^3$ in terms of its projections on coordinate planes → starting 15:30.
  2. To upper bound the number homomorphisms of a fixed graph $T$ into another graph $G$ → starting 20:00.
  3. To upper bound the number of independent sets in a $d$-regular bipartite graph (that is, a bipartite graph in which each vertex has degree $d$) → starting 40:00.
  4. He introduces a weighted version of Shearer's lemma and applies it to get the following inequality on traces of matrices: given $n\times n$ matrices $A,B,C$, we have ${\rm tr}(ABC)^2\le {\rm tr}(AA^t){\rm tr}(BB^t){\rm tr}(CC^t)$ → starting 1:00:30.

The bounds obtained in 1,2,3 via entropy actually turn out to be essentially tight.

Let us recall some notions that will be used in the talk. A homomorphism of a graph $T = (V(T),E(T))$ to $G = (V(G),E(G))$ is a map $V(T)\to V(G)$ such that each edge of $T$ is mapped onto an edge. Note that we always work with labeled graphs, and thus, say, there are $6$ different homomorphisms from a triangle to itself. An independent set in a graph $G$ is a subset of vertices with no edges contained inside. The size of the largest independent set of $G$ is denoted $\alpha(G)$ and is called the independence number.

A fractional independent set of a graph $G$ is some map $f: V(G)\to [0,1]$, such that $f(v)+f(w)\le 1$ for any edge $uw$ of $G$. Note that it coincides with the notion of an independent set if we restrict $f$ to have only values from $\{0,1\}$. The largest value $\sum_{v\in V(G)}f(v)$ over all fractional independent sets of $G$ is called the fractional independence number and denoted $\alpha^*(G)$. A dual concept is that of a fractional cover. A fractional cover of a graph $G$ is some map $g: E(G)\to [0,1]$, such that for any $v\in V(G)$ we have $\sum_{e: v\in e}g(e)\ge 1$. In words, the total weight of edges at any given vertex is at least $1$. There is a corresponding integral concept, which we do not need here. The smallest value $\sum_{e\in E(G)}g(e)$ over all fractional covers of $G$ is called the fractional covering number and denoted $\tau^*(G)$. The duality of linear programming (the link leads to article in Wiki) applied to this particular case, implies $\tau^*(G) = \alpha^*(G)$.

Here is the first lecture.

Hide video
Show video

In the second lecture, he starts with proving a lower bound on the size of a graph with average degree $d$ and girth $g$, where the girth of a graph $G$ is the length of the shortest cycle in $G$. The proof is in some places reminiscent of the proof for the numbers of paths given by Tim Gowers above. I give some comments on the proof below. Then he gives the proof of Bregman's theorem → starting 24:30. He then gives a beautiful, but sketchy on the computations, proof of Spencer's theorem that deals with discrepancy in hypergraph colorings ("6 standard deviations suffice") → starting 50:30.

Hide video
Show video

The random walks Shachar uses are walks on the vertices of the graph that at each step go to a neighbor of the vertex, excluding the neighbor that we came from (non-backtracking random walk), uniformly at random. Generating a random walks $(v_0,\ldots, v_i)$ for $i\le r$ in such a way, we get a uniform distribution over paths of length $i$ starting from $v_0$, and thus the connection to entropy. Let us denote the distribution for vertices that Shachar uses by $D$. We only need the following property from this random walk:

Lemma. If we take a random walk $(v_0,\ldots, v_i)$ of length $i$ with a starting point $v_0$ distributed according to $D$, then $v_j$ is distributed according to $D$ as well.

Proof. This can be shown by induction on $j$. More precisely, we prove the following: $v_j$ is distributed according to $D$ and ${\rm Pr}[v_{j-1} = u | v_j = w] = \frac 1{d_w}$ for any vertex $w$ and a vertex $u\in N(w)$. Note that the statement is trivially valid for $j=0$ (and the second part is vacuous). Let us calculate the probability that $v_j = w$ for some fixed vertex $w$. This is equal to $\sum_{u\in N(w)}{\rm Pr}[v_{j-1} = u]\cdot \frac 1{d_u},$ because by induction the chance that $v_{j-2} = w$ is equal to $\frac 1{d_u}$, and, given that this has not happen, we go from $u$ to $w$ in the random walk with probability $\frac 1{d_u-1}$, which gives probability $(1-1/d_u)\cdot \frac 1{d_u-1} = 1/d_u$ of going from $u$ to $w$ in the random walk, provided $v_{j-1} = u$. We have $${\rm Pr}[v_{j} = w] = \sum_{u\in N(w)}{\rm Pr}[v_{j-1} = u]\cdot \frac 1{d_u} = \sum_{u\in N(w)}\frac 1{dn} = \frac {d_u}{dn},$$ where in the first equality we used the induction hypothesis. Moreover, it is also clear from this chain of equalities that ${\rm Pr}[v_{j-1} = u | v_j = w] = \frac 1{d_w}$ for any vertex $w$ and a vertex $u\in N(w)$.

Further reading

For more background on the entropy, take a look at the notes by Terrence Tao and Van Vu (clicking will download the notes in the dvi format).