UNIT IV
PART A
1. Write the definition of weighted graph?
A graph in which weights are assigned to every edge is called a weighted graph.
2. 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 of edges E to set of pairs
of elements of V. It can also be represented as G=(V, E).
3. Define adjacency matrix?
The adjacency matrix is an n x n matrix A whose elements aij are given
by Aij =1 if(vi,vj)exists, otherwise 0
4. Define adjacent nodes?
Any two nodes, which are connected by an edge in a graph, are called adjacent
nodes. For example, if an 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.
5. What is a directed graph?
A graph in which every edge is directed is called a directed graph.
6. What is an undirected graph?
A graph in which every edge is undirected is called an undirected graph.
7. What is a loop?
An edge of a graph, which connects to itself, is called a loop or sling.
8. What is a simple graph?
A simple graph is a graph, which has not more than one edge between a pair of nodes.
9. What is a weighted graph?
A graph in which weights are assigned to every edge is called a weighted graph.
10. Define indegree and 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.
Outdegree: Number of edges having the node v as root node is the outdegree of the node v.
11. Define path in a graph?
The path in a graph is the route taken to reach terminal node from a starting node.
12. What is a simple path?
i. A path in a diagram in which the edges are distinct is called a simple
path. ii. It is also called as edge simple.
13. What is a cycle or a circuit?
A path which originates and ends in the same node is called a cycle or circuit.
14. What is an acyclic graph?
A simple diagram, which does not have any cycles, is called an acyclic graph.
15. What is meant by strongly connected in a graph?
An undirected graph is connected, if there is a path from every vertex to every other
vertex. A directed graph with this property is called strongly connected.
16. When a graph said to be weakly connected?
When a directed graph is not strongly connected but the underlying graph is connected, then
the graph is said to be weakly connected.
17. Name the different ways of representing a graph? Give examples (Nov 10)
a. Adjacency
matrix b.
Adjacency list
18. What is an undirected acyclic graph?
When every edge in an acyclic graph is undirected, it is called an undirected acyclic
graph. It is also called as undirected forest.
19. What is meant by depth?
The depth of a list is the maximum level attributed to any element with in the list or
with in any sub list in the list.
20. What is the use of BFS?
BFS can be used to find the shortest distance between some starting node and the
remaining nodes of the graph. The shortest distance is the minimum number of edges
traversed in order to travel from the start node the specific node being examined.
21. What is topological sort?
It is an ordering of the vertices in a directed acyclic graph, such that: If there is a path
from u to v, then v appears after u in the ordering.
22. Write BFS algorithm
1. Initialize the first node’s dist number and place in queue
2. Repeat until all nodes have been examined
3. Remove current node to be examined from queue
4. Find all unlabeled nodes adjacent to current node
5. If this is an unvisited node label it and add it to the queue
6. Finished.
23. Define biconnected graph?
A graph is called biconnected if there is no single node whose removal causes the graph
to break into two or more pieces. A node whose removal causes the graph to become
disconnected is called a cut vertex.
24. What are the two traversal strategies used in traversing a graph?
a. Breadth first search
b. Depth first search
25. Articulation Points (or Cut Vertices) in a Graph
A vertex in an undirected connected graph is an articulation point (or cut vertex) if
removing it (and edges through it) disconnects the graph. Articulation points
represent vulnerabilities in a connected network – single points whose failure would split
the network into 2 or more disconnected components. They are useful for designing reliable
networks.
For a disconnected undirected graph, an articulation point is a vertex removing which
increases number of connected components.
Following are some example graphs with articulation points encircled with red
color.
16 MARKS
1. Explain the various representation of graph with example in detail?
2. Explain Breadth First Search algorithm with example?
3. Explain Depth first and breadth first traversal?
4. What is topological sort? Write an algorithm to perform topological sort?(8) (Nov 09)
5. (i) write an algorithm to determine the biconnected components in the given
graph. (10) (may 10)
(i) determine the biconnected components in a graph. (6)
6. Explain the various applications of Graphs.