Sunday, November 16, 2014

Unit 5 - Data Structures


1.Define Graph? 

A graph G consist of a nonempty set V which is a set of nodes of the graph, a 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).

2. Define adjacent nodes? 
Any two nodes which are connected by an edge in a graph are called adjacent nodes. For example, if and edge xÎE is associated with a pair of nodes (u,v) where u, v . V, then we say that the edge x connects the nodes u and v.

3. What is a directed graph? 
A graph in which every edge is directed is called a directed graph.

4. What is a undirected graph? 
A graph in which every edge is undirected is called a directed graph.

5. What is a loop? 
An edge of a graph which connects to itself is called a loop or sling.


6.What is a simple graph? 

A simple graph is a graph, which has not more than one edge between a pair of nodes than such a graph is called a simple graph.

7. What is a weighted graph? 
A graph in which weights are assigned to every edge is called a weighted graph.

8. Define out degree of a graph?
In a directed graph, for any node v, the number of edges which have v as their initial node is called the out degree of the node v.

9. Define indegree of a graph? 
In a directed graph, for any node v, the number of edges which have v as their terminal node is called the indegree of the node v.

10. Define path in a graph? 
The path in a graph is the route taken to reach terminal node from a starting node. 

No comments:

Post a Comment