Tag Archives: Graph Coloring

Given an Undirected Graph consisting of N vertices and M edges, where node values are in the range [1, N], and vertices specified by the… Read More
Given a graph G with V nodes and E edges, the task is to colour no more than floor(V/2) nodes such that every node has… Read More
Given an undirected graph of N nodes labelled from 1 to N, the task is to find the minimum labelled node that should be removed… Read More
In graph theory, vertex colouring is a way of labelling each individual vertex such that no two adjacent vertex have same colour. But we need… Read More
Given an undirected unweighted graph with N vertices and M edges. The task is to find two disjoint good sets of vertices. A set X… Read More
Given a tree with N nodes which initially have no color and an array color[] of size N which represent the color of each node… Read More
In graph theory, edge coloring of a graph is an assignment of “colors” to the edges of the graph so that no two adjacent edges… Read More
Cycle:- cycle is a path of edges and vertices wherein a vertex is reachable from itself. or in other words, it is a Closed walk.… Read More
Given an undirected and unweighted graph. The task is to find the product of the lengths of all cycles formed in it. Example 1: The… Read More
In graph theory, Vizing’s theorem states that every simple undirected graph may be edge colored using a number of colors that is at most one… Read More
Given an undirected graph, print all the vertices that form cycles in it. Pre-requisite: Detect Cycle in a directed graph using colors   In the above diagram,… Read More
Prerequisite – Graph Theory Basics Consider an electronic circuit having several nodes with connections between them. Is it possible to print that circuit on a… Read More
Given a directed graph, check whether the graph contains a cycle or not. Your function should return true if the given graph contains at least… Read More
We introduced graph coloring and applications in previous post. As discussed in the previous post, graph coloring is widely used. Unfortunately, there is no efficient… Read More
Graph coloring problem is to assign colors to certain elements of a graph subject to certain constraints.  Vertex coloring is the most common graph coloring… Read More