Open In App

Mathematics | Planar Graphs and Graph Coloring

Improve
Improve
Like Article
Like
Save
Share
Report
Prerequisite – Graph Theory Basics Consider an electronic circuit having several nodes with connections between them. Is it possible to print that circuit on a single board such that none of the connections cross each other i.e. they do not overlap or intersect? This question can be answered if we know about planarity of graphs. Planarity – “A graph is said to be planar if it can be drawn on a plane without any edges crossing. Such a drawing is called a planar representation of the graph.” Important Note – A graph may be planar even if it is drawn with crossings, because it may be possible to draw it in a different way without crossings. For example consider the complete graph K_{4} and its two possible planar representations –
  • Example – Is the hypercube Q_{3} planar?
  • Solution – Yes, Q_{3} is planar. Its planar representation-

Regions in Planar Graphs –

The planar representation of a graph splits the plane into regions. These regions are bounded by the edges except for one region that is unbounded. For example, consider the following graph ” There are a total of 6 regions with 5 bounded regions and 1 unbounded region R_{6}. All the planar representations of a graph split the plane in the same number of regions. Euler found out the number of regions in a planar graph as a function of the number of vertices and number of edges in the graph. Theorem – “Let G be a connected simple planar graph with e edges and v vertices. Then the number of regions r in the graph is equal to e-v+(k+1) where k is the no. of component in the graph..”
  • Example – What is the number of regions in a connected planar simple graph with 20 vertices each with a degree of 3?
  • Solution – Sum of degrees of edges = 20 * 3 = 60. By handshaking theorem, 2e =  60 which gives e = 30. By Euler’s theorem, the number of regions = e - v + 2 which gives 12 regions.
An important result obtained by Euler’s formula is the following inequality – Note –“If G is a connected planar graph with e edges and v vertices, where v\geq 3, then e\leq 3v - 6. Also G cannot have a vertex of degree exceeding 5.”
  • Example – Is the graph K_{5} planar?
  • Solution – Number of vertices and edges in K_{5} is 5 and 10 respectively. Since 10 > 3*5 – 6, 10 > 9 the inequality e\leq 3v - 6 is not satisfied. Thus the graph is not planar.

Graph Coloring –

If you ever decide to create a map and need to color the parts of it optimally, feel lucky because graph theory is by your side. What is the maximum number of colors required to color the regions of a map? This question along with other similar ones have generated a lot of results in graph theory. First, let us define the constraint of coloring in a formal way- Coloring – “A coloring of a simple graph is the assignment of a color to each vertex of the graph such that no two adjacent vertices are assigned the same color.” A simple solution to this problem is to color every vertex with a different color to get a total of v colors. But in some cases, the actual number of colors required could be less than this. chromatic number –“The least number of colors required to color a graph is called its chromatic number. It is denoted by \chi (G).” For planar graphs finding the chromatic number is the same problem as finding the minimum number of colors required to color a planar graph. 4 color Theorem – “The chromatic number of a planar graph is no greater than 4.”
  • Example 1 – What is the chromatic number of the following graphs?
  • Solution – In graph G, the chromatic number is atleast three since the vertices a, b, and f are connected to each other. The following color assignment satisfies the coloring constraint – a – Red b – Green c – Blue d – Red e – Green f – Blue g – Red Therefore the chromatic number of G is 3. In graph H since a and d are also connected, therefore the chromatic number if 4.

  • Example 2 – What is the chromatic number of K_{n}?
  • Solution – Since every vertex is connected to every other vertex in a complete graph, the chromatic number is n.

  • Example 3 – What is the chromatic number of C_{n}?
  • Solution – If the vertex are colored in an alternating fashion, the cycle graph requires 2 colors. If n is odd, then the last vertex would have the same color as the first vertex, so the chromatic number will be 3. But if it is even, then first and last vertices will be of different color and the chromatic number will be 2.

  • Example 4 – What is the chromatic number of K_{m,n}?
  • Solution – In the bi-partite graph K_{m,n}, the vertices in are divided into two sets, such that there is no edge between vertices in the same set. Therefore the chromatic number of any bipartite graph is 2. One set of vertices can be assigned one color and the other can be assigned a different color for a total of 2 colors. It will satisfy the coloring constraint since the vertices of the same set are not connected.

GATE CS Corner Questions

Practicing the following questions will help you test your knowledge. All questions have been asked in GATE in previous years or in GATE Mock Tests. It is highly recommended that you practice them. 1. GATE CS 2012, Question 21 2. GATE CS 2011, Question 17 3. GATE CS 2009, Question 2 4. GATE CS 2008, Question 23 5. GATE CS 2005 Question 10 6. GATE CS 2005, Question 47 7. GATE CS 2004, Question 77 8. GATE CS 2002, Question 4 9. GATE CS 2015 Set-1, Question 63 10. GATE CS 2008, Question 3 11. GATE CS 2016 Set-2, Question 13

References-

Planar Graphs – Wikipedia Graph Coloring – Wikipedia Discrete Mathematics and its Applications, by Kenneth H Rosen


Last Updated : 26 Feb, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads