ArticleslgStudy

mathematics

Grundy number

Grundy number is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Grundy number rather than just read about it. In short: In graph theory, the Grundy number or Grundy chromatic number of an undirected graph is the largest number of colors in any greedy coloring of the graph. More precisely, it is the number of colors used by a greedy coloring strategy that considers the vertices of the graph in sequence and assigns each vertex its first available color, using a vertex ordering chosen to use as many colors as possible.

Grundy number — main illustration
Grundy number — illustration

Key takeaways

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

Reference excerpt

In graph theory, the Grundy number or Grundy chromatic number of an undirected graph is the largest number of colors in any greedy coloring of the graph. More precisely, it is the number of colors used by a greedy coloring strategy that considers the vertices of the graph in sequence and assigns each vertex its first available color, using a vertex ordering chosen to use as many colors as possible. Grundy numbers are named after P. M. Grundy, who studied an analogous concept for directed graphs in 1939. The undirected version was introduced by Christen & Selkow (1979).

Examples The path graph with four vertices provides the simplest example of a graph whose chromatic number differs from its Grundy number. This graph can be colored with two colors, but its Grundy number is three: if the two endpoints of the path are colored first, the greedy coloring algorithm will use three colors for the whole graph. The complete bipartite graphs are the only connected graphs whose Grundy number is two. All other connected graphs contain either a triangle or a four-vertex path, which cause the Grundy number to be at least three. The crown graphs are obtained from complete bipartite graphs K n , n {\displaystyle K_{n,n}} by removing a perfect matching. As a result, for each vertex on one side of the bipartition, there is exactly one vertex on the opposite side of the bipartition that it is not adjacent to. As bipartite graphs, they can be colored with two colors, but their Grundy number is n {\displaystyle n} : if a greedy coloring algorithm considers each matched pair of vertices in order, each pair will receive a different color. As this example shows, the Grundy number can be larger than the chromatic number by a factor linear in the number of graph vertices.

Atoms Zaker (2006) defines a sequence of graphs called t-atoms, with the property that a graph has Grundy number at least t if and only if it contains a t-atom. Each t-atom is formed from an independent set and a (t − 1)-atom, by adding one edge from each vertex of the (t − 1)-atom to a vertex of the independent set, in such a way that each member of the independent set has at least one edge incident to it. A Grundy coloring of a t-atom can be obtained by coloring the independent set first with the smallest-numbered color, and then coloring the remaining (t − 1)-atom with an additional t − 1 colors. For instance, the only 1-atom is a single vertex, and the only 2-atom is a single edge, but there are two possible 3-atoms: a triangle and a four-vertex path.

In sparse graphs For a graph with n vertices and degeneracy d, the Grundy number is O(d log n). In particular, for graphs of bounded degeneracy (such as planar graphs) or graphs for which the chromatic number and degeneracy are bounded within constant factors of each other (such as chordal graphs) the Grundy number and chromatic number are within a logarithmic factor of each other. For interval graphs, the chromatic number and Grundy number are within a factor of 8 of each other.

Computational complexity Testing whether the Grundy number of a given graph is at least k, for a fixed constant k, can be performed in polynomial time, by searching for all possible k-atoms that might be subgraphs of the given graph. However, this algorithm is not fixed-parameter tractable, because the exponent in its running time depends on k. When k is an input variable rather than a parameter, the problem is NP-complete. The Grundy number is at most one plus the maximum degree of the graph, and it remains NP-complete to test whether it equals one plus the maximum degree. There exists a constant c > 1 such that it is NP-hard under randomized reductions to approximate the Grundy number to within an approximation ratio better than c. There is an exact exponential time algorithm for the Grundy number that runs in time O(2.443n). For trees, and graphs of bounded treewidth, the Grundy number may be unboundedly large. Nevertheless, the Grundy number can be computed in polynomial time for trees, and is fixed-parameter tractable when parameterized by both the treewidth and the Grundy number, although (assuming the exponential time hypothesis) the dependence on treewidth must be greater than singly exponential. When parameterized only by the Grundy number, it can be computed in fixed-parameter tractable time for chordal graphs and claw-free graphs, and also (using general results on subgraph isomorphism in sparse graphs to search for atoms) for graphs of bounded expansion. However, on general graphs the problem is W[1]-hard when parameterized by the Grundy number.

Well-colored graphs

A graph is called well-colored if its Grundy number equals its chromatic number. Testing whether a graph is well-colored is coNP-complete. The hereditarily well-colored graphs (graphs for which every induced subgraph is well-colored) are exactly the cographs, the graphs that do not have a four-vertex path as an induced subgraph.

References

Illustrations

Grundy number: An optimal greedy coloring (left) and Grundy coloring (right) of a crown graph. The numbers indicate the order in which the greedy algorithm colors the vertices.
An optimal greedy coloring (left) and Grundy coloring (right) of a crown graph. The numbers indicate the order in which the greedy algorithm colors the vertices.

Worked examples

Example 1 — a first encounter with Grundy number

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

Example 2 — changing one variable

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

Example 3 — an exam-style question

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

Applications of Grundy number

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

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Grundy number in 20 minutes

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

Frequently asked questions

What is Grundy number in simple terms?

In graph theory, the Grundy number or Grundy chromatic number of an undirected graph is the largest number of colors in any greedy coloring of the graph. More precisely, it is the number of colors used by a greedy coloring strategy that considers the vertices of the graph in sequence and assigns ea…

Why does Grundy number matter?

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

How should I study Grundy number?

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

What does this page cover?

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

Tags

  • Graph coloring
  • Graph invariants
  • NP-complete problems

Keep exploring