123 Graph Traversals Please wait while the activity loads. If this activity does not load, try refreshing your browser. Also, this page requires javascript. Ple
123 Graph Minimum Spanning Tree Please wait while the activity loads. If this activity does not load, try refreshing your browser. Also, this page requires java
123 Graph Shortest Paths Please wait while the activity loads. If this activity does not load, try refreshing your browser. Also, this page requires javascript.
Given an adjacency matrix representation of an undirected graph. Find if there is any Eulerian Path in the graph. If there is no path print “No Solution”. I
In Set 1, unweighted graph is discussed. In this post, weighted graph representation using STL is discussed. The implementation is for adjacency list representa
You are given input as order of graph n (highest number of edges connected to a node), you have to find the number of vertices in a Hypercube graph of order n.
Given a directed Eulerian graph, print an Euler circuit. Euler circuit is a path that traverses every edge of a graph, and the path ends on the starting vertex.
You are given input as order of graph n (highest number of edges connected to a node), you have to find the number of vertices in a Fibonacci cube graph of orde
Transpose of a directed graph G is another directed graph on the same set of vertices with all of the edges reversed compared to the orientation of the correspo
In graph theory, a clustering coefficient is a measure of the degree to which nodes in a graph tend to cluster together. Evidence suggests that in most real-wor
Problem 1 – There are 25 telephones in Geeksland. Is it possible to connect them with wires so that each telephone is connected with exactly 7 others. Solutio
Given a directed and connected graph with n nodes. If there is an edge from u to v then u depends on v. Our task was to find out the sum of dependencies for eve
The following graph G is called a Petersen graph and its vertices have been numbered from 0 to 9. Some letters have also been assigned to vertices of G, as can
A directed acyclic graph (DAG) is a graph which doesn’t contain a cycle and has directed edges. We are given a DAG, we need to clone it, i.e., create another
Given a unweighted graph, a source and a destination, we need to find shortest path from source to destination in the graph in most optimal way. unweighted grap
Given a Weighted Directed Acyclic Graph (DAG) and a source vertex s in it, find the longest distances from s to all other vertices in the given graph. The longe
We introduced graph coloring and applications in previous post. As discussed in the previous post, graph coloring is widely used. Unfortunately, there is no eff
As Banker’s algorithm using some kind of table like allocation, request, available all that thing to understand what is the state of the system. Similarly, if
A graph is a data structure that is defined by two components : A node or a vertex. An edge E or ordered pair is a connection between two nodes u,v that is iden
Prerequisite – Graph Theory Basics – Set 1 A graph is a structure amounting to a set of objects in which some pairs of the objects are in some sense “rela
Prerequisite: Graph Theory Basics – Set 1, Graph Theory Basics – Set 2 A graph G = (V, E) consists of a set of vertices V = { V1, V2, . . . } and set of edg
Prerequisite – Graph Theory Basics Consider an electronic circuit having several nodes with connections between them. Is it possible to print that circuit on
Isomorphism : Consider the following two graphs – Are the graphs and the same? If your answer is no,then you need to rethink. The graphical arrangement of the
Prerequisite – Graph Theory Basics Given an undirected graph, a matching is a set of edges, such that no two edges share the same vertex. In other words, matc
A Graph is a non-linear data structure consisting of nodes and edges. The nodes are sometimes also referred to as vertices and the edges are lines or arcs that