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

Data Structures With Python (19EID237) SET-2

The document contains a 10 question quiz about data structures and algorithms topics like graphs, trees, and union find. The questions test concepts like in-degree and out-degree of vertices in digraphs, edge relaxation in single source shortest path problems, minimum spanning trees, running time of operations like union and find in union find, and algorithms like Floyd-Warshall for computing transitive closure. Response options with one of the answers are provided for each multiple choice question.

Uploaded by

Durga K
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

Data Structures With Python (19EID237) SET-2

The document contains a 10 question quiz about data structures and algorithms topics like graphs, trees, and union find. The questions test concepts like in-degree and out-degree of vertices in digraphs, edge relaxation in single source shortest path problems, minimum spanning trees, running time of operations like union and find in union find, and algorithms like Floyd-Warshall for computing transitive closure. Response options with one of the answers are provided for each multiple choice question.

Uploaded by

Durga K
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

12/24/2020 Data Structures with Python (19EID237) SET-2

Data Structures with Python (19EID237)


SET-2
Your email address ([email protected]) will be recorded when you submit this form.
Not you? Switch account

* Required

Section - A

10 Questions. Each question carries 1 marks

What is the in-degree and out-degree of vertex 4 in the given digraph?


[image:q5_14.png] *

2,2

1,2

3,3

3,2

https://docs.google.com/forms/d/e/1FAIpQLSfctQGBSy7yJMJ3eR1PLDAQ8-Hz7mwalax6CfUH2ODmwqL5vg/formResponse 1/5
12/24/2020 Data Structures with Python (19EID237) SET-2

In single source shortest path problem, edge relaxation [edge (u, v) where v is
adjacent to u] operation is given as follows. *

if D[u]+W (u, v) < D[v] then D[v]=D[u]+w (u, v)

if D[v]+W (u, v) < D[u] then D[v]=D[u]+w (u, v)

if D[u]+W (u, v) > D[v] then D[v]=D[u]+w (u, v)

if D[v]+W (u, v) > D[u] then D[v]=D[u]+w (u, v)

Consider a complete undirected graph with vertex set {0, 1, 2, 3, 4}. Entry Wij in
the matrix W below is the weight of the edge {i, j}. What is the minimum possible
weight of a spanning tree T in this graph such that vertex 0 is a leaf node in the
tree T?[image:q5_15.png] *

10

https://docs.google.com/forms/d/e/1FAIpQLSfctQGBSy7yJMJ3eR1PLDAQ8-Hz7mwalax6CfUH2ODmwqL5vg/formResponse 2/5
12/24/2020 Data Structures with Python (19EID237) SET-2

Path Compression is used to speed up the run time of which operation in the
union-find data structure. *

Union

Find

Path Compression is not related to union-find

Delete

An undirected or mixed graph can be converted into a directed graph by


replacing every undirected edge (u,v) by the pair of directed edges (u,v) and
(v,u). *

TRUE

FALSE

The first vertex in topological sorting is always a vertex with in-degree as


0(vertex with no incoming edges) *

TRUE

False

https://docs.google.com/forms/d/e/1FAIpQLSfctQGBSy7yJMJ3eR1PLDAQ8-Hz7mwalax6CfUH2ODmwqL5vg/formResponse 3/5
12/24/2020 Data Structures with Python (19EID237) SET-2

What is the running time of the insert_vertex(x) method of the graph ADT, if the
graph is represented with adjacency matrix *

O(1)

O(n^2)

O(n)

None of the mentioned

When implemented using the union by-size and path-compression heuristics, is


that performing a series of k operations involving n elements takes _____time. *

O (k log n)

O (k)

O(logn)

O (k2 logn)

Which of the following data structure is used for representing the graph *

edge list

adjacency list

adjacency map

adjacency matrix

All of the mentioned

https://docs.google.com/forms/d/e/1FAIpQLSfctQGBSy7yJMJ3eR1PLDAQ8-Hz7mwalax6CfUH2ODmwqL5vg/formResponse 4/5
12/24/2020 Data Structures with Python (19EID237) SET-2

Which of the following algorithm is used to compute transitive closure of the


graph *

Kruskal’s algorithm

Floyd Warshall Algorithm

Dijkstra’s Algorithm

Prim’s Algorithm

Page 2 of 4

Back Next

Never submit passwords through Google Forms.

This form was created inside of GITAM (Deemed to be University). Report Abuse

 Forms

https://docs.google.com/forms/d/e/1FAIpQLSfctQGBSy7yJMJ3eR1PLDAQ8-Hz7mwalax6CfUH2ODmwqL5vg/formResponse 5/5

You might also like