Open In App

Chromatic Polynomial

The chromatic polynomial of graph G is a polynomial function which defines how many ways we can color a graph with some number of colors. So we can write chromatic polynomial of a graph of n vertices denoted by f(G,λ), where we have λ number of colors.

What is Complete Graph?

What is Chromatic Polynomial?

  1. It represents the number of ways we can color vertices of graph with given number of colors such that no adjacent vertices have same color.
  2. It is a important tool in graph theory for studying coloring problems and has various application in fields like computer science.

Chromatic Polynomial for a Complete Graph

Complete Graph

Here we take a complete graph with v number of vertices and we have  λ number of colors c1 , c2 , c3 ….. cλ



So we can say  λ ≥ v.

In a complete graph all vertices are adjacent to each other, so each of them must be colored with different or distinct colors.



Now in the picture , for P vertex we have all the options available means P can be assigned with n number of colors. Similarly for Q, we can not use the same color which already used to color vertex P, so now we have ( λ-1) number of colors to assign. Same way vertex R can be assigned with ( λ-2) colors. When we reach at the last vertex continuing this way, the last vertex can be assigned with  λ-(v-1) = n-v+1 no of colors.

By using the concept of counting, kv is colored in ( λ-1)( λ-2)( λ-3)….( λ-v+1) ways where  λ is number of colors.

Thus, f(kv,  λ) =  λ( λ-1)( λ-2)( λ-3)….( λ-v+1)

Graph G

Examples of Chromatic Polynomial

Let’s consider some examples for better understanding.

Example 1: Let G be a graph and there are λ number of colors like C1,C2,C3,C4….Cλ . Here P,Q,R are three vertices which are adjacent to each other, each of them assigned with distinct color.

Now, if P can be assigned with λ number of color then Q can be assigned with λ-1 number of colors. So the graph G will be colored in  λ(λ -1)(λ -2) ways.

Here we can say, f(G,λ) =  λ(λ -1)(λ -2) =  λ3 – 3λ2 + 2λ.

We can understand it with a simple example, if we have 10 colors and we are supposed to color a graph having three vertices, then the graph may be colored in 10 x 9 x 8 = 720 ways.

Example 2:

Graph G2

It is a complete graph with 4 vertices ( graph G2 ).

the graph will be colored in λ(λ -1)(λ -2)( λ-3) ways so that, f( G2 ,λ) = λ(λ -1)(λ -2)( λ-3).

Example 3:

f(k5, λ) =  λ( λ-1)( λ-2)( λ-3)( λ-4)

f(k7, λ) =  λ( λ-1)( λ-2)( λ-3)( λ-4)( λ-5)( λ-6)

Application of Chromatic Polynomial

We can find the chromatic number of a graph. Here is a graph G1, let’s find its chromatic number.

Graph G1

The Graph G1 has 5 vertices so the chromatic polynomial  f(G1,λ) = c1 λC1 +  c λC2+  c3 λC3 + c4  λC4 + c5  λC5

But here G1 can not be color with 1 color so we can say c1 = 0

in the same way ,

 c2 = 0
c3 = 3! = 6
c4 = 4! x 2! = 48
c5  = 5! = 120

Explanation For Chromatic Polynomial

Explanation 1.1

With 1 or 2 color we cant color this graph so c1 and c2 equals to 0 .

When we have 3 colors , for the first vertex P we have 3 options to choose, for T there are only 2 colors to choose as it is adjacent to vertex P , for S,R,Q we have only one color to color the vertex. so c3 = 3 × 2 × 1 × 1 × 1 = 3!

same for c4 and c5 .

c4 = 4 × 3 × 2 × 2 × 1 = 4! × 2 = 48

c5 = 5 × 4 × 3 × 2 × 1 = 5! = 120 , here number of vertices and number of colors are same then so we can directly conclude that .

So the chromatic polynomial ,

f(G1,λ) = 6 λC3 + 48 λC4 + 120 λC5
 = 6×((λ(λ-1)(λ-2))/3!) + 48×((λ(λ-1)(λ-2)(λ-3))/4!) + 120×((λ(λ-1)(λ-2)(λ-3)(λ-4))/5!) 
  = λ(λ-1)(λ-2) + 2λ(λ-1)(λ-2)(λ-3) + λ(λ-1)(λ-2)(λ-3)(λ-4)

Here, we use the formula of combination above, nCk = n!/(k! × (n-k)! )

nCk = n(n-1)(n-2)….(n-k+1)(n-k)! / k! × (n-k)!

= n(n-1)(n-2)….(n-k+1)/k!

f(G1,1) = f(G1,2) = 0,
but f(G1,3) = 3(3-1)(3-2) = 3 x 2 x 1 = 6 ≠ 0 

So, Chromatic Number of the graph is 3.

Conclusion 

The chromatic polynomial is nothing but a counting technique. A graph can be colored with some colors in different ways, but here we should keep in mind one thing that adjacent vertices must have different colors. From the chromatic polynomial we will know the smallest number of colors required to color a graph properly which is also known as chromatic number of the graph.

FAQs on Chromatic Polynomial

1. What is Chromatic Number of a Graph?

The minimum number of colors such that adjacent vertices of the graph should not have same color is chromatic number of the graph.

2. How to find Chromatic Number from Chromatic Polynomial ?

The chromatic number is nothing but the smallest value of λ such that f(G,λ) ≠ 0. We can denote chromatic number as χ(G).

3. Can we use Chromatic Polynomial to determine if a Graph is Planar?

We can not determine if the graph is planer or not by using only chromatic polynomial.

 


Article Tags :