# The number of maximal left-compressed intersecting families

A family of sets (subsets of of size ) is intersecting if every pair of sets in have a common element.  If then every pair of sets intersect, so can be as large as .  If then the Erdős–Ko–Rado theorem states that , which (up to relabelling of the ground set) is attained only by the star  of all sets containing the element .

A hands on proof of the Erdős–Ko–Rado theorem use a tool called compression.  A family is left-compressed if for every , any set obtained from by deleting an element and replacing it by a smaller one is also in .  You can show by repeatedly applying a certain compression operator that for every intersecting family there is a left-compressed intersecting family of the same size.  Thus it suffices to prove the Erdős–Ko–Rado theorem for left-compressed families, which is easy to do by induction.

There is a strong stability result for large intersecting families.  The Hilton–Milner family consists of all sets that contain and at least one element of , together with itself.  This is an intersecting family, and in fact is the largest intersecting family not contained in a star.  The Hilton–Milner family has size , so any family that gets anything like close to the Erdős–Ko–Rado bound must be a subset of a star.

As part of an alternative proof of the Hilton–Milner theorem, Peter Borg partially answered the following question.

Let be an intersecting family and let .  Let .  For which is ?

Borg used that fact that this is true for to reprove the Hilton–Milner theorem.  In Maximum hitting for sufficiently large I completed the classification of for which this is true for large .  The proof used the apparently new observation that, for , every maximal left-compressed intersecting family in corresponds to a unique maximal left-compressed intersecting family of .  In particular, the number of maximal left-compressed intersecting families for is independent of .  For there are such families respectively.  In the rest of this post I’ll explain how I obtained these numbers.

We want to count maximal left-compressed intersecting families of .  The maximal part is easy: the only way to get two disjoint sets of size from is to take a set and its complement, so we must simply choose one set from each complementary pair.  To make sure the family we generate in this way is left-compressed we must also ensure that whenever we choose a set we must also choose every set with , where means “ can be obtained from by a sequence of compressions”.  The compression order has the following properties.

• If and then if and only if for each .
• if and only if .

Here’s one concrete algorithm.

1. Generate a list of all sets from .  This list has one set from each complementary pair.
2. Put all from the list with into .  (These sets must be in every maximal left-compressed intersecting family.)  Note that we never have as contains but doesn’t.
3. Let be the first element of the list and branch into two cases depending on whether we take or .
• If we take , also take all from the list with and for all from the list with . (Since contains and doesn’t, the second condition will never actually trigger.)
• If we take , also take all from the list with and for all from the list with . It is cheaper to test than the second condition to avoid taking complements.
4. Repeat recursively on each of the two lists generated in the previous step.  Stop on each branch whenever the list of remaining options is empty.

The following is a fairly direct translation of this algorithm into Haskell that makes no attempt to store the families generated and just counts the number of possibilities.  A source file with the necessary import’s and the choose function is attached to the end of this post.

r = 5

simpleOptions = [a | a <- choose r [1..(2*r-1)], not [dollar-sign] a simpleLeftOf (simpleComplement a)]

simpleLeftOf xs ys = all id [dollar-sign] zipWith (<=) xs ys

simpleComplement a = [1..(2*r)] \\ a

simpleCount [] = 1
simpleCount (a:as) = simpleCount take + simpleCount leave
where
-- take a
-- all pairs with b < a or b^c < a are forced
-- second case never happens as b^c has 2r but a doesn't
take = [b | b <- as, not [dollar-sign] b simpleLeftOf a]
-- leave a, and so take a^c
-- all pairs with b < a^c or b^c < a^c (equivalently, a < b) are forced
c = simpleComplement a
leave = [b | b <- as, not (b simpleLeftOf c || a simpleLeftOf b)]


This will compute the number of maximal left-compressed intersecting families for in a fraction of a second.  For it would probably find the answer in less than a month.  I obtained the value for in a couple of days on a single core by using a better representation of the sets in our family.

The dream is to pack all of the elements of our list into a single machine word and perform each comparison in a small number of instructions.  For example, we could encode an element of by writing each element as binary digits then concatenating them in increasing order to obtain a 24 bit word.  But comparing two such words as integers compares the corresponding sets lexicographically rather than pointwise.  Edward Crane suggested that as the lists are so short and the elements are so small we can afford to be quite a lot more wasteful in our representation: we can write each element of our set in unary!  The rest of this section should be considered joint work with him.

The first iteration of the idea is to write each element of as a string of 1’s followed by 0’s, then concatenate these strings to obtain a representation of our set.  This representation has the great advantage that we can compare sets pointwise by comparing strings bitwise, and we can do this using very few binary operations: is contained in if and only if .

Unfortunately this representation uses 72 bits in total, so won’t fit into a 64-bit machine word. Observing that we never use and encoding by 1‘s followed by 0‘s saves only 6 bits. But we can do even better by encoding each element of the set differently. The first element is always at least 1, the second is always at least 2 and so on. Similarly, the first element is at most 7, the second at most 8 and so on. Working through the details we arrive at the following representation.

Identify each element of by an “up-and-right” path from the bottom left to the top right corner of a grid: at the th step move right if is in your set and up if it isn’t. Then if and only if the path corresponding to never goes below the path corresponding to . So we can compare sets by comparing the regions below the corresponding paths. Recording these regions can be done using 36 bits, which happily sits inside a machine word. This representation also has the helpful property that taking the complement of a set corresponds to reflecting a path about the up-and-right diagonal, so the representation of the complement of a set can be obtained by swapping certain pairs of bits followed by a bitwise NOT.

The value for was obtained using this new representation and the old algorithm, with one minor tweak.  It’s a bad idea to start with a lexicographically ordered list of sets, as the early decisions will not be meaningful and not lead to much of a reduction in the length of the the lists.  Optimal selection of which pair to decide at each stage is probably a complicated question.  As a compromise I randomised the order of the list at the start of the process, then took the first remaining pair at each stage.

The Haskell source is here.  There are a few more performance tricks to do with the exact bit representation of the sets, which I’m happy to discuss if anything is unclear.

# Counting colourings with containers

On the maximum number of integer colourings with forbidden monochromatic sums, Hong Liu, Maryam Sharifzadeh and Katherine Staden

The problem is as follows.  Let be the number of -colourings of a subset of with no monochromatic sum .  What is the maximum of over all ?

One possibility is that we take to be sum-free, so that .  The maximum size of a sum-free set of is around , achieved by the set of odd numbers and the interval , so .

Another possibility is to choose sum-free sets and take all colourings of such that the elements of colour are contained in .  There are

such colourings, where is the number of elements in exactly of the .  For example, we might take half of the to be and half to be .  Then the odd numbers greater than are in every set, and the evens greater than and the odds less than are in half of the sets, so the number of colourings is around

For this matches the previous lower bound; for it is larger.

It’s easy to see that this construction cannot improve the bound for : it only provides good colourings, but as elements contributing to are in , which must be sum-free.

What about ?  Now we get good colourings.  We also have that

But since we have

Moreover, if is not tiny then we are some distance off this upper bound, so the only good constructions in this family come from having all the substantially agree.

How can we get matching upper bounds?  If there weren’t very many maximal sum-free sets then we could say that every good colouring arises from a construction like this, and there aren’t too many such constructions to consider.  This is too optimistic, but the argument can be patched up using containers.

The container method is a relatively recent addition to the combinatorial toolset.  For this problem the key fact is that there is a set of subsets of such that

• every sum-free set is contained in some ,
• each is close to sum-free.  Combined with a “sum-removal lemma” this means in particular that it has size not much larger than .

We now consider running the above construction with each an element of .  Since the containers are not themselves sum-free, this will produce some bad colourings.  But because every sum-free set is contained in some element of , every good colouring of a subset of will arise in this way.  And since there are most choices for the sets the number of colourings we produce is at most a factor greater than the biggest single example arising from the construction.

This is the big idea of the paper: it reduces counting colourings to the problem of optimising this one construction.  For the authors are able to solve this new problem, and so the original.

# Linear programming duality

The conventional statement of linear programming duality is completely inscrutable.

• Prime: maximise subject to and .
• Dual: minimise subject to and .

If either problem has a finite optimum then so does the other, and the optima agree.

do understand concrete examples.  Suppose we want to pack the maximum number vertex-disjoint copies of a graph into a graph .  In the fractional relaxation, we want to assign each copy of a weight such that the weight of all the copies of at each vertex is at most , and the total weight is as large as possible.  Formally, we want to

maximise subject to and ,

which dualises to

minimise subject to and .

That is, we want to weight vertices as cheaply as possible so that every copy of contains (fractional) vertex.

To get from the prime to the dual, all we had to was change a max to a min, swap the variables indexed by for variables indexed by and flip one inequality.  This is so easy that I never get it wrong when I’m writing on paper or a board!  But I thought for years that I didn’t understand linear programming duality.

(There are some features of this problem that make things particularly easy: the vectors and in the conventional statement both have all their entries equal to , and the matrix is -valued.  This is very often the case for problems coming from combinatorics.  It also matters that I chose not to make explicit that the inequalities should hold for every (or , as appropriate).)

Returning to the general statement, I think I’d be happier with

• Prime: maximise subject to and .
• Dual: minimise subject to and .

My real objection might be to matrix transposes and a tendency to use notation for matrix multiplication just because it’s there.  In this setting a matrix is just a function that takes arguments of two different types ( and or, if you must, and ), and I’d rather label the types explicitly than rely on an arbitrary convention.

# Random Structures and Algorithms 2017

A partial, chronologically ordered, list of talks I attended at RSA in Gniezno, Poland. Under construction until the set of things I can remember equals the set of things I’ve written about.

### Shagnik Das

A family of subsets of that shatters a -set has at least elements. How many -sets can we shatter with a family of size ? A block construction achieves . (Random is much worse.) Can in fact shatter constant fraction of all -sets. When , identify the ground set with , and colour by for .

Claim. A -set is shattered if and only if it is a basis for .

Proof. First suppose that is a basis. Then for any sequence , there is a unique vector such that . (We are just solving a system of full rank equations mod 2.)

Next suppose that are linearly dependent; that is, that they are contained in a subspace of . Choose orthogonal to . Then for any and any we have , so two of our colourings agree on .

We finish with the observation that random sets of vectors are fairly likely to span : the probability is

Blowing up this colouring gives a construction that works for larger .

At the other end of the scale, we can ask how large a family is required to shatter every -set from . The best known lower bound is , and the best known upper bound is , which comes from a random construction. Closing the gap between these bounds, or derandomising the upper bound, would both be of significant interest.

### Andrew McDowell

At the start of his talk in Birmingham earlier this summer, Peter Hegarty played two clips from Terminator in which a creature first dissolved into liquid and dispersed, then later reassembled, stating that it had prompted him to wonder how independent agents can meet up without any communication. Andrew tackled the other half of this question: how can non-communicating agents spread out to occupy distinct vertices of a graph? He was able to analyse some strategies using Markov chains in a clever way.

### Tássio Naia

A sufficient condition for embedding an oriented tree on vertices into every tournament on vertices that implies that almost all oriented trees are unavoidable in this sense.

# Matchings without Hall’s theorem

In practice matchings are found not by following the proof of Hall’s theorem but by starting with some matching and improving it by finding augmenting paths.  Given a matching in a bipartite graph on vertex classes and , an augmenting path is a path from to such that ever other edge of is an edge of .  Replace by produces a matching with .

Theorem.  Let be a spanning subgraph of .  If (i) or (ii) is -regular, then has a perfect matching.

Proof. Let be a maximal matching in with .

(i) Choose , .  We have and .  Since there is an such that is adjacent to and is adjacent to .  Then is an augmenting path.

(ii) Without loss of generality, is connected.  Form the directed graph on by taking the directed edge  () whenever is an edge of .  Add directed edges arbitrarily to to obtain a -regular digraph , which might contain multiple edges; since is connected we have to add at least one directed edge.  The edge set of decomposes into directed cycles.  Choose a cycle containing at least one new edge of , and let be a maximal sub-path of containing only edges of .  Let , be the start- and endpoints of respectively.  Then we can choose and , whence  is an augmenting path, where is the result of “pulling back” from to , replacing each visit to a in by use of the edge of .

# Matchings and minimum degree

A Tale of Two Halls

(Philip) Hall’s theorem.  Let be a bipartite graph on vertex classes , .  Suppose that,  for every , .  Then there is a matching from to .

This is traditionally called Hall’s marriage theorem.  The picture is that the people in are all prepared to marry some subset of the people in .  If some people in are only prepared to marry into some set of people, then we have a problem; but this is the only problem we might have.  There is no room in this picture for the preferences of people in .

Proof. Suppose first that  for all .  Then we can match any element of arbitrarily to a neighbour in and obtain a smaller graph on which Hall’s condition holds, so are done by induction.

Otherwise  for some .  By induction there is a matching from to .  Let .  Then for any we have

hence and Hall’s condition holds on .  So by induction there is a matching from to , which together with the matching from to is a matching from to .

Corollary 1.  Every -regular bipartite graph has a perfect matching.

Proof. Counted with multiplicity, .  But each element of is hit at most times, so in the conventional sense.

Corollary 2. Let be a spanning subgraph of with minimum degree at least .  Then has a perfect matching.

This is very slightly more subtle.

Proof. If there is nothing to check.  Otherwise there is a .  Then and , so .  But for every .

Schrijver proved that a -regular bipartite graph with vertices in each class in fact has at least perfect matchings.  For minimum degree we have the following.

(Marshall) Hall’s theorem.  If each vertex of has degree at least and there is at least one perfect matching then there are at least .

This turns out to be easy if we were paying attention during the proof of (Philip) Hall’s theorem.

Proof. By (Philip) Hall’s theorem the existence of a perfect matching means that (Philip) Hall’s condition holds.  Choose a minimal on which it is tight.  Fix and match it arbitrarily to a neighbour .  (Philip) Hall’s condition still holds on and the minimum degree on this subgraph is at least , so by induction we can find at least perfect matchings.  Since there were at least choices for we have at least perfect matchings from to .  These extend to perfect matchings from to as in the proof of (Philip) Hall’s theorem.

Thanks to Gjergji Zaimi for pointing me to (Marshall) Hall’s paper via MathOverflow.

# Block partitions of sequences

Let be a line segment of length broken into pieces of length at most . It’s easy to break into blocks (using the preexisting breakpoints) that differ in length by at most (break at the nearest available point to , etc.).

In the case where each piece has length and the number of pieces isn’t divisible by , we can’t possibly do better than a maximum difference of between blocks.  Is this achievable in general?

In today’s combinatorics seminar Imre Bárány described joint work with Victor Grinberg which says that the answer is yes.

# The Namer-Claimer game

Consider the following game played on the integers from to .  In each round Namer names a forbidden distance , then Claimer claims a subset of that does not contain any two integers at distance .  After finitely many rounds, Claimer will have claimed sets that cover the whole of , at which point the game ends.  How many rounds will there be with best play?

I’ve run this question out at a number of workshops and open problems sessions, and haven’t yet heard back about a success.  I’ll explain the known upper and lower bounds below the fold, but encourage you to spend a few minutes thinking about it before taking a look.

# Nowhere zero 6-flows

A flow on a graph is an assignment to each edge of of a direction and a non-negative integer (the flow in that edge) such that the flows into and out of each vertex agree.  A flow is nowhere zero if every edge is carrying a positive flow and (confusingly) it is a -flow if the flows on each edge are all less than .  Tutte conjectured that every bridgeless graph has a nowhere zero -flow (so the possible flow values are ).  This is supposed to be a generalisation of the -colour theorem.  Given a plane graph and a proper colouring of its faces by , push flows of value anticlockwise around each face of .  Adding the flows in the obvious way gives a flow on in which each edge has a total flow of in some direction.

Seymour proved that every bridgeless graph has a nowhere zero -flow.  Thomas Bloom and I worked this out at the blackboard, and I want to record the ideas here.  First, a folklore observation that a minimal counterexample must be cubic and -connected.  We will temporarily allow graphs to have loops and multiple edges.

We first show that is -edge-connected.  It is certainly -edge-connected, else there is a bridge.  (If is not even connected then look at a component.)  If it were only -edge-connected then the graph would look like this.

Contract the top cross edge.

If the new graph has a nowhere zero -flow then so will the old one, as the flow in the bottom cross edge tells us how much flow is passing between the left and right blobs at the identified vertices and so the flow the we must put on the edge we contracted.  So is -edge connected.

Next we show that is -regular.  A vertex of degree forces a bridge; a vertex of degree forces the incident edges to have equal flows, so the two edges can be regarded as one.  So suppose there is a vertex of degree at least .

We want to replace two edges and by a single edge to obtain a smaller graph that is no easier to find a flow for.  The problem is that in doing so we might produce a bridge.

The -edge-connected components of   are connected by single edges in a forest-like fashion.  If any of the leaves of this forest contains only one neighbour of then there is a -edge-cut, so each leaf contains at least two neighbours of .

If there is a component of the forest with two leaves then choose and to be neighbours of from different leaves of that component.

Otherwise the -edge-connected components of are disconnected from each other.  Now any such component must contain at least neighbours of , else there is a -edge-cut.  If some contains neighbours of then we can choose and to be any two of them.  Otherwise all such contain exactly neighbours of , in which case there must be at least two of them and we can choose and to be neighbours of in different components.

So is -regular and -edge-connected.  If is only -connected then there is no flow between -connected components, so one of the components is a smaller graph with no nowhere zero -flow.  If is only -connected then because is so small we can also find a -edge-cut.

Finally, we want to get rid of any loops and multiple edges we might have introduced.  But loops make literally no interesting contribution to flows and double edges all look like

and the total flow on the pair just has to agree with the edges on either side.

We’ll also need one piece of magic (see postscript).

Theorem. (Tutte) Given any integer flow of there is a -flow of that agrees with the original flow mod .  (By definition, flows of in one direction and in the other direction agree mod .)

So we only need to worry about keeping things non-zero mod .

The engine of Seymour’s proof is the following observation.

Claim. Suppose that where each is a cycle and the number of new edges when we add to is at most .  Then has a -flow which is non-zero outside .

Write for the set of edges added at the th stage.  We assign flows to in that order.  Assign a flow of in an arbitrary direction to ; now the edges in have non-zero flow and will never be touched again.  At the next stage, the edges in might already have some flow; but since there are only two possible values for these flows mod .  So there is some choice of flow we can put on to ensure that the flows on are non-zero.  Keep going to obtain the desired -flow, applying Tutte’s result as required to bring values back in range.

Finally, we claim that the we are considering have the above form with being a vertex disjoint union of cycles.  Then trivially has a -flow, and times this -flow plus the -flow constructed above is a nowhere-zero -flow on .

For , write for the largest subgraph of that can be obtained as above by adding cycles in turn, using at most two new edges at each stage.  Let be a maximal collection of vertex disjoint cycles in with connected, and let .  We claim that is empty.  If not, then the -connected blocks of are connected in a forest-like fashion; let be one of the leaves.

By -connectedness there are three vertex disjoint paths from to . At most one of these paths travels through ; let and be endpoints of two paths that do not.  These paths must in fact be single edges, as the only other way to get to would be to travel through .  Finally, since is -connected it contains a cycle through and , contradicting the choice of .

Postscript. It turns out that Tutte’s result is far from magical; in fact its proof is exactly what it should be.  Obtain a directed graph from by forgetting about the magnitude of flow in each edge (if an edge contains zero flow then delete it).  We claim that every edge is in a directed cycle.

Indeed, choose a directed edge .  Let be the set of vertices that can be reached by a directed path from and let be the set of vertices that can reach by following a directed path.  If  is not in any directed cycle then and are disjoint and there is no directed path from to .  But then there can be no flow in , contradicting the definition of .

So as long as there are edges with flow value at least , find a directed cycle containing one of those edges and push a flow of through it in the opposite direction.  The total flow in edges with flow at least strictly decreases, so we eventually obtain a -flow.

# Ultrafilter quantifiers and Hindman’s theorem

A filter on is a consistent notion of largeness for subsets of . “Largeness” has the following properties.

• if is large and then is large
• if and are large then is large
• the empty set is not large

At most one of and is large; an ultrafilter is a filter which always has an opinion about which it is.

• either or is large

The usual notation for “ is large” is , where is the ultrafilter. This casts ultrafilters as sets, rather than notions of largeness. To bring the notion of largeness to the foreground we can use ultrafilter quantifiers; we write , read “for -most , holds” (where we have also identified with the predicate “is a member of “).

• if and then
• if and then

From this point of view says that the set of elements with property is everything, and that the set of elements with property is non-empty. behaves like a mixture of and , with the considerable advantage that logical operations pass through unchanged without having to worry about De Morgan’s laws.

It turns out that the set of ultrafilters on is a model for the Stone–Čech compactification of . is embedded as the set of principal ultrafilters (“ is large if and only if “), and the addition on extends to :

(Here should be interpreted as .) But to use this addition with quantifiers all we need to know is that . If you can see that from the first definition then your brain is wired differently from mine.

It is a fact that there exist idempotent ultrafilters, with . Given such a , we can play the following game. Suppose that . Then , so and therefore (by ANDing with the original assertion, and the original assertion with the dummy variable replaced by ). In particular, . But now we can fix a good choice of and repeat the whole process with in place of to get that

Iterating, we eventually obtain an infinite sequence such that holds for every sum of finitely many of the . Together with the observation that whenever is finitely coloured exactly one of the colour classes is -large this proves Hindman’s theorem, that we can always find an infinite sequence such that every sum of finitely many terms has the same colour.

A version of this argument with more of the details filled in is on the Tricki.