**Non-Linear Data Structure**

**What do you mean by a Graph in non-linear data structure?***A graph G which consist of a nonempty set V which is a set of nodes and set E which is the set of edges of the graph, and a mapping from the set for edge E to a set of pairs of elements of V. It can also be represented as G=(V, E).*

**What do you mean by adjacent nodes in non-linear data structure?***Any two nodes which are connected by an edge in a graph are called adjacent nodes. For Example, if an edge (x) is connected with a pair of nodes (u,v) then we say that the edge x connects the nodes u and v.*

**Name the different ways of representing a graph in non-linear data structure?***1. Adjacency matrix represention*

*2. Adjacency list represention*

**What are the two traversal methods used in traversing a graph in non-linear data structure?***1. Breadth first search*

*2. Depth first search*

**What do you mean by an acyclic graph in non-linear data structure?***A simple diagram which does not have any cycles is called an acyclic graph in non-linear data structure.*

**What do you mean by topological sort?***A topological sort is an ordering of vertices in a directed acyclic graph,such that if there is a path from vi then vj appears after vi in the ordering.*

**What do you mean by single source shortest path problem in non-linear data structure?***If input a weighted graph, G=(V,E) and a distinguished vertex,'s' find the shortest weighted path from 's' to every other vertex in G.*

**Thanks**

**Mukesh Rajput**
## No comments:

## Post a Comment

Thanks

Mukesh Rajput