Bipartite Graphs & Coloring
We study bipartite graphs (no odd cycles) and graph coloring — assigning colors to vertices so no two adjacent vertices share a color. The chromatic number is the minimum number of colors needed. We connect these to interval graphs and the greedy coloring algorithm.
Learning Objectives
Key Concepts
Bipartite Graphs
A graph is bipartite if its vertices can be partitioned into two sets such that every edge goes between and (no edges within or within ).
Equivalently, is bipartite iff has no odd cycle. BFS can test bipartiteness in .
- -
All trees are bipartite
- -
Even cycles are bipartite; odd cycles are not
- -
BFS detects bipartiteness: assign alternating colors by level, check for conflicts
Graph Coloring & Chromatic Number
A proper -coloring assigns one of colors to each vertex such that adjacent vertices get different colors. The chromatic number is the minimum for which a proper -coloring exists.
Key bounds: (clique number) and (greedy bound). Brooks' theorem tightens this.
- -
has no edges
- -
is bipartite (and has edges)
- -
- -
(basic sandwich inequality)
- -
Brooks: unless is or an odd cycle
Interval Graphs
An interval graph has vertices representing intervals on the real line, with edges between overlapping intervals. Interval graphs are perfect: .
Greedy coloring on interval graphs (sorted by left endpoint) achieves the optimal coloring.
- -
Interval graphs are chordal and perfect
- -
Greedy coloring on intervals sorted by left endpoint is optimal
- -
Application: scheduling — minimum rooms needed = max overlap = clique number