Graph coloring is a fundamental concept in computer science and mathematics, with wide-ranging applications in scheduling, map coloring, and circuit design. It involves assigning colors to vertices of a graph such that no two adjacent vertices share the same color. The minimum number of colors required to color a graph is known as its chromatic number. Let's explore some graph coloring example problems and their solutions.

Graph coloring problems often involve finding the chromatic number of a graph or determining whether a graph can be colored with a given number of colors. They can be solved using various algorithms, including greedy algorithms, backtracking, and more complex techniques like the DSatur algorithm and the Welsh-Powell algorithm.

Graph Coloring Basics
Before diving into example problems, let's recap some basic graph coloring rules:

1. Adjacency Rule: No two adjacent vertices can share the same color.
2. Chromatic Number: The minimum number of colors required to color a graph is its chromatic number.

Four-Color Theorem
The four-color theorem states that every planar graph (a graph that can be drawn in the plane without edges crossing) can be colored using no more than four colors. This theorem was first proposed by Augustus De Morgan in 1852 and finally proven by Kenneth Appel and Wolfgang Haken in 1976 using a computer-assisted proof.
Here's a simple planar graph and its coloring using four colors:

| 1 | 2 | 3 | 4 |
| R | G | B | Y |
| R | B | Y | G |
| B | Y | R | G |
| Y | G | B | R |
Graph Coloring Algorithms
Several algorithms can be used to color graphs. One simple yet effective algorithm is the greedy algorithm, which colors vertices one by one, always choosing the first available color for each vertex.

Here's how the greedy algorithm works on a simple graph:
- Start with an arbitrary vertex and assign it color 1.
- For each subsequent vertex, assign the lowest-numbered color that is not already used by any of its adjacent vertices.
- Repeat until all vertices are colored.



















Graph Coloring Example Problems
Now let's explore some graph coloring example problems and their solutions.
Problem 1: Chromatic Number of a Cycle
The chromatic number of a cycle (a graph with vertices arranged in a circle) with n vertices is n. This can be proven using the pigeonhole principle: if we try to color the cycle with fewer than n colors, there must be at least one color used by k consecutive vertices, violating the adjacency rule.
Here's a 5-cycle colored with 5 colors:
| 1 | 2 | 3 | 4 | 5 |
| R | G | B | Y | M |
Problem 2: Coloring a Complete Graph
A complete graph (a graph where every pair of distinct vertices is connected by a unique edge) with n vertices requires n colors to be colored properly. This is because each vertex is adjacent to every other vertex, so each vertex must have a unique color.
Here's a complete graph K4 colored with 4 colors:
| 1 | 2 | 3 | 4 |
| R | G | B | Y |
Graph coloring is a rich and complex field with many open problems and applications. By understanding and practicing graph coloring example problems, you can gain valuable insights into this fascinating topic. Happy coloring!