Graph Coloring
Definition
A proper vertex coloring of a graph is an assignment of colors to the vertices such that no two adjacent vertices have the same color.
The chromatic number of a graph, written as χ(G), is the minimum number of colors needed to properly color the vertices of graph G.
If we color the edges instead of the vertices, then we require that adjacent edges receive different colors. This is called edge coloring. Similarly, coloring the regions of a planar map is related to vertex coloring in graph theory through the map-coloring problem.
Example:
If a graph has vertices connected like this:
A --- B
| |
C --- D
Then if A is colored red, B cannot be red because it is adjacent to A. Likewise, C cannot be red if it is adjacent to A, and so on. A proper coloring ensures all adjacent vertices are different in color.
Main Content
1. First Concept
Proper Vertex Coloring
- : In proper vertex coloring, each vertex is assigned a color so that no edge connects two vertices of the same color. This is the most common and central form of graph coloring. The goal is to use as few colors as possible while maintaining the rule. Example: In a triangle graph where every vertex is connected to the other two, each vertex must receive a different color, so the chromatic number is 3.
Chromatic Number
- : The chromatic number tells us the smallest number of colors needed to color the graph properly. It is an important measure of the graph’s structure and complexity. Some graphs need only 2 colors, while others need many more. Example: A bipartite graph always has chromatic number 2, while a complete graph on 5 vertices has chromatic number 5.
2. Second Concept
Edge Coloring
- : In edge coloring, colors are assigned to edges rather than vertices, with the condition that no two edges sharing a common endpoint have the same color. This is useful when edges represent tasks, connections, or communication channels. Example: In a network, different frequencies may be assigned to wires or links that meet at a node to avoid interference.
Chromatic Index
- : The minimum number of colors required for a proper edge coloring is called the chromatic index, often written as χ′(G). It is used in optimization problems involving link scheduling and resource allocation. Example: A path graph can often be edge-colored using only 2 colors, but a graph with very high vertex degree may require more.
3. Third Concept
Common Graph Classes and Their Coloring Properties
-
: Certain types of graphs have predictable coloring behavior. Understanding these classes helps in solving coloring problems efficiently. Example:
-
Complete graph Kₙ: needs n colors
- Cycle graph Cₙ: needs 2 colors if n is even, 3 colors if n is odd
- Bipartite graph: needs at most 2 colors
- Planar graph: can be colored using at most 4 colors by the Four Color Theorem
Greedy Coloring Idea
- : A practical method of coloring is to process vertices one by one and assign the smallest available color that does not conflict with already colored neighbors. This method is simple and widely used, though it may not always give the minimum number of colors. Example: If a vertex has neighbors colored 1 and 2, it can be assigned color 3.
Working / Process
1. Choose the type of coloring
Decide whether the problem requires vertex coloring, edge coloring, or another variation such as face coloring or coloring of a special graph class.
2. Analyze adjacency relationships
Identify which vertices or edges conflict with each other. In vertex coloring, adjacent vertices must differ in color; in edge coloring, adjacent edges must differ.
3. Assign colors systematically
Start coloring one element at a time using the smallest valid color available. Continue until all vertices or edges are colored properly, and then count the number of colors used to determine whether the coloring is optimal or efficient.
Advantages / Applications
Scheduling and timetabling
- : Graph coloring is used to assign exams, classes, meetings, and tasks so that conflicting events do not occur at the same time.
Map coloring and cartography
- : Regions on maps can be colored so that neighboring regions have different colors, helping in visualization and geographic classification.
Computer science and engineering
- : It is used in compiler optimization, register allocation, frequency assignment, network routing, and solving constraint satisfaction problems.
Summary
- Graph coloring assigns colors so adjacent elements do not share the same color.
- The chromatic number is the minimum number of colors needed for a proper vertex coloring.
- Graph coloring is widely used in scheduling, maps, networks, and computing.
- Important terms to remember: proper coloring, chromatic number, chromatic index, vertex coloring, edge coloring, bipartite graph, complete graph, planar graph