# A Rook Game

**Problem: **Two players take turns moving a rook on an 8×8 chessboard. The rook is only allowed to move south or west (but not both in a single turn), and may move any number of squares in the chosen direction on a turn. The loser is the player who first cannot move the rook. What is the optimal play for any starting position?

**Solution: **Take advantage of the symmetry of the board. If the rook is not on the diagonal, the optimal strategy is to move it to the diagonal. Then when the other player moves it off, your next move is to move it back to the diagonal. If your opponent starts their turn with the rook always on the diagonal, then you will never lose, and by the symmetry of the board you can always move the rook back to the diagonal. This provides an optimal algorithm for either player. In particular, if the rook starts on a square that is not on the diagonal, then player 1 can guarantee a win, and otherwise player 2 can.

Symmetry is one of the most powerful tools in all of mathematics, and this is a simple albeit illustrative example of its usage.

# When Greedy Algorithms are Perfect: the Matroid

Greedy algorithms are by far one of the easiest and most well-understood algorithmic techniques. There is a wealth of variations, but at its core the greedy algorithm optimizes something using the natural rule, “pick what looks best” at any step. So a greedy routing algorithm would say to a routing problem: “You want to visit all these locations with minimum travel time? Let’s start by going to the closest one. And from there to the next closest one. And so on.”

Because greedy algorithms are so simple, researchers have naturally made a big effort to understand their performance. Under what conditions will they actually solve the problem we’re trying to solve, or at least get close? In a previous post we gave some easy-to-state conditions under which greedy gives a good approximation, but the obvious question remains: can we characterize when greedy algorithms give an *optimal* solution to a problem?

The answer is yes, and the framework that enables us to do this is called a *matroid.* That is, if we can phrase the problem we’re trying to solve as a matroid, then the greedy algorithm is guaranteed to be optimal. Let’s start with an example when greedy is provably optimal: the minimum spanning tree problem. Throughout the article we’ll assume the reader is familiar with the very basics of linear algebra and graph theory (though we’ll remind ourselves what a minimum spanning tree is shortly). For a refresher, this blog has primers on both subjects. But first, some history.

## History

Matroids were first introduced by Hassler Whitney in 1935, and independently discovered a little later by B.L. van der Waerden (a big name in combinatorics). They were both interested in devising a general description of “independence,” the properties of which are strikingly similar when specified in linear algebra and graph theory. Since then the study of matroids has blossomed into a large and beautiful theory, one part of which is the characterization of the greedy algorithm: greedy is optimal on a problem if and only if the problem can be represented as a matroid. Mathematicians have also characterized which matroids can be modeled as spanning trees of graphs (we will see this momentarily). As such, matroids have become a standard topic in the theory and practice of algorithms.

## Minimum Spanning Trees

It is often natural in an undirected graph to find a connected subset of edges that touch every vertex. As an example, if you’re working on a power network you might want to identify a “backbone” of the network so that you can use the backbone to cheaply travel from any node to any other node. Similarly, in a routing network (like the internet) it costs a lot of money to lay down cable, it’s in the interest of the internet service providers to design analogous backbones into their infrastructure.

A minimal subset of edges in a backbone like this is guaranteed to form a tree. This is simply because if you have a cycle in your subgraph then removing any edge on that cycle doesn’t break connectivity or the fact that you can get from any vertex to any other (and trees are the maximal subgraphs without cycles). As such, these “backbones” are called *spanning trees*. “Span” here means that you can get from any vertex to any other vertex, and it suggests the connection to linear algebra that we’ll describe later, and it’s a simple property of a tree that there is a unique path between any two vertices in the tree.

When your edges have nonnegative weights , we can further ask to find a *minimum cost spanning tree. *The *cost* of a spanning tree is just the sum of its edges, and it’s important enough of a definition to offset.

**Definition: **A *minimum spanning tree* of a weighted graph (with weights for ) is a spanning tree which minimizes the quantity

There are a lot of algorithms to find minimal spanning trees, but one that will lead us to matroids is Kruskal’s algorithm. It’s quite simple. We’ll maintain a forest in , which is just a subgraph consisting of a bunch of trees that may or may not be connected. At the beginning is just all the vertices with no edges. And then at each step we add to the edge whose weight is smallest and also does not introduce any cycles into . If the input graph is connected then this will always produce a minimal spanning tree.

**Theorem: **Kruskal’s algorithm produces a minimal spanning tree of a connected graph.

*Proof.* Call the forest produced at step of the algorithm. Then is the set of all vertices of and is the final forest output by Kruskal’s (as a quick exercise, prove all spanning trees on vertices have edges, so we will stop after rounds). It’s clear that is a tree because the algorithm guarantees no will have a cycle. And any tree with edges is necessarily a spanning tree, because if some vertex were left out then there would be edges on a subgraph of vertices, necessarily causing a cycle somewhere in that subgraph.

Now we’ll prove that has minimal cost. We’ll prove this in a similar manner to the general proof for matroids.** **Indeed, say you had a tree whose cost is strictly less than that of (we can also suppose that is minimal, but this is not necessary). Pick the minimal weight edge that is not in . Adding to introduces a unique cycle in . This cycle has some strange properties. First, has the highest cost of any edge on . For otherwise, Kruskal’s algorithm would have chosen it before the heavier weight edges. Second, there is another edge in that’s not in (because was a tree it can’t have the entire cycle). Call such an edge . Now we can remove from and add . This can only increase the total cost of , but this transformation produces a tree with one more edge in common with than before. This contradicts that had strictly *lower* weight than , because repeating the process we described would eventually transform into *exactly*, while only increasing the total cost.

Just to recap, we defined sets of edges to be “good” if they did not contain a cycle, and a spanning tree is a maximal set of edges with this property. In this scenario, the greedy algorithm performed optimally at finding a spanning tree with minimal total cost.

## Columns of Matrices

Now let’s consider a different kind of problem. Say I give you a matrix like this one:

In the standard interpretation of linear algebra, this matrix represents a linear function from one vector space to another , with the basis of being represented by columns and the basis of being represented by the rows. Column tells you how to write as a linear combination of the , and in so doing uniquely defines .

Now one thing we want to calculate is the *rank* of this matrix. That is, what is the dimension of the image of under ? By linear algebraic arguments we know that this is equivalent to asking “how many linearly independent columns of can we find”? An interesting consequence is that if you have two sets of columns that are both linearly independent and *maximally* so (adding any other column to either set would necessarily introduce a dependence in that set), then these two sets have the same size. This is part of why the rank of a matrix is well-defined.

If we were to give the columns of costs, then we could ask about finding the minimal-cost maximally-independent column set. It sounds like a mouthful, but it’s exactly the same idea as with spanning trees: we want a set of vectors that spans the whole column space of , but contains no “cycles” (linearly dependent combinations), and we want the cheapest such set.

So we have two kinds of “independence systems” that seem to be related. One interesting question we can ask is whether these kinds of independence systems are “the same” in a reasonable way. Hardcore readers of this blog may see the connection quite quickly. For any graph , there is a natural linear map from to , so that a linear dependence among the columns (edges) corresponds to a cycle in . This map is called the *incidence matrix *by combinatorialists and the *first boundary map* by topologists.

The map is easy to construct: for each edge you add a column with a 1 in the -th row and a in the -th row. Then taking a sum of edges gives you zero if and only if the edges form a cycle. So we can think of a set of edges as “independent” if they don’t contain a cycle. It’s a little bit less general than independence over , but you can make it exactly the same kind of independence if you change your field from real numbers to . We won’t do this because it will detract from our end goal (to analyze greedy algorithms in realistic settings), but for further reading this survey of Oxley assumes that perspective.

So with the recognition of how similar these notions of independence are, we are ready to define matroids.

## The Matroid

So far we’ve seen two kinds of independence: “sets of edges with no cycles” (also called *forests*) and “sets of linearly independent vectors.” Both of these share two trivial properties: there are always nonempty independent sets, and every subset of an independent set is independent. We will call any family of subsets with this property an *independence system*.

**Definition: **Let be a finite set. An *independence system *over is a family of subsets of with the following two properties.

- is nonempty.
- If , then so is every subset of .

This is too general to characterize greedy algorithms, so we need one more property shared by our examples. There are a few things we do, but here’s one nice property that turns out to be enough.

**Definition:** A *matroid* is a set and an independence system over with the following property:

If are in with , then there is an element such that .

In other words, this property says if I have an independent set that is not *maximally *independent, I can grow the set by adding some suitably-chosen element from a larger independent set. We’ll call this the *extension property.* For a warmup exercise, let’s prove that the extension property is equivalent to the following (assuming the other properties of a matroid):

For every subset , all maximal independent sets *contained in * have equal size.

*Proof. *For one direction, if you have two maximal sets that are not the same size (say is bigger), then you can take any subset of whose size is exactly , and use the extension property to make larger, a contradiction. For the other direction, say that I know all maximal independent sets of any have the same size, and you give me . I need to find an that I can add to and keep it independent. What I do is take the subset . Now the sizes of don’t change, but can’t be maximal inside because it’s smaller than ( might not be maximal either, but it’s still independent). And the only way to extend is by adding something from , as desired.

So we can use the extension property and the cardinality property interchangeably when talking about matroids. Continuing to connect matroid language to linear algebra and graph theory, the maximal independent sets of a matroid are called *bases, *the size of any basis is the *rank* of the matroid, and the minimal dependent sets are called *circuits*. In fact, you can characterize matroids in terms of the properties of their circuits, which are dual to the properties of bases (and hence all independent sets) in a very concrete sense.

But while you could spend all day characterizing the many kinds of matroids and comatroids out there, we are still faced with the task of seeing how the greedy algorithm performs on a matroid. That is, suppose that your matroid has a nonnegative real number associated with each . And suppose we had a black-box function to determine if a given set is independent. Then the greedy algorithm maintains a set , and at every step adds a minimum weight element that maintains the independence of . If we measure the cost of a subset by the sum of the weights of its elements, then the question is whether the greedy algorithm finds a minimum weight basis of the matroid.

The answer is even better than yes. In fact, the answer is that the greedy algorithm performs perfectly *if and only if* the problem is a matroid! More rigorously,

**Theorem: **Suppose that is an independence system, and that we have a black-box algorithm to determine whether a given set is independent. Define the greedy algorithm to iteratively adds the cheapest element of that maintains independence. Then the greedy algorithm produces a maximally independent set of minimal cost for *every *nonnegative cost function on , if and only if is a matroid.

It’s clear that the algorithm will produce a set that is maximally independent. The only question is whether what it produces has minimum weight among all maximally independent sets. We’ll break the theorem into the two directions of the “if and only if”:

**Part 1: **If is a matroid, then greedy works perfectly no matter the cost function.

**Part 2: **If greedy works perfectly for every cost function, then is a matroid.

*Proof of Part 1.*

Call the cost function , and suppose that the greedy algorithm picks elements (in that order). It’s easy to see that . Now if you give me *any* list of independent elements that has , I claim that for all . This proves what we want, because if there were a basis of size with smaller weight, sorting its elements by weight would give a list contradicting this claim.

To prove the claim, suppose to the contrary that it were false, and for some we have . Moreover, pick the smallest for which this is true. Note , and so we can look at the special sets and . Now , so by the matroid property there is some between and so that is an independent set (and is not in ). But then , and so the greedy algorithm would have picked before it picks (and the strict inequality means they’re different elements). This contradicts how the greedy algorithm runs, and hence proves the claim.

*Proof of Part 2.*

We’ll prove this contrapositively as follows. Suppose we have our independence system and it doesn’t satisfy the last matroid condition. Then we’ll construct a special weight function that causes the greedy algorithm to fail. So let be independent sets with , but for every adding to never gives you an independent set.

Now what we’ll do is define our weight function so that the greedy algorithm picks the elements we want in the order we want (roughly). In particular, we’ll assign all elements of a tiny weight we’ll call . For elements of we’ll use , and for we’ll use , with for everything else. In a more compact notation:

We need two things for this weight function to screw up the greedy algorithm. The first is that , so that greedy picks the elements in the order we want. Note that this means it’ll first pick all of , and then all of , and by assumption it won’t be able to pick anything from , but since is assumed to be non-maximal, we have to pick at least one element from and pay for it.

So the second thing we want is that the cost of doing greedy is worse than picking *any *maximally independent set that contains (and we know that there has to be some maximal independent set containing ). In other words, if we call the size of a maximally independent set, we want

This can be rearranged (using the fact that ) to

The point here is that the greedy picks too many elements of weight , since if we were to start by taking all of (instead of all of ), then we could get by with one fewer. That might not be optimal, but it’s better than greedy and that’s enough for the proof.

So we just need to make large enough to make this inequality hold, while still maintaining . There are probably many ways to do this, and here’s one. Pick some , and set

It’s trivial that and . For the rest we need some observations. First, the fact that implies that . Second, both and are nonempty, since otherwise the second property of independence systems would contradict our assumption that augmenting with elements of breaks independence. Using this, we can divide by these quantities to get

This proves the claim and finishes the proof.

As a side note, we proved everything here with respect to *minimizing *the sum of the weights, but one can prove an identical theorem for maximization. The only part that’s really different is picking the clever weight function in part 2. In fact, you can convert between the two by defining a new weight function that subtracts the old weights from some fixed number that is larger than any of the original weights. So these two problems really are the same thing.

This is pretty amazing! So if you can prove your problem is a matroid then you have an awesome algorithm automatically. And if you run the greedy algorithm for fun and it seems like it works all the time, then that may be hinting that your problem is a matroid. This is one of the best situations one could possibly hope for.

But as usual, there are a few caveats to consider. They are both related to efficiency. The first is the black box algorithm for determining if a set is independent. In a problem like minimum spanning tree or finding independent columns of a matrix, there are polynomial time algorithms for determining independence. These two can both be done, for example, with Gaussian elimination. But there’s nothing to stop our favorite matroid from requiring an exponential amount of time to check if a set is independent. This makes greedy all but useless, since we need to check for independence many times in every round.

Another, perhaps subtler, issue is that the size of the ground set might be exponentially larger than the rank of the matroid. In other words, at every step our greedy algorithm needs to find a new element to add to the set it’s building up. But there could be such a huge ocean of candidates, all but a few of which break independence. In practice an algorithm might be working with implicitly, so we could still hope to solve the problem if we had enough knowledge to speed up the search for a new element.

There are still other concerns. For example, a naive approach to implementing greedy takes quadratic time, since you may have to look through every element of to find the minimum-cost guy to add. What if you just have to have faster runtime than ? You can still be interested in finding more efficient algorithms that still perform perfectly, and to the best of my knowledge there’s nothing that says that greedy is the *only* exact algorithm for your favorite matroid. And then there are models where you don’t have direct/random access to the input, and lots of other ways that you can improve on greedy. But those stories are for another time.

Until then!

# Parameterizing the Vertex Cover Problem

I’m presenting a paper later this week at the Matheamtical Foundations of Computer Science 2014 in Budapest, Hungary. This conference is an interesting mix of logic and algorithms that aims to bring together researchers from these areas to discuss their work. And right away the first session on the first day focused on an area I know is important but have little experience with: fixed parameter complexity. From what I understand it’s not that popular of a topic at major theory conferences in the US (there appears to be only one paper on it at this year’s FOCS conference), but the basic ideas are worth knowing.

The basic idea is pretty simple: some hard computational problems become easier (read, polynomial-time solvable) if you fix some parameters involved to constants. Preferably small constants. For example, finding cliques of size in a graph is NP-hard if is a parameter, but if you fix to a constant then you can check all possible subsets of size in time. This is kind of a silly example because there are much faster ways to find triangles than checking all subsets of vertices, but part of the point of fixed-parameter complexity is to find the fastest algorithms in these fixed-parameter settings. Since in practice parameters are often small [citation needed], this analysis can provide useful practical algorithmic alternatives to heuristics or approximate solutions.

One important tool in the theory of fixed-parameter tractability is the idea of a kernel. I think it’s an unfortunate term because it’s massively overloaded in mathematics, but the idea is to take a problem instance with the parameter , and carve out “easy” regions of the instance (often reducing as you go) until the runtime of the trivial brute force algorithm only depends on and not on the size of the input. The point is that the solution you get on this “carved out” instance is either the same as the original, or can be extended back to the original with little extra work. There is a more formal definition we’ll state, but there is a canonical example that gives a great illustration.

Consider the vertex cover problem. That is, you give me a graph and a number and I have to determine if there is a subset of vertices of that touch all of the edges in . This problem is fixed-parameter tractable because, as with -clique one can just check all subsets of size . The kernel approach we’ll show now is much smarter.

What you do is the following. As long as your graph has a vertex of degree , you remove it and reduce by 1. This is because a vertex of degree will always be chosen for a vertex cover. If it’s not, then you need to include all of its neighbors to cover its edges, but there are neighbors and your vertex cover is constrained by size . And so you can automatically put this high-degree vertex in your cover, and use induction on the smaller graph.

Once you can’t remove any more vertices there are two cases. In the case that there are more than edges, you output that there is no vertex cover. Indeed, if you only get vertices in your cover and you removed all vertices of degree , then each can cover at most edges, giving a total of at most . Otherwise, if there are at most edges, then you can remove all the isolated vertices and show that there are only vertices left. This is because each edge touches only two vertices, so in the worst case they’re all distinct. This smaller subgraph is called a *kernel* of the vertex cover, and the fact that its size depends only on is the key. So you can look at all subsets to determine if there’s a cover of the size you want. If you find a cover of the kernel, you add back in all the large-degree vertices you deleted and you’re done.

Now, even for small this is a pretty bad algorithm ( gives subsets to inspect), but with more detailed analysis you can do significantly better. In particular, the best known bound reduces vertex cover to a kernel of size vertices for any constant you specify. Getting vertices is known to imply P = NP, and with more detailed complexity assumptions it’s even hard to get a graph with fewer than *edges* for any . These are all relatively recent results whose associated papers I have not read.

Even with these hardness results, there are two reasons why this kind of analysis is useful. The first is that it gives us a clearer picture of the complexity of these problems. In particular, the reduction we showed for vertex cover gives a time -time algorithm, which you can then compare directly to the trivial time brute force algorithm and measure the difference. Indeed, if then the kernelized approach is faster.

The second reason is that the kernel approach usually results in simple and quick checks for *negative* answers to a problem. In particular, if you want to check for -sized set covers in a graph in the real world, this analysis shows that the first thing you should do is check if the kernel has size . If so, you can immediately give a “no” answer. So useful kernels can provide insight into the structure of a problem that can be turned into heuristic tools even when it doesn’t help you solve the problem exactly.

So now let’s just see the prevailing definition of a “kernelization” of a problem. This comes from the text of Downey and Fellows.

**Definition: **A *kernelization* of a parameterized problem (formally, a language where each string is paired with a positive integer ) is a -time algorithm that converts instances into instances with the following three properties.

- is a yes instance of if and only if is.
- for some computable function .
- for some computable function .

The output is called a *kernel*, and the problem is said to admit a *polynomial kernel* if for some constant .

So we showed that vertex cover admits a polynomial kernel (in fact, a quadratic one).

Now the nice theorem is that a problem is fixed-parameter tractable *if and only if* it admits a polynomial kernel. Finding a kernel is conceptually easier because, like in vertex cover, it allows you to introduce additional assumptions on the structure of the instances you’re working with. But more importantly from a theoretical standpoint, measuring the size and complexity of kernels for NP-hard problems gives us a way to discriminate among problems within NP. That and the chance to get some more practical tools for NP-hard problems makes parameterized complexity more interesting than it sounds at first.

Until next time!

# An Update on “Coloring Resilient Graphs”

A while back I announced a preprint of a paper on coloring graphs with certain resilience properties. I’m pleased to announce that it’s been accepted to the Mathematical Foundations of Computer Science 2014, which is being held in Budapest this year. Since we first published the preprint we’ve actually proved some additional results about resilience, and so I’ll expand some of the details here. I think it makes for a nicer overall picture, and in my opinion it gives a little more justification that resilient coloring is interesting, at least in contrast to other resilience problems.

## Resilient SAT

Recall that a “resilient” yes-instance of a combinatorial problem is one which remains a yes-instance when you add or remove some constraints. The way we formalized this for SAT was by fixing variables to arbitrary values. Then the question is how resilient does an instance need to be in order to actually find a certificate for it? In more detail,

**Definition:** -resilient -SAT formulas are satisfiable formulas in -CNF form (conjunctions of clauses, where each clause is a disjunction of three literals) such that for all choices of variables, every way to fix those variables yields a satisfiable formula.

For example, the following 3-CNF formula is 1-resilient:

The idea is that resilience may impose enough structure on a SAT formula that it becomes easy to tell if it’s satisfiable at all. Unfortunately for SAT (though this is definitely not the case for coloring), there are only two possibilities. Either the instances are *so *resilient that they never existed in the first place (they’re vacuously trivial), or the instances are NP-hard. The first case is easy: there are no -resilient -SAT formulas. Indeed, if you’re allowed to fix variables to arbitrary values, then you can just pick a clause and set all its variables to false. So no formula can ever remain satisfiable under that condition.

The second case is when the resilience is strictly less than the clause size, i.e. -resilient -SAT for . In this case the problem of finding a satisfying assignment is NP-hard. We’ll show this via a sequence of reductions which start at 3-SAT, and they’ll involve two steps: increasing the clause size and resilience, and decreasing the clause size and resilience. The trick is in balancing which parts are increased and decreased. I call the first step the “blowing up” lemma, and the second part the “shrinking down” lemma.

## Blowing Up and Shrinking Down

Here’s the intuition behind the blowing up lemma. If you give me a regular (unresilient) 3-SAT formula , what I can do is make a copy of with a new set of variables and OR the two things together. Call this . This is clearly logically equivalent to the original formula; if you give me a satisfying assignment for the ORed thing, I can just see which of the two clauses are satisfied and use that sub-assignment for , and conversely if you can satisfy it doesn’t matter what truth values you choose for the new set of variables. And further you can transform the ORed formula into a 6-SAT formula in polynomial time. Just apply deMorgan’s rules for distributing OR across AND.

Now the choice of a new set of variables allows us to give some resilient. If you fix one variable to the value of your choice, I can always just work with the other set of variables. Your manipulation doesn’t change the satisfiability of the ORed formula, because I’ve added all of this redundancy. So we took a 3-SAT formula and turned it into a 1-resilient 6-SAT formula.

The idea generalizes to the blowing up lemma, which says that you can measure the effects of a blowup no matter what you start with. More formally, if is the number of copies of variables you make, is the clause size of the starting formula , and is the resilience of , then blowing up gives you an -resilient -SAT formula. The argument is almost identical to the example above the resilience is more general. Specifically, if you fix fewer than variables, then the pigeonhole principle guarantees that one of the copies of variables has at most fixed values, and we can just work with that set of variables (i.e., this small part of the big ORed formula is satisfiable if was -resilient).

The shrinking down lemma is another trick that is similar to the reduction from -SAT to 3-SAT. There you take a clause like and add new variables to break up the clause in to clauses of size 3 as follows:

These are equivalent because your choice of truth values for the tell me which of these sub-clauses to look for a true literal of the old variables. I.e. if you choose then you have to pick either or to be true. And it’s clear that if you’re willing to double the number of variables (a linear blowup) you can always get a -clause down to an AND of 3-clauses.

So the shrinking down reduction does the same thing, except we only split clauses in half. For a clause , call the first half of a clause and the second half (you can see how my Python training corrupts my notation preference). Then to shrink a clause down from size to size (1 for the new variable), add a variable and break into

and just AND these together for all clauses. Call the original formula and the transformed one . The formulas are logically equivalent for the same reason that the -to-3-SAT reduction works, and it’s already in the right CNF form. So resilience is all we have to measure. The claim is that the resilience is , where is the resilience of .

The reason for this is that if all the fixed variables are old variables (not ), then nothing changes and the resilience of the original keeps us safe. And each we fix has no effect except to force us to satisfy a variable in one of the two halves. So there is this implication that if you fix a you have to also fix a regular variable. Because we can’t guarantee anything if we fix more than regular variables, we’d have to stop before fixing of the . And because these new clauses have size , we can’t do this more than times or else we risk ruining an entire clause. So this give the definition of . So this proves the shrinking down lemma.

## Resilient SAT is always hard

The blowing up and shrinking down lemmas can be used to show that -resilient -SAT is NP-hard for all . What we do is reduce from 3-SAT to an -resilient -SAT instance in such a way that the 3-SAT formula is satisfiable if and only if the transformed formula is resiliently satisfiable.

What makes these two lemmas work together is that shrinking down shrinks the clause size just barely less than the resilience, and blowing up increases resilience just barely more than it increases clause size. So we can combine these together to climb from 3-SAT up to some high resilience and satisfiability, and then iteratively shrink down until we hit our target.

One might worry that it will take an exponential number of reductions (or a few reductions of exponential size) to get from 3-SAT to the of our choice, but we have a construction that does it in at most four steps, with only a linear initial blowup from 3-SAT to -resilient -SAT. Then, to deal with the odd ceilings and floors in the shrinking down lemma, you have to find a suitable larger to reduce to (by padding with useless variables, which cannot make the problem *easier*). And you choose this so that you only need at most two applications of shrinking down to get to -resilient -SAT. Our preprint has the gory details (which has an inelegant part that is not worth writing here), but in the end you show that -resilient -SAT is hard, and since that’s the maximal amount of resilience before the problem becomes vacuously trivial, all smaller resilience values are also hard.

## So how does this relate to coloring?

I’m happy about this result not just because it answers an open question I’m honestly curious about, but also because it shows that resilient coloring is more interesting. Basically this proves that satisfiability is so hard that no amount of resilience can make it easier in the worst case. But coloring has a gradient of difficulty. Once you get to order resilience for -colorable graphs, the coloring problem can be solved efficiently by a greedy algorithm (and it’s not a vacuously empty class of graphs). Another thing on the side is that we use the hardness of resilient SAT to get the hardness results we have for coloring.

If you really want to stretch the implications, you might argue that this says something like “coloring is somewhat easier than SAT,” because we found a quantifiable axis along which SAT remains difficult while coloring crumbles. The caveat is that fixing colors of vertices is not *exactly* comparable to fixing values of truth assignments (since we are fixing lots of instances by fixing a variable), but at least it’s something concrete.

Coloring is still mostly open, and recently I’ve been going to talks where people are discussing startlingly similar ideas for things like Hamiltonian cycles. So that makes me happy.

Until next time!