## Find two disjoint good sets of vertices in a given graph

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 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… 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 »

A Bipartite Graph is a graph whose vertices can be divided into two independent sets, U and V such that every edge (u, v) either… Read More »

Given an undirected graph and a number m, determine if the graph can be colored with at most m colors such that no two adjacent… Read More »