- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

Graph coloring is nothing but a simple way of labelling graph components such as vertices, edges, and regions under some constraints. In a graph, no two adjacent vertices, adjacent edges, or adjacent regions are colored with minimum number of colors. This number is called the **chromatic number** and the graph is called a **properly colored graph**.

While graph coloring, the constraints that are set on the graph are colors, order of coloring, the way of assigning color, etc. A coloring is given to a vertex or a particular region. Thus, the vertices or regions having same colors form independent sets.

Vertex coloring is an assignment of colors to the vertices of a graph ‘G’ such that no two adjacent vertices have the same color. Simply put, no two vertices of an edge should be of the same color.

The minimum number of colors required for vertex coloring of graph ‘G’ is called as the chromatic number of G, denoted by X(G).

χ(G) = 1 if and only if 'GX' is a null graph. If 'GX' is not a null graph, then χ(G) ≥ 2

**Note** − A graph ‘G’ is said to be n-coverable if there is a vertex coloring that uses at most n colors, i.e., X(G) ≤ n.

Region coloring is an assignment of colors to the regions of a planar graph such that no two adjacent regions have the same color. Two regions are said to be adjacent if they have a common edge.

Take a look at the following graph. The regions ‘aeb’ and ‘befc’ are adjacent, as there is a common edge ‘be’ between those two regions.

Similarly the other regions are also coloured based on the adjacency. This graph is coloured as follows −

The chromatic number of K_{n} is

a) n

b) n–1

c) ⌊ n 2 ⌋

d) ⌈ n 2 ⌉

Consider this example with K_{4}.

In the complete graph, each vertex is adjacent to remaining (n – 1) vertices. Hence, each vertex requires a new color. Hence the chromatic number of K_{n} = n.

Graph coloring is one of the most important concepts in graph theory. It is used in many real-time applications of computer science such as −

- Clustering
- Data mining
- Image capturing
- Image segmentation
- Networking
- Resource allocation
- Processes scheduling

- Related Questions & Answers
- Graph Coloring
- The Graph Coloring
- C++ Program to Perform Graph Coloring on Bipartite Graphs
- C++ Program to Perform Edge Coloring of a Graph
- C++ Program to Perform Edge Coloring on Complete Graph
- C++ Program to Perform Edge Coloring to the Line Graph of an Input Graph
- M-Coloring Problem
- C++ Program to Perform Greedy Coloring
- Binary Tree Coloring Game in Python
- Coloring the Intersection of Circles/Patches in Matplotlib
- Biconnected Graph
- Graph Databases
- Graph Fundamentals
- Matching Graph
- Complement of Graph

Advertisements