0% found this document useful (0 votes)
17 views

Unit Iv

Uploaded by

sselvaruba
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Unit Iv

Uploaded by

sselvaruba
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

UNIT IV

MULTIWAY SEARCH TREES AND GRAPHS

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 biconnected graph.
A connected undirected graph is biconnected if there are no vertices whose removal
disconnects the rest of the graph.
3. Define shortest path problem?
For a given graph G=(V, E), with weights assigned to the edges of G, we have to find the
shortest path (path length is defined as sum of the weights of the edges) from any given source
vertex to all the remaining vertices of G.
4. Define adjacent nodes?
Any two nodes which are connected by an edge in a graph are called adjacent nodes. For E is
associated with a pair of nodes∈ example, if and edge x (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 a directed 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 than such
a graph is called a simple graph.
9. What is a weighted graph?
A graph in which weights are assigned to every edge is called a weighted graph.
10. 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.
11. 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.
12. Define path in a graph?
The path in a graph is the route taken to reach terminal node from a starting node.
13. What is a simple path?
A path in a diagram in which the edges are distinct is called a simple path. It is also called as
edge simple.
14. What is a cycle or a circuit?
A path which originates and ends in the same node is called a cycle or circuit.
15. What is an acyclic graph?
A simple diagram which does not have any cycles is called an acyclic graph.
16. 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.
17. When is 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.
18. Name the different ways of representing a graph?
a. Adjacency matrix
b. Adjacency list
c. Adjacency Multilist
19. 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.
20. What are the two traversal strategies used in traversing a graph?
a. Breadth first search
b. Depth first search
21. What is a minimum spanning tree?
A minimum spanning tree of an undirected graph G is a tree formed from graph edges that
connects all the vertices of G at the lowest total cost.
22. Define topological sort?
A topological sort is an ordering of vertices in a directed acyclic graph, such that if there is a
path from vi to vj appears after vi in the ordering.
23. What is the use of Kruskal’s algorithm and who discovered it?
Kruskal’s algorithm is one of the greedy techniques to solve the minimum spanning tree
problem. It was discovered by Joseph Kruskal.
24. What is the use of Dijksra’s algorithm?
Dijkstra’s algorithm is used to solve the single-source shortest-paths problem: for a given vertex
called the source in a weighted connected graph, find the shortest path to all its other vertices.
The single-source shortest-paths problem asks for a family of paths, each leading from the
source to a different vertex in the graph, though some paths may have edges in common.
25. Prove that the maximum number of edges that a graph with n Vertices is n*(n-1)/2.
Choose a vertex and draw edges from this vertex to the remaining n-1 vertices. Then, from
these n-1 vertices, choose a vertex and draw edges to the rest of the n-2 Vertices. Continue this
process till it ends with a single Vertex. Hence, the total number of edges added in graph is
(n-1)+(n-2)+(n-3)+…+1 =n*(n-1)/2.
26. Define minimum cost spanning tree?
A spanning tree of a connected graph G, is a tree consisting of edges and all the vertices of G.
In minimum spanning tree T, for a given graph G, the total weights of the edges of the spanning
tree must be minimum compared to all other spanning trees generated from G. -Prim’s and
Kruskal is the algorithm for finding Minimum Cost Spanning Tree.
27. Define Adjacency in graph.
Two node or vertices are adjacent if they are connected to each other through an edge. In the
following example, B is adjacent to A, C is adjacent to B, and so on.
28. Define Basic Operations of Graph.
Following are basic primary operations of a Graph
● Add Vertex − Adds a vertex to the graph.
● Add Edge − Adds an edge between the two vertices of the graph.
● Display Vertex − Displays a vertex of the graph.
29. What is Levels in graph?
Level of a node represents the generation of a node. If the root node is at level 0, then its next
child node is at level 1, its grandchild is at level 2, and so on.
30. What is visiting and traversing in graph.
● Visiting refers to checking the value of a node when control is on the node.
● Traversing means passing through nodes in a specific order.

You might also like