Ayush Singh has Published 179 Articles

Maximize the Number of Uncolored Vertices Appearing Along the Path from Root Vertex and the Colored Vertices

Ayush Singh

Ayush Singh

Updated on 14-Jul-2023 09:53:10

39 Views

Go through the entire graph and compute the difference between the depth of each vertex and the number of vertices in its subtree to maximise the number of uncolored vertices that occur along the path from the root vertex to the coloured vertex. Find the uncolored vertex that has the ... Read More

Maximum Clique Problem|Recursive Solution

Ayush Singh

Ayush Singh

Updated on 14-Jul-2023 09:51:03

255 Views

Finding the biggest complete subgraph, or clique, in a given graph is the goal of the famous Maximal Clique Problem in graph theory. Each vertex in a clique is connected to every other vertex in the clique by a direct edge. The technique iteratively adds vertices connecting to all vertices ... Read More

Implementation of BFS using Adjacency Matrix

Ayush Singh

Ayush Singh

Updated on 14-Jul-2023 09:49:09

3K+ Views

A simple graph traversal algorithm called Breadth−First Search (BFS) is employed to examine a graph step by step. Before going to an additional stage of vertices, it begins with a certain vertex (source) and checks all of its neighbours in an ordered way. In this blog post, we'll ... Read More

Find the Minimum Spanning Tree with Alternating Colored Edges

Ayush Singh

Ayush Singh

Updated on 14-Jul-2023 09:46:55

57 Views

The code executes a calculation to discover the least crossing tree by substituting coloured edges. It employs an energetic programming approach to calculate the least expensive toll. The calculation considers all conceivable edges and colours and recursively assesses the cost of counting or barring each edge based on whether it ... Read More

Find if a Degree Sequence can form a Simple Graph | Havel-Hakimi Algorithm

Ayush Singh

Ayush Singh

Updated on 14-Jul-2023 09:44:59

225 Views

A degree chain in graph theory indicates the order of vertices' degrees. It is crucial to ascertain whether a degree order can result in a simple graph, or a graph without parallel or self−looping edges. We will examine three approaches to resolving this issue in this blog, concentrating on the ... Read More

Find Count of Pair of Nodes at Even Distance

Ayush Singh

Ayush Singh

Updated on 14-Jul-2023 09:42:56

41 Views

To discover the tally of sets of hubs at an indeed remove in a chart, we will utilise the chart traversal calculation. Beginning from each hub, we perform a traversal, such as a breadth−first look (BFS) or a depth−first look (DFS), and keep track of the separations of all hubs ... Read More

Find All Cliques of Size K in an Undirected Graph

Ayush Singh

Ayush Singh

Updated on 14-Jul-2023 09:40:57

200 Views

Finding all cliques of a certain size in an undirected graph is a fundamental graph theory issue that has many applications in social network research, biology, and data mining. A clique is a graph subset with all vertices linked.Recursive backtracking considers each vertex a potential candidate and updates the candidate ... Read More

D’Esopo-Pape Algorithm : Single Source Shortest Path

Ayush Singh

Ayush Singh

Updated on 14-Jul-2023 09:39:27

131 Views

The D'Esopo−Pape technique works with a single source vertex as a starting point to find the shortest path between that vertex and all other vertices in a directed graph. This method outperforms the conventional Bellman−Ford approach for charts with negative edge weights. During execution, this technique swiftly chooses the vertices ... Read More

Count ways to Change Direction of Edges such that Graph Becomes Acyclic

Ayush Singh

Ayush Singh

Updated on 14-Jul-2023 09:36:39

71 Views

The goal of the "Count ways to change direction of edges such that graph becomes acyclic" issue is to count the number of configurations where the edges of a graph may be changed so that the graph becomes acyclic. No cycles or loops exist in an acyclic network.A set of ... Read More

Convert Directed Graph into a Tree

Ayush Singh

Ayush Singh

Updated on 14-Jul-2023 09:29:08

1K+ Views

Strong data structures that depict connections among entities are directed graphs. To facilitate analysis or boost algorithmic effectiveness, it could be beneficial to transform a directed graph into a tree structure in some circumstances. In this post, we'll look at two CPP algorithmic approaches for turning a directed graph into ... Read More

Advertisements