Graph Grundy Number Calculator

worst greedy coloring

CalculatorsFreeNo Signup
4.3(52 reviews)
All Tools

Loading tool...

About Graph Grundy Number Calculator

A Grundy number calculator computing Γ(G): maximum number of colors used by any greedy (first-fit) coloring over all vertex orderings. χ(G) ≤ Γ(G) ≤ Δ(G)+1. Measures 'worst greedy performance'. NP-hard. Client-side.

Graph Grundy Number Calculator Features

  • Γ(G) value
  • vs χ
  • Greedy worst
  • ≤ Δ+1
  • Common graphs
Grundy number Γ(G): maximum colors any greedy (first-fit) coloring can use. Depends on vertex ordering. χ(G) ≤ Γ(G) ≤ Δ(G)+1. Measures how badly greedy can perform. NP-hard to compute. Important for algorithm analysis.

How to Use

Select graph:

  • Γ: Grundy number
  • vs χ: Compare
  • Greedy: Worst case

Greedy Coloring

Greedy: process vertices in order, assign smallest available color. Best ordering: uses χ colors. Worst ordering: uses Γ colors. Gap can be huge: χ=2 but Γ=n/2 for some bipartite graphs!

Bounds

χ ≤ Γ ≤ Δ+1. For trees: Γ = Δ+1 (tight!). For bipartite: Γ can be up to ⌈n/2⌉. Grundy number is hard to compute (NP-hard) and hard to approximate. Active research area.

Step-by-Step Instructions

  1. 1Select graph.
  2. 2Try orderings.
  3. 3Apply greedy.
  4. 4Find worst case.
  5. 5Compare Γ vs χ.

Graph Grundy Number Calculator — Frequently Asked Questions

What makes Grundy different from chromatic number?+

χ = minimum colors (any algorithm). Γ = maximum colors greedy can use (worst ordering). χ is 'best possible', Γ is 'worst greedy'. The gap χ vs Γ measures how unpredictable greedy is.

Can greedy coloring be arbitrarily bad?+

Yes! Crown graphs (bipartite, χ=2) have Γ=n/2. So greedy can use n/2 colors on a 2-colorable graph! Vertex ordering matters enormously for greedy algorithms.

Is Grundy number related to game theory?+

Same name, different concept! Game Grundy number (Sprague-Grundy) is for combinatorial games. Chromatic Grundy number is for greedy coloring. Both named after Grundy but measure different things.

Share this tool: