﻿==================================================
7. GRAPH COLORING (BACKTRACKING)
==================================================

ALGORITHM:
1. Represent the graph using an adjacency matrix.
2. Initialize all vertex colors to zero.
3. Start coloring from vertex 0.
4. Try every available color from 1 to m.
5. Check whether the color is safe.
6. If safe, assign the color and recursively color the next vertex.
7. If unsuccessful, reset color to zero (backtracking).
8. Continue until all vertices are colored or no solution exists.

RECURRENCE RELATION:
T(V) = mT(V-1) + O(V)

TIME COMPLEXITY:
Best Case    : Depends on early solution.
Average Case : Input-dependent.
Worst Case   : O(V * m^V)
Space        : O(V) auxiliary space

IMPORTANT:
1. Graph Coloring uses Backtracking.