# GRAPH

## Edge Classifications | Graph

Edge Types With DFS traversal of Graph, only some edges will be traversed. These edges will form a tree, called the depth-first-search tree starting at the given root, and the edges in this tree are called tree edges. We can classify the various edges of the graph based on the [...]

2020-03-28T14:18:59+05:30Categories: Data Structure|Tags: |

The analysis of the non-recursive version of Depth First Search is identical to Breadth First Search. We first consider a rough analysis of the algorithm in order to develop some intuition. We then build on this analysis to provide a more accurate estimate. Here is the pseudocode for the algorithm along with [...]

2019-02-21T23:47:39+05:30Categories: Data Structure|Tags: |

## Dijkstra Vs Prim Algorithm | Graph

Prim Algorithm Prim’s algorithm constructs a minimum spanning tree for the graph, which is a tree that connects all nodes in the graph and has the least total cost among all trees that connect all the nodes. However, the length of a path between any two nodes in the MST [...]

2020-03-28T14:34:56+05:30Categories: Data Structure|Tags: |

## Detect Cycle | Graph

Introduction Graphs are of two kinds on the basis of the way edges are directed. In Undirected graph all the edges go forward as well as backward between two vertices. In Directed graph edges between two vertices are directional. Algorithm For Detecting Cycle To detect cycles using DFS, use two [...]

2020-03-28T15:04:20+05:30Categories: Data Structure|Tags: |

## Hamiltonian path

A Hamiltonian path (or traceable path) is a path in an undirected or directed graph that visits each vertex exactly once. A graph that contains a Hamiltonian path is called a traceable graph. A graph is Hamiltonian-connected if for every pair of vertices there is a Hamiltonian path between the [...]

2017-11-03T23:02:03+05:30Categories: Data Structure|Tags: |

## Graph Traversals

Graph can be traversed using  Depth First Traversal or DFS Breadth First Traversal or BFS Depth First Traversal or DFS for a Graph The DFS algorithm is a recursive algorithm that uses the idea of backtracking. It involves exhaustive searches of all the nodes by going ahead, if possible, else [...]

2017-08-05T12:29:18+05:30Categories: Data Structure|Tags: |

## Graph Representations | Data Structure

Introduction A graph is a pictorial representation of a set of objects where some pairs of objects are connected by links. The interconnected objects are represented by points termed as Vertices, and the links that connect the vertices are called Edges. It consists of following two components: A finite set of [...]

2020-03-04T23:13:03+05:30Categories: Data Structure|Tags: |
Go to Top