ArticleslgStudy

computer science

Entropy compression

Entropy compression is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Entropy compression rather than just read about it. In short: In mathematics and theoretical computer science, entropy compression is an information theoretic method for proving that a random process terminates, originally used by Robin Moser to prove an algorithmic version of the Lovász local lemma. Description To use this method, one proves that the history of the given process can be recorded in an efficient way, such that the state of the process at any past time can be re…

Key takeaways

  • Entropy compression belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Entropy compression to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Entropy compression from memory before moving on to harder problems.

Reference excerpt

In mathematics and theoretical computer science, entropy compression is an information theoretic method for proving that a random process terminates, originally used by Robin Moser to prove an algorithmic version of the Lovász local lemma.

Description To use this method, one proves that the history of the given process can be recorded in an efficient way, such that the state of the process at any past time can be recovered from the current state and this record, and such that the amount of additional information that is recorded at each step of the process is (on average) less than the amount of new information randomly generated at each step. The resulting growing discrepancy in total information content can never exceed the fixed amount of information in the current state, from which it follows that the process must eventually terminate. This principle can be formalized and made rigorous using Kolmogorov complexity.

Example An example given by both Fortnow and Tao concerns the Boolean satisfiability problem for Boolean formulas in conjunctive normal form, with uniform clause size. These problems can be parameterized by two numbers (k,t) where k is the number of variables per clause and t is the maximum number of different clauses that any variable can appear in. If the variables are assigned to be true or false randomly, then the event that a clause is unsatisfied happens with probability 2−k and each event is independent of all but r=k(t−1) other events. It follows from the Lovász local lemma that, if t is small enough to make r<2k/e (where e is the base of the natural logarithm) then a solution always exists. The following algorithm can be shown using entropy compression to find such a solution for inputs that obey a constraint on r of a similar form.

Choose a random truth assignment While there exists an unsatisfied clause C, call a recursive subroutine fix with C as its argument. This subroutine chooses a new random truth assignment for the variables in C, and then recursively calls the same subroutine on all unsatisfied clauses (possibly including C itself) that share a variable with C, until none are left. This algorithm cannot terminate unless the input formula is satisfiable, so a proof that it terminates is also a proof that a solution exists. Each iteration of the outer loop reduces the number of unsatisfied clauses (it causes C to become satisfied without making any other clause become unsatisfied) so the key question is whether the fix subroutine terminates or whether it can get into an infinite recursion. To answer this question, consider on the one hand the number of random bits generated in each iteration of the fix subroutine (k bits per clause) and on the other hand the number of bits needed to record the history of this algorithm in such a way that any past state can be generated. To record this history, we may store the current truth assignment (n bits), the sequence of arguments to the outermost calls to the fix subroutine (at most mlog2m bits, where m is the number of clauses in the input), and then a sequence of records that either indicate that a recursive call to fix returned or that it made a recursive call, and which of the r+1 clauses sharing a variable with the current clause was passed as an argument to that recursive call. There are r+2 possible outcomes per record, so the number of bits needed to store a record (using a compact encoding method such as arithmetic coding that allows storage using a fractional number of bits per record) is log2(r+2). This information is enough to recover the entire sequence of calls to fix, including the identity of the clause given as an argument to each call. To do so, progress forward through the call sequence using the stored outermost call arguments and stored records to infer the argument of each call in turn. Once the sequence of recursive calls and their arguments has been recovered, the truth assignments at each stage of this process can also be recovered from the same information. To do so, start from the final truth assignment and then progress backwards through the sequence of randomly reassigned clauses, using the fact that each clause was previously unsatisfiable to uniquely determine the values of all of its variables prior to its random reassignment. Thus, after f calls to fix, the algorithm will have generated fk random bits but its entire history (including those generated bits) can be recovered from a record that uses only mlog2m+n+flog2(r+2) bits. This is only possible when the number of stored bits is at least as large as the number of randomly generated bits. It follows that, when r is small enough to make log2(r+2)<k, that is, when r<2k−2, the fix subroutine can only perform O(mlog2m+n) recursive calls over the course of the whole algorithm.

History The name "entropy compression" was given to this method in a blog posting by Terence Tao and has since been used for it by other researchers. Moser's original version of the algorithmic Lovász local lemma, using this method, achieved weaker bounds than the original Lovász local lemma, which was originally formulated as an existence theorem without a constructive method for finding the object whose existence it proves. Later, Moser and Gábor Tardos used the same method to prove a version of the algorithmic Lovász local lemma that matches the bounds of the original lemma. Since the discovery of the entropy compression method, it has also been used to achieve stronger bounds for some problems than would be given by the Lovász local lemma. For example, for the problem of acyclic edge coloring of graphs with maximum degree Δ, it was first shown using the local lemma that there always exists a coloring with 64Δ colors, and later using a stronger version of the local lemma this was improved to 9.62Δ. However, a more direct argument using entropy compression shows that there exists a coloring using only 4Δ−4 colors, and moreover this coloring can be found in randomized polynomial time.

References

Worked examples

Example 1 — a first encounter with Entropy compression

Start with the simplest possible case. Write down what Entropy compression claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Entropy compression before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Entropy compression ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Entropy compression

In research
Entropy compression appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Entropy compression in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Entropy compression is common in secondary-school and first-year university syllabi. It links to neighbouring topics Analysis of algorithms, Randomized algorithms, so understanding it makes those chapters shorter.
In everyday life
Look for Entropy compression outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Entropy compression” →

How to study Entropy compression in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Entropy compression means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Entropy compression out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Entropy compression in simple terms?

In mathematics and theoretical computer science, entropy compression is an information theoretic method for proving that a random process terminates, originally used by Robin Moser to prove an algorithmic version of the Lovász local lemma. Description To use this method, one proves that the history…

Why does Entropy compression matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Entropy compression?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Entropy compression.

Tags

  • Analysis of algorithms
  • Randomized algorithms

Keep exploring