You are on page 1of 6

The pair of vertices in the graph are called as Edges

Edges of a directed graph are drawn with an arrow from the Tail to Head

In which of the following path all the vertices except first and last are distinct Simple Path

Which of the following are the most commonly used matrix representation of Graph? Adjacency
Matrix

Which of the following is a 2-dimensional array of size n X n where n is the number of vertices
in the graph? Adjacency Matrix

adjacency matrix of undirected graph is __symmetric matrx___

network data model is best represented using__graph

For which of the following the Adjacency Matrix is Symmetric Undirected Graph
The space needed to represent a graph using its adjacency matrix is ____N2_______ locations
where N is the number of vertices in the graph.

In undirected graph any edge is represented by the pair Ans: (V1, V2)

In directed graph any edge is represented by the pair Ans: <V1, V2>

The path in which first and last vertices are same is called Cyclic Path

The path between two vertices is represented by Edges

The adjacency lists representation of an undirected graph, each edge (Vi, Vj) is represented by
___2____ entries

Graph can be represented using which of the following methods?


Ans: adjacency list, Adjacency Matrix , orthogonal representation all of these

Select the correct alternative for the following : I. A directed graph is


acyclic if it has no cycles. II. A graph is said to be connected if there exist a path between
any two vertices
Ans:TRUE, TRUE

The adjacency matrix which is used to represent a Graph is called as _____


Bit Matrix or Boolean Matrix

In a graph, represented with adjacency matrix the digonal elements are non zero for
graph having loops

The number of non zero entries in an adjacency matrix are equal to number of edges

Degree of any vertex of graph is----no of edges incident with vertex


graph G is called a Tree_____ if it is acyclic connected graph

A single vertex in graph G is a sub graph of G.Ans: True

A graph in which all nodes are of equal degrees is known as: ANs: regular graph

A complete graph of n vertices should have _n*(n-1)/2 _____ edges

A complete directed graph of n vertices should have n*(n-1) ______ edges

__adjacency matrix ____ representation of graph is good for dense graph

__adjacency list ____ representation of graph is good for sparse graph

A connected graph has_1__ components

A multigraph has__multiple occurences of the same edge

Select the correct sentence


Every tree is a graph -True
connected graph without cycle is a tree-True

Tree having a main node which has no predecessor is_rooted tree

The minimum number of edges in a connected cyclic graph on ‘n’ vertices is…....

If G is an directed graph with 20 vertices, how many boolean values will be needed to represent
G using an adjacency matrix? Ans: 400

Which of the following edges represent the same path if a1 and a2 are the two vertices of an
undirected graph ? Ans: (a1, a2) and (a2, a1)

which are ways of representing graphs: adjacency matrix, adjacancy multilist

Which of the following condition is sufficient to detect cycle in a directed graph?

Applications of graph are - - -


game playing
circuit planning
GIS

Given adjacency matrix representation of digraph, the degree of a vertex V is_____


non -zero entries in row V
non-zero entries in column V
Ans: both a and b
In adjacency list how many lists are used to represent one vertex in a graph? Ans : 1

The n rows of the adjacency matrix are represented as __n_ linked list.

What will be produced by Depth First Traversal for an undirected graph which is not connected?
Forest

DFS traversal of tree is similar to _preorder__________

dfs traversal and BFS traversal of tree can be used for___________-


Finding whether graph is connected
finding no of components
Ans: both

Select the correct option for the following I. Depth first search visits the starting
vertext twice. II. Breadth first search visits each node just one time Ans: FALSE, TRUE

Traversal of a graph is different from tree because There can be a loop in graph so we must
maintain a visited flag for every vertex

What will be produced by Depth First Traversal for a connected undirected graph Ans:Spanning
Tree

What will be produced by Depth First Traversal for a connected directed graph Ans: Forest

Which of the following data structure is used for breadth first traversal of graph queue

Which of the following data structure is used for depth first traversal of graph stack

Breadth first search is method of ----all successors of visited node before any successors of any
of those successors

The most appropriate matching for the following pairs

A. BFS 1. Heap

B. DFS 2. Queue

C. Complete binary tree 3. Stack

Ans: A-2 B-3 C-1

The time complexity of DFS algorithm which when implemented using adjacency matrix is -----
O ( |V|2 )

The time complexity of DFS algorithm which when implemented using adjacency list is -----
O ( |V| + | E | )
The time complexity of BFS algorithm which when implemented using adjacency matrix is -----
O ( |V|2 )

The time complexity of BFS algorithm which when implemented using adjacency list is -----
O ( |V| + | E | )

In the Depth First traversal we process all of a vertex’s descendents before we move to an
adjacent vertex

Pick the correct statement(s) from the following set of statements.


I. In the Kruskal’s algorithm, for the construction of minimal spanning tree for a graph,
the selected edges always form a forest.
II. In Prim’s algorithm, for the construction of minimal spanning tree for a graph, the
selected edges always form an orchard.
III. DFS, BFS algorithms always make use of a queue, and stack respectively.
Ans: Only (I) above

The spanning tree resulting from a call to depth first tree is called: Ans: depth first spanning tree

The spanning tree resulting from a call to breadth first tree is called breadth first spanning tree

The cost of spanning tree is sum of costs of the edges in tree

The minimum cost of a spanning tree is given by sum of costs of the edges that are inserted
while building the spanning tree of minimum cost

Which of the following is not a part of node structure of an adjacency multilist for a digraph?
previous link to edge

Kruscal's algorithm gives minimum cost spanning tree

Which of the following algorithm gives the shortest path between two nodes Ans: Dijkstra's
algorithm

What algorithm technique is used in the implementation of Kruskal solution for the MST?
Ans: greedy technique

which of the following algorithm forms forest while creating minimum spanning tree for graph
Ans: Kruskal's

heap data structure is used in __Kruskal's____ algorithm

If graph is dense graph then which algorithm will work better for finding minimum cost
spanning tree? Ans: Prim's
If graph is sparce graph then which algorithm will work better for finding minimum cost
spanning tree? Ans: Kruskal's

Graph can have more than one number of spanning trees True

Graph can have more than one number of minimum spanning trees: True

Which of the following algorithm proceeds edge by edge Kruskal's

what technique can be used to create spanning tree


Ans: DFS and BFS

if e are no of edges in graph and n are no of vertices then Kruskal's algorithm is having time
complexity __O(e log n)_____

Dijkstra's algorithm uses following technique greedy technique

Topological sorting is important in___project scheduling

____

In the minimal-spanning tree technique, if two or more nodes are equally near, this suggests that
there may be multiple solutions.

Time complexity of Prims algorithm is___O(n2)

While calculating the shortest path between two nodes in the adjacency matrix the path that does
not exist between two nodes is taken as infinity

Insertion of any edge to a spanning tree form a unique cycle because for any pair of vertices
there exists only one paths between them

Which of the following paths contains all vertices in the graph? hamilton path

Warshalls algorithm is used for finding ____


path matrix
transitive closure
Ans; both

Complexity of warshall's algorithm is O(n3)

____

You might also like