Given an undirected graph, we can determine if the graph can be colored with at most m(Chromatic number) colors such that no two adjacent vertices of the graph are colored with same color aka M-coloring problem. Here coloring of a graph means assignment of colors to all vertices. Let's take a look at the following picture:-
Here every colored vertex represents a users in a social network & edges represent virtual friendship.
As you can see there's no direct edge between 'a' and 'd' but they have a common friend 'c'. Now running the code
we get a colored graph thus we can simply recommend same colored vertex to pop up in their recommendation sections.
<p>Main Screen</p>
Screen 2
Screen 3
Screen 4
Outputs