Graph Ramsey Theory
Thirteen modules, one for each chapter of a first course on graph Ramsey theory, from Ramsey's theorem to bipartite and size Ramsey numbers. Colour the edges yourself, run the random experiments, watch a random graph grow, work through an example one step at a time, then check yourself with concept questions and practice problems.
Follows the chapter order of Y. Li and Q. Lin, Elementary Methods of Graph Ramsey Theory, Applied Mathematical Sciences 211 (Springer, 2022). All thirteen chapters are covered, one module each. Chapter and exercise numbers refer to that book; the questions and examples here are written for this page.
Ramsey's theorem
Colour every edge of red or blue and you cannot avoid a triangle in one colour. Ramsey's theorem says this is not a fluke: for any target, a large enough complete graph forces it. Try to beat the bound yourself before reading the proof.
The idea
Proof in one line: a vertex of with has edges, so by pigeonhole it has at least red neighbours or at least blue ones. Inside those neighbours, the smaller Ramsey number finds what we need, and completes it. If both terms on the right are even the inequality is strict, by a parity argument (worked example below).
In particular . The same pigeonhole idea gives multicolour and hypergraph versions.
Explore
Worked example
Prove . (The board above has a colouring of with no red triangle and no blue , so in fact .)
What are and , and what does the recursion give?
: a single red edge is a red ; if there is none, all of is blue. With the recursion gives .
In a colouring of , suppose some vertex has at least 4 red edges. Finish the argument.
Look at 4 red neighbours of . A red edge among them makes a red triangle with . If there is none, the 4 neighbours span a blue .
Now suppose some vertex has at least 6 blue edges.
Among 6 blue neighbours, gives a red triangle (done) or a blue triangle, which together with is a blue .
If neither case happens, every vertex has at most 3 red and at most 5 blue edges. Why is that impossible in ?
Each vertex has 8 edges, so it has exactly 3 red and 5 blue. Then the red graph is 3-regular on 9 vertices, and its degree sum would be odd. That is impossible, since the degree sum is twice the number of edges. So .
Check your understanding
A colouring of has no monochromatic triangle. What must its red graph be?
- A 5-cycle.
- The complete bipartite graph . has no triangle, but its complement is a triangle plus an edge, so the blue graph has a triangle.
- Any graph with 5 edges.Count each vertex's red edges. What happens if a vertex has 3 red neighbours?
Using and the recursion, what upper bound do you get for ?
- 18
- 20That is the binomial bound . Feed in the known value of instead.
- 17The parity improvement needs both terms on the right to be even, and 9 is odd.
Someone exhibits a red/blue colouring of with no monochromatic . What does this prove?
- .
- .One good colouring gives only a lower bound. An upper bound needs a statement about every colouring.
- .A colouring that avoids the pattern shows is too small, not big enough.
Practice
Three coloursPigeonhole once more
Show that every colouring of the edges of with three colours contains a monochromatic triangle, that is, .
Hint
A vertex has 16 edges. At least how many share a colour?
Solution
Some colour, say colour 1, appears on at least edges at a vertex . If two of those 6 neighbours are joined in colour 1, we have a triangle with . Otherwise the 6 neighbours span a coloured with colours 2 and 3 only, and gives a monochromatic triangle there. (Module 2 shows 17 is exact.)
The binomial boundInduction
Deduce from the recursion.
Hint
Induct on . The base cases are and . Which identity for binomial coefficients matches the recursion?
Solution
Base: , and similarly for . Step: by Pascal's rule.
More practice: Li–Lin, Exercises 1.2, 1.6 and 1.9.
Paley graphs and small values
Upper bounds come from counting. Lower bounds need an explicit colouring, and the best small ones come from finite fields. The Paley graph on 17 vertices proves , and with the bound from module 1 that settles .
The idea
For the squares mod 17 are , and . So ; together with this gives .
Explore
Worked example
Show that , and turn that into the lower bound .
Split into two sum-free sets.
and . Sums within the first: ; within the second: . None lands back in the same set.
Why can not be split this way?
Put 1 in . Then , so , and , so . Now (since ), so . Finally rules out and rules out .
Given a sum-free split of into classes, colour on vertices by giving edge the class of . Why is there no monochromatic triangle?
For a triangle the three differences are , and . If all three had the same class, that class would contain , and , so it would not be sum-free.
What do you get for and ?
So . With : a good colouring of (it is the pentagon), so . With : , which is weaker than the true value 17, found with instead.
Check your understanding
Why does the Paley construction need ?
- So that is a square, which makes " is a square" symmetric in and .
- So that is prime. may be any prime power, such as 9 or 25. The condition is about .
- So that the graph has an even number of vertices. makes odd.
has . What does it tell you about ?
- , weaker than what gives.
- .A single graph only ever gives a lower bound.
- Nothing, because 13 is prime and 17 is needed.Any graph with no and no independent 4-set gives a lower bound. Check what this one gives.
In the explorer, select a triangle in and press "Multiply by a non-square". What do you get, and why?
- An independent set of size 3, because turns every square difference into a non-square one.
- Another triangle, because multiplication is an automorphism.Multiplying by a square is an automorphism. A non-square swaps edges and non-edges.
- A set of size 6.The map is a bijection on vertices, so the size is preserved.
Practice
Symmetry of Paley graphsAutomorphisms
Show that any two edges of have the same number of common neighbours.
Hint
Which maps are automorphisms? Can one of them send the edge to any given edge?
Solution
If is a nonzero square, is an automorphism, since is a square exactly when is. For an edge , take (a square) and : then and . Automorphisms preserve common neighbourhoods, so every edge has as many common neighbours as .
A triangle-free graph on 13 verticesSum-free connection sets
On , join and when . Show this graph has no triangle. (A computer check shows its independence number is 4, so it proves ; in fact .)
Hint
A triangle needs , and all in .
Solution
is closed under negation, so the graph is well defined, and a triangle needs with . The sums mod 13 of pairs from are , none of which lies in . So there is no triangle.
More practice: Li–Lin, Exercises 2.1, 2.3 and 2.6.
Random colourings
Nobody knows how to write down a colouring of with no monochromatic when is close to . Erdős showed in 1947 that a random colouring does the job with positive probability. The proof never says which colouring works.
The idea
Colour each edge of red or blue independently, with probability each. A fixed -set of vertices is monochromatic with probability . If counts the monochromatic -sets, linearity of expectation gives
The reason: is a whole number and its average is below 1, so some colouring has .
The same chapter bounds independence numbers: every graph has (the worked example).
Explore
Worked example
Prove that every graph has (Caro–Wei), and deduce Turán's theorem from it.
Order the vertices uniformly at random. Let be the set of vertices that come before all of their neighbours. Why is independent?
If were adjacent, would come before and before .
What is ?
Only the relative order of and its neighbours matters, and each of these vertices is equally likely to come first. So .
Finish the bound.
by linearity, so some ordering gives an independent set at least this large.
Deduce: a graph on vertices with no has at most edges.
is convex, so by Jensen for any with average degree . Apply this to the complement : a clique in is an independent set in , so . Hence and . So . Module 7 returns to this.
Check your understanding
For and , . What follows?
- Some colouring of has no monochromatic , so .
- Every colouring of has no monochromatic .An average below 1 guarantees some colouring with , not that all have it.
- A random colouring has a monochromatic with probability exactly .Markov gives . Equality would need always.
Two 4-sets that share an edge are not independent events. Why is still right?
- Linearity of expectation holds for any random variables, dependent or not.
- Because the overlaps are rare enough to ignore.The formula is exact for every , not an approximation.
- It isn't; the formula is an upper bound.Write as a sum of indicator variables and take expectations term by term.
For some and , . What does deletion give?
- .
- .That needs . Here typical colourings do have monochromatic -sets.
- Nothing, because .Some colouring has at most 6 bad sets. What can you remove?
Practice
The boundChecking the inequality
Show that satisfies for .
Hint
Use and .
Solution
. For this is , and going from to multiplies it by .
Half the edges are bipartiteA one-line expectation
Show that every graph with edges has a bipartite subgraph with at least edges.
Hint
Put each vertex on the left or right at random. When does an edge cross?
Solution
Each edge crosses with probability , so the expected number of crossing edges is , and some split achieves at least that. The crossing edges form a bipartite subgraph.
More practice: Li–Lin, Exercises 3.6 and 3.7.
The random graph process
Start with isolated vertices and add random edges one at a time. Properties do not appear gradually: each one shows up suddenly, near an edge count you can predict with a short expectation calculation.
The idea
- Triangles: threshold . At the number of triangles is approximately Poisson with mean .
- Giant component: at , if every component has vertices; if there is a unique component with a constant fraction of the vertices.
- Connectivity: at , . The last obstacle is an isolated vertex.
Random graphs are also where Ramsey lower bounds come from: taking with a well-chosen and deleting a vertex from each triangle shows . The true order, , is due to Kim and to Ajtai, Komlós and Szemerédi.
Watch
- 50 isolated vertices. Edges will arrive in a uniformly random order.
- Up to edges (): a scattering of small trees. Cycles are unlikely this early.
- Up to (): the critical point. Cycles start to appear, and components merge quickly.
- Up to (): one component swallows most of the others. This is the giant component.
- Up to (): the last isolated vertices get their first edge, and the graph becomes connected around here.
- Beyond the threshold: connected, with plenty of triangles. Press "New random graph" and replay to see how much these moments vary for .
Worked example
Let be the number of triangles in . Show that is a threshold for .
Compute .
Each of the triples is a triangle with probability , so .
Suppose . Why is there a.a.s. no triangle?
Markov: .
Suppose . Then , but that alone is not enough. Bound .
Write . Triples sharing at most one vertex share no edge, so they are independent and contribute nothing to the covariance. Pairs sharing an edge span 4 vertices and 5 edges: there are of them, each with . So .
Finish with Chebyshev.
Between the two regimes, at , is approximately Poisson with mean , so .
Check your understanding
About how many triangles do you expect in for large ?
- About .
- About .Compute with : the powers of cancel.
- About 1.You are close. Remember .
At , how many isolated vertices do you expect?
- About 1.
- About 0.Compute .
- About .The exponential cancels the factor exactly.
If , must ?
- No. could be huge on a rare event and 0 otherwise, so a second-moment bound is needed.
- Yes, by Markov's inequality.Markov bounds from above. It says nothing about being positive.
- Yes, because is a sum of many indicators.Indicators can be strongly correlated, for example all equal to one event of small probability.
Practice
When does appear?Same method, new numbers
Find the threshold for to contain a .
Hint
. Where is it of constant order? Check that no subgraph of is denser than itself.
Solution
, which is of constant order at . Below it Markov gives no . Above it, the second moment works because every subgraph of has , so no smaller piece appears later than itself. The threshold is .
No isolated verticesFirst moment
Show that at , a.a.s. has no isolated vertex.
Solution
The expected number of isolated vertices is . By Markov, a.a.s. there are none.
More practice: Li–Lin, Exercises 4.10 and 4.12.
The local lemma
The union bound needs the bad events' probabilities to add up to less than 1. The Lovász Local Lemma needs much less: if each bad event depends on only a few others, all of them can be avoided at once, however many there are. For Ramsey numbers this gains a constant factor over Erdős's bound.
The idea
then : with positive probability no bad event happens.
For : colour at random and let be the event that the -set is monochromatic, so . depends only on the edges inside , so it is independent of all with . The number of other with is
each up to a factor . Nothing better than in the exponent is known. The same chapter uses the local lemma for , and the triangle-free process improves this to .
Explore
Worked example
A hypergraph is 2-colourable if its vertices can be coloured red and blue with no edge monochromatic. Show: if every edge has exactly vertices and meets at most other edges, and , then the hypergraph is 2-colourable.
Set up the random experiment and the bad events.
Colour each vertex red or blue independently with probability . For each edge , let be the event that is monochromatic.
What is ?
All red or all blue: .
Find a dependency graph with maximum degree .
is determined by the colours on . The events with are determined by colours off , so is mutually independent of all of them together. Joining to the edges it meets gives degree at most .
Conclude, and compare with the union bound for .
The local lemma applies, so with positive probability no edge is monochromatic. For the condition is , that is , with no limit at all on the total number of edges. The union bound would need fewer than edges in total.
Check your understanding
Why is the event " is monochromatic" independent of all the events " is monochromatic" with ?
- Such a shares no edge with , so those events depend only on edges outside .
- Because such a shares no vertex with . may share one vertex. What do the events actually depend on?
- Because each event has small probability.Small probability says nothing about independence.
Asymptotically, Spencer's local lemma bound for is how many times Erdős's union bound?
- 2
- That is the gain over the deletion method, not over the union bound.
- Divide the two constants: .
If the events are fully independent (), the condition reads . Is that what independent events actually need?
- No. Independent events, each with probability below 1, can all be avoided, since .
- Yes, the local lemma is exact when .Try with two independent events.
- No, they need .That is the union bound, which is only a sufficient condition.
Practice
Regular uniform hypergraphsCount the dependencies
Show that every -uniform hypergraph in which each vertex lies in exactly edges is 2-colourable once .
Hint
Each edge has vertices, each in other edges.
Solution
An edge meets at most others. For : , so the worked example applies. For larger the left side only shrinks, since grows polynomially while doubles.
Satisfiable formulasThe same lemma, in logic
A -CNF formula has clauses of exactly distinct literals. Show that if each clause shares a variable with at most other clauses, the formula is satisfiable.
Solution
Set each variable true or false at random. A clause fails with probability (all literals false), and its failure depends only on its own variables. With we get , so with positive probability no clause fails.
More practice: Li–Lin, Exercises 5.2 and 5.5.
Explicit Ramsey graphs
Random colourings beat every explicit construction anyone knows. Still, explicit graphs exist whose cliques and independent sets can be bounded by linear algebra. Here is the simplest one: its vertices are triples, and you can try to build a large clique or independent set by hand.
The idea
A clique is a family of triples meeting pairwise in exactly one point: at most by Fisher. An independent set is a family of triples meeting pairwise in 0 or 2 points, an even number: at most by Oddtown. So
That is only polynomial in , against Erdős's exponential . Frankl and Wilson replaced "intersection 1" by conditions on intersections modulo a prime and got explicit graphs with cliques and independent sets of size on vertices. The same intersection theorems disproved Borsuk's conjecture: Kahn and Kalai found bounded sets in that cannot be split into fewer than pieces of smaller diameter.
Explore
Worked example
Prove the Oddtown theorem.
Turn each set into a vector. Over which field?
Over : let be the indicator vector of . Then .
What are and for ?
since sizes are odd, and since intersections are even.
Show the vectors are linearly independent.
If , take the dot product with : every term vanishes except . So every .
Conclude.
Linearly independent vectors in number at most , so . For triples, an independent set of is such a family, so .
Check your understanding
Which family is a clique in ?
- The seven lines of the Fano plane, such as
- All triples containing the element 1. and share two elements, so they are not adjacent.
- The four triples inside .These meet pairwise in two elements. That makes them independent, not a clique.
Oddtown needs odd set sizes. What goes wrong with even sizes and even intersections?
- becomes 0 and the independence argument fails; indeed there can be such sets.
- Nothing; the same bound holds.Try all unions of the pairs
- The vectors no longer live in .They still do. Look at which dot product changes.
gives , and Erdős gives . For , beats . What happens as grows?
- Erdős's bound wins for every : it is exponential, is cubic.
- stays ahead, because explicit graphs are better than random ones.Compare growth rates: against .
- They stay within a constant factor of each other.The ratio tends to infinity.
Practice
The clique boundA positive definite Gram matrix
Show directly that a family of triples in meeting pairwise in exactly one element has at most members.
Hint
Use real indicator vectors this time. What is their Gram matrix?
Solution
With real vectors, and , so the Gram matrix is , which is positive definite (its eigenvalues are 2 and ). A positive definite Gram matrix means the vectors are linearly independent in , so there are at most .
TetrahedraAn independent set of size t
When , find an independent set of size exactly in , so the Oddtown bound is attained.
Solution
Split into blocks of 4 and take all four triples inside each block. Triples in the same block meet in 2 elements and triples in different blocks are disjoint, so every intersection is even. There are triples. The "Tetrahedra" button in the explorer shows this for .
More practice: Li–Lin, Exercises 6.3 and 6.4.
Turán numbers
How many edges can a graph on vertices have without containing a ? Split the vertices into parts as equally as possible and join every pair in different parts. Drag vertices between parts to see why equal parts are best.
The idea
For bipartite that first-order answer is , and the real question is the exponent. Kővári, Sós and Turán: for . For the order is right: the Erdős–Rényi polarity graph, built from the projective plane over , has vertices, no , and about edges.
Why Ramsey cares. In a -colouring of some colour has at least edges. If that exceeds , that colour contains . Bipartite Turán numbers therefore bound multicolour Ramsey numbers, such as .
Explore
Worked example
Show that a graph on vertices with no 4-cycle has at most edges.
Count "cherries": pairs of edges at a common vertex . How many are there in terms of degrees?
: choose the centre , then two of its neighbours.
Why is this at most when there is no ?
Each cherry has a pair of endpoints . If two cherries had the same endpoints and different centres , then would be a 4-cycle. So each pair is used at most once.
Use convexity to bring in the average degree .
is convex, so , that is .
Solve for .
, so . The polarity graph shows the constant cannot be improved.
Check your understanding
To first order, what is ?
- That holds for bipartite graphs. Is bipartite?
- , so the formula gives , not .
In a complete multipartite graph, you move one vertex from a part of size 7 to a part of size 4. How does the number of edges change?
- It goes up by 2.
- It goes up by 3.The moved vertex belongs to its new part too, so that part then has 5 vertices, not 4.
- It stays the same.Only its own edges change. Count its neighbours before and after.
A graph on vertices has no 4-cycle. Roughly how large can its average degree be?
- About .
- About . has average degree but is full of 4-cycles.
- Bounded by a constant.The polarity graph has degrees about and no .
Practice
Mantel's theoremTurán for triangles, by Cauchy–Schwarz
Show that a triangle-free graph on vertices has at most edges.
Hint
For an edge , the neighbourhoods of and are disjoint. Sum over all edges.
Solution
Disjoint neighbourhoods give for each edge. Summing over edges, each vertex appears times, so . By Cauchy–Schwarz, . Hence , so .
Many colours, one 4-cycleTurán meets Ramsey
Use the worked example to show that every -colouring of the edges of with contains a monochromatic .
Hint
Some colour class has at least edges. Compare with .
Solution
It suffices that , that is . With the left side is . On the right, , so , and the right side is less than . So .
More practice: Li–Lin, Exercises 7.4 and 7.5.
Shannon capacity
A channel sends one of five letters, and each letter can be received as itself or as a neighbour around a pentagon. With single letters you can send only 2 messages with no risk of confusion. With two-letter words you can send 5, not 4. That 5 is , and the coincidence is a theorem.
The idea
For , : , and . The pentagon reaches the maximum.
Explore
Worked example
Show that , with letters and confusable with .
Show that the five words form a code.
Take two of them, with first letters differing by . If the first letters are confusable, but the second letters differ by , which is not confusable. If the first letters already differ by 2. Either way, some coordinate tells the words apart.
For the upper bound, look at the codewords whose first letter is or . At most how many are there?
Any two of them have confusable first letters (equal or adjacent), so their second letters must be distinct and non-adjacent. That is an independent set in , so there are at most 2.
Add up over the five windows .
Each codeword's first letter lies in exactly two windows. So , giving .
What does this give for ?
, better than . Lovász's theta function gives the matching upper bound, so : longer words never do better per letter.
Check your understanding
The five-word code uses two letters per word. What is its zero-error rate, in bits per letter?
- That is per word. Each word costs two channel uses.
- 1That is the single-letter rate . The two-letter code does better.
Why is ?
- Concatenate codewords of length : two such long words differ in some block, and that block tells them apart.
- Because is multiplicative under .It is only super-multiplicative: .
- Because has more vertices.More vertices alone does not give large independent sets. Build the code explicitly.
and both have independence number at most 2. Why must ?
- For two codewords, some coordinate has distinct non-adjacent letters; colour the pair by such a coordinate. A monochromatic triangle would be an independent 3-set in or . So at most codewords.
- Because .The pentagon gives 5, so the product formula fails.
- Because has at most 25 vertices. and can be as large as you like.
Practice
The square channelClique covers
Show that .
Hint
is covered by two cliques (edges). What covers ?
Solution
gives . Cover by the cliques and . Products of cliques are cliques in the strong product, so is covered by cliques. An independent set has at most one vertex per clique, so and .
Long words for the pentagonConcatenation
Show that , and that .
Solution
Concatenate words from the five-word code: codewords of length . For odd length, append one more letter from the independent set of , doubling the count.
More practice: Li–Lin, Exercises 8.1 and 8.4.
Dependent random choice
Pick a few random vertices and keep their common neighbourhood. The set you get is small, but it is special: pairs with few common neighbours rarely survive the choice. That is exactly what you need to embed sparse bipartite graphs into dense graphs.
The idea
Then has a set of at least vertices in which every vertices have at least common neighbours.
Why. Choose vertices uniformly at random, with repetition, and let be their common neighbourhood.
- A vertex is in when all picks land in : probability . By convexity .
- An -set with fewer than common neighbours ("bad") lies in only if all picks land in its common neighbourhood: probability below . So the expected number of bad sets inside is below .
- Some choice has . Delete one vertex from each bad set in .
Explore
Worked example
Let be with every edge subdivided once: 4 branch vertices and 6 subdivision vertices, each subdivision vertex adjacent to two branch vertices. Show that every graph with at least edges contains .
What set would make embedding easy?
A set of 4 vertices in which every pair has at least 10 common neighbours. Put the branch vertices on . Then give each of the 6 subdivision vertices a common neighbour of its two branch vertices, avoiding the at most vertices already used. With 10 common neighbours there is always one left.
Apply the lemma with , , . What is the second term?
.
How large must be?
We need , i.e. , i.e. .
Translate into edges.
, so suffices. Hence , matching the shape with .
Check your understanding
In a graph on 40 vertices, a pair has only 3 common neighbours. With picks, what is the probability that both and end up in ?
- That is for one pick. All three picks must land among the 3 common neighbours.
- The picks must be adjacent to both and , so they must land in the intersection of the two neighbourhoods.
Why is , even if is far from regular?
- , and is convex, so the sum is at least times the value at the average.
- Because every vertex has degree . is only the average degree. The argument must handle uneven degrees.
- Because always contains . is usually not inside its own common neighbourhood.
Suppose . As grows, what happens to the ratio of the two terms, ?
- It tends to 0, because it equals and .
- It grows, because is huge. is fixed while grows. Which factor depends on ?
- It stays constant.Write the ratio out and see where appears.
Practice
Subdivided Same recipe, new numbers
Repeat the worked example for with each edge subdivided. What constant do you get in ?
Hint
Now , and you embed 10 subdivision vertices. How many common neighbours does each pair need?
Solution
When placing a subdivision vertex, at most vertices are already used, so works. With the bad term is below , so we need . Then suffices.
The size of Indicators
Prove when the vertices are chosen independently and uniformly, with repetition allowed. Why does the lemma allow repetition?
Solution
, and exactly when each of the independent picks lies in , which has probability . Repetition makes the picks independent, so probabilities multiply exactly. Without repetition the formula would be a ratio of falling factorials, which is messier to estimate.
More practice: Li–Lin, Exercises 9.2 and 9.7.
Quasi-random graphs
The Paley graph is completely determined by arithmetic, yet every statistic you compute says it looks random. Chung, Graham and Wilson showed that several very different-looking "random-like" properties are in fact equivalent. Compare four graphs of the same density and see which tests catch the fakes.
The idea
Fix and a sequence of graphs on vertices. The following are equivalent; graphs satisfying them are called quasi-random with density .
- Cycle count. and the number of closed 4-walks, , is at most .
- Discrepancy. For every vertex set , .
- Eigenvalues. and every other eigenvalue has .
The striking part is the first: one number, the 4-cycle count, controls the edge count of every subset.
The Paley graph is -regular with other eigenvalues , so it is quasi-random with . Graphs with a small second eigenvalue are the source of many explicit Ramsey lower bounds, for multicolour numbers and for off-diagonal .
Explore
Worked example
For a prime , find the eigenvalues of and use them to show .
is a circulant graph: depends only on . What are the eigenvectors?
For and each , the vector is an eigenvector with eigenvalue , where is the set of nonzero squares. For this is .
Relate () to the Gauss sum .
As runs over , takes the value 0 once and each nonzero square twice. So .
Use the classical fact for ( is real). What are the eigenvalues?
, so for every . Half of them take each sign.
Apply Hoffman's bound for -regular graphs.
With and : . For this gives ; the truth is 3. The spectrum alone gets close.
Check your understanding
Two disjoint cliques of size have edge density close to . Are they quasi-random?
- No. If is one of the cliques, , twice what density predicts.
- Yes, the density is right.Density is a single number. Quasi-randomness asks every large subset to have the right density.
- Yes, because random halves have the right number of edges.They do, which is why the test must range over all sets, not random ones.
"Shuffle the labels" changes the picture of the matrix but not the numbers. Why?
- Relabelling replaces by for a permutation matrix , which has the same eigenvalues and the same .
- Because the shuffle is undone before computing.It isn't. The stats are computed from the shuffled matrix.
- Because the graphs are all symmetric.Every adjacency matrix is symmetric. The point is what relabelling does to it.
A 500-regular graph on 1000 vertices has . For sets of size 100, what range does the mixing lemma give for ?
- Between 2000 and 8000.
- Between 4970 and 5030.The error term is , not .
- Exactly 5000.5000 is the centre, . The lemma allows an error.
Practice
Every graph has many 4-cyclesThe easy half of the cycle count
Let have vertices and edges. Show .
Hint
. Bound below using the all-ones vector.
Solution
By the Rayleigh quotient with , . So . Quasi-random graphs are exactly those where this is nearly tight.
Random tests miss structureWhy "every set" matters
In two disjoint cliques of size , let be a uniformly random set of size . Estimate , and explain why random sets cannot detect this structure.
Solution
has about vertices in each clique, so : exactly what density predicts. Only special sets, like one whole clique, reveal the structure. That is why the discrepancy property quantifies over every set, and why spectral and cycle-count tests, which see all sets at once, are so useful.
More practice: Li–Lin, Exercises 10.1 and 10.5.
Van der Waerden and regularity
Colour in two colours: once is large, some arithmetic progression is monochromatic. Szemerédi's work on the density version of this produced the regularity lemma, which says every large graph is a bounded number of random-looking pieces.
The idea
Known exactly: , , , . Szemerédi's theorem is the density version: any set of integers with positive upper density contains arbitrarily long progressions.
does not depend on the graph, but it grows like a tower of 2s of height polynomial in , and Gowers showed this is unavoidable. Uses in Ramsey theory: graphs of bounded maximum degree have Ramsey numbers linear in their order (Chvátal, Rödl, Szemerédi and Trotter), and Ramsey–Turán problems such as .
Explore
Worked example
Prove : every red/blue colouring of has a monochromatic 3-term progression. Suppose one doesn't, and look at 4, 5 and 6.
Suppose 4 and 6 have the same colour, say red. What goes wrong?
2 (from 2, 4, 6), 5 (from 4, 5, 6) and 8 (from 4, 6, 8) must all be blue. But 2, 5, 8 is a progression. The same happens if 4 and 6 are both blue.
So 4 and 6 differ, say 4 red and 6 blue. Reflecting and swapping the colours preserves this situation and sends a red 5 to a blue 5. Why may we assume 5 is red?
The reflection maps progressions to progressions, and swapping colours keeps "monochromatic". Under the combined map, 4 (red) goes to 6 and becomes blue, 6 (blue) goes to 4 and becomes red, and 5's colour flips. So the case "5 blue" turns into the case "5 red".
With 4, 5 red and 6 blue, force as many colours as you can.
3 is blue (3, 4, 5). Then 9 is red (3, 6, 9). Then 7 is blue (5, 7, 9), and 8 is red (6, 7, 8). Also 1 is blue (1, 5, 9), so 2 is red (1, 2, 3).
Find the contradiction.
2, 5 and 8 are all red. So no good colouring of exists. The colouring RRBBRRBB of shows , so .
Check your understanding
Extend the good colouring RRBBRRBB of by colouring 9 red. Which progression is now monochromatic?
- 1, 5, 9
- 3, 6, 93 is blue and 6 is red.
- 2, 5, 88 is blue.
. The only edges join the first 50 vertices of to the first 50 of , all of them. The density is . Is -regular?
- No: those two halves have density 1, far from .
- Yes: regularity only asks about the overall density.It asks about every pair of subsets of at least times the size.
- Yes: halves are too small to count.The threshold is vertices, and 50 is well above it.
are pairwise -regular with densities , all well above . Roughly how many triangles have one vertex in each?
- About , as for random edges.
- Possibly none.That can happen for dense pairs that are not regular. Regularity is what rules it out.
- About .A triangle needs all three edges, so the densities multiply.
Practice
Counting 4-term progressionsWhy good colourings are rare
How many 4-term progressions does contain? How many monochromatic ones does a random 2-colouring have on average?
Hint
For common difference , the first term needs .
Solution
For there are choices of , giving . Each is monochromatic with probability , so the average is 22. A good colouring exists (try "Show a good colouring" on the 34-board), but a random one is far from it.
Progressions inside progressionsScaling
Show that if is 2-coloured with , it contains a monochromatic -term progression.
Solution
Colour with the colour of . A monochromatic progression gives the monochromatic progression , with difference . This is the kind of step used in the proofs of the recursive bounds for .
More practice: Li–Lin, Exercises 11.1 and 11.8.
Linear Ramsey numbers
For complete graphs Ramsey numbers grow exponentially. For sparse graphs they can be linear in the number of vertices, sometimes with an exact formula. Trees against cliques is the cleanest case: one construction gives the lower bound, and it is the truth.
The idea
Construction: take red cliques of size and one red clique of size , and colour every edge between different cliques blue. Red components are too small to hold , and a blue would need a proper colouring with too few or too small classes.
Other exact results: for (Gerencsér–Gyárfás); , with if are both even and 0 otherwise (Harary); . Large book graphs are -good, subdivided graphs have linear Ramsey numbers, and Lee proved the Burr–Erdős conjecture: -degenerate graphs have Ramsey numbers linear in their order.
Explore
Worked example
Prove Chvátal's upper bound: if is a tree on vertices and , every red/blue colouring of has a red or a blue .
Show that a graph with minimum degree at least contains every tree on vertices.
Embed one vertex at a time, always adding a leaf next to an already embedded vertex . Fewer than other vertices have been used, and has at least neighbours, so one is free.
Suppose the red graph has no copy of . What can you say about every subgraph of ?
Every subgraph has a vertex of degree at most , by step 1. So is -degenerate: repeatedly removing a vertex of degree at most empties it.
Why does that give ?
Colour the vertices greedily in the reverse of the removal order. Each vertex has at most neighbours coloured before it, so one of colours is free.
Finish.
Some colour class of has at least vertices, so at least . It is independent in , so all edges inside it are blue: a blue . With Burr's construction, .
Check your understanding
What lower bound does Burr's construction give for , where is the path on 5 vertices?
- 13
- 16The red cliques have vertices, not .
- 9There are red cliques, not 2.
In the construction for a tree on vertices against , why is there no red ?
- Every red component has only vertices, and is connected with vertices.
- Because the red graph is bipartite.The red graph is a union of cliques, far from bipartite.
- Because trees need a vertex of high degree.Paths are trees with maximum degree 2. The reason is size, not degree.
Burr's bound with gives . The true value is . What does this show?
- is not -good: the bound can be strict.
- Burr's bound is wrong for stars.A lower bound below the truth is still correct.
- must be 4.The pentagon colouring of (try it in the lab) has no monochromatic .
Practice
A star against a triangleChvátal, and a direct proof
Show that , first from Chvátal's theorem and then directly.
Hint
Directly: if no vertex has red edges, every vertex has many blue edges. Two blue neighbours of each other then share a blue neighbour.
Solution
is a tree on vertices, so Chvátal gives . Directly, in with no red , each vertex has at most red and so at least blue edges. Take a blue edge : and each have at least further blue neighbours among the other vertices, so they share one, giving a blue triangle. Two red 's with blue between them show is not enough.
Two 4-cyclesA pentagon again
Show that .
Solution
Colour a 5-cycle in red and its complement, another 5-cycle, blue. A 5-cycle has no 4-cycle (it has no cycle other than itself), so neither colour contains . The lab confirms that every colouring of fails.
More practice: Li–Lin, Exercises 12.2 and 12.3.
Bipartite, size and other variants
Change what is coloured, or what is counted, and you get a new Ramsey problem. Colour the edges of a complete bipartite graph, ask for the fewest edges rather than the fewest vertices, demand induced copies, or forbid large cliques in the host. The grid game below is the smallest bipartite case.
The idea
Explore
Worked example
Prove that every red/blue colouring of contains a monochromatic . Think of the 5×5 grid above.
A monochromatic rectangle is two rows and two columns with all four cells one colour. Rephrase in terms of "monochromatic row pairs" in each column.
Say column has a red row pair if cells and are both red. A red rectangle is a red row pair shared by two columns, and similarly for blue. So with no monochromatic rectangle, each (row pair, colour) combination occurs in at most one column. There are combinations.
A column has red and blue cells. How many monochromatic row pairs does it have, at least?
, which is 4 when or , and at least 6 otherwise. So the five columns give at least 20 monochromatic row pairs.
Combine steps 1 and 2. What must every column look like?
At least 20 pairs into at most 20 slots, so equality everywhere: every column has 2 or 3 red cells, and all 10 red row pairs are used exactly once.
Count red row pairs and reach a contradiction.
If columns have 3 red cells and have 2, the red row pairs number . This must equal 10, so , which is impossible. Hence ; the 4×4 board has a good colouring, so .
Check your understanding
Why is for bipartite ?
- Split into two halves of size : the edges between them form a , and its colouring already contains what we need.
- Because has twice as many edges as .It has about twice as many, but the argument needs a copy of inside , not an edge count.
- Because bipartite graphs have chromatic number 2.True, but the inequality comes from finding inside .
has 15 edges and every 2-colouring of it has a monochromatic triangle. Is there a graph with fewer edges with the same property?
- No: .
- Yes: the Folkman graphs.Folkman graphs avoid , but they are large and have many more edges.
- Yes: with one extra vertex of degree 3.Colour as two pentagons. Can the new vertex's three edges always be coloured safely?
Can a triangle-free graph have the property that every 2-colouring of its edges contains a monochromatic triangle?
- No: has no triangles at all, monochromatic or not.
- Yes, by Folkman's theorem.Folkman's graphs avoid , not .
- Yes, if is large enough.A colouring cannot create a triangle that is not there.
Practice
Size Ramsey for starsUpper and lower bounds
Show that , and that the star is not enough.
Solution
In any 2-colouring of the edges of , one colour has at least edges, all at the centre: a monochromatic . In , colour edges red and blue; no vertex has edges of one colour. (The matching lower bound, that no graph with edges works, takes more care.)
The 4×4 boardA good colouring
Find a colouring of with no monochromatic , and check it.
Hint
A monochromatic rectangle means two rows that share two red columns, or two blue columns. Start from the row RRRB and choose the other rows so that every pair of rows shares at most one red and at most one blue column.
Solution
Rows (R = red, B = blue): RRRB, RBBR, BRBR, BBRR. Check the six pairs of rows: each pair shares at most one red column and at most one blue column (rows 2 and 3, for example, share column 3 in blue and column 4 in red). So no rectangle is monochromatic. "Show a good colouring" on the 4×4 board loads it.
More practice: Li–Lin, Exercises 13.1 and 13.5.