Graph Algorithms questions

Q11

GATE CS 2016 CS-1Graph AlgorithmsNAT1 mark
Consider the following directed graph:

The number of different topological orderings of the vertices of the graph is ________.
Question figure
Show answer without attempting

Answer: 6.0

Q14

GATE CS 2016 CS-1Graph AlgorithmsMCQ1 mark−1/3 if wrong
Let GG be a weighted connected undirected graph with distinct positive edge weights. If every edge weight is increased by the same value, then which of the following statements is/are TRUE?

P: Minimum spanning tree of GG does not change
Q: Shortest path between any pair of vertices does not change
Show answer without attempting

Answer: A

Q38

GATE CS 2016 CS-1Graph AlgorithmsNAT2 marks
Consider the weighted undirected graph with 4 vertices, where the weight of edge {i, j} is given by the entry WijW_{ij} in the matrix WW.

W=[02852058850x58x0]W = \begin{bmatrix} 0 & 2 & 8 & 5 \\ 2 & 0 & 5 & 8 \\ 8 & 5 & 0 & x \\ 5 & 8 & x & 0 \end{bmatrix}

The largest possible integer value of x, for which at least one shortest path between some pair of vertices will contain the edge with weight x is ________.
Show answer without attempting

Answer: 12.0

Q39

GATE CS 2016 CS-1Graph AlgorithmsNAT2 marks
Let G be a complete undirected graph on 4 vertices, having 6 edges with weights being 1, 2, 3, 4, 5, and 6. The maximum possible weight that a minimum weight spanning tree of G can have is ________.
Show answer without attempting

Answer: 7.0

Q40

GATE CS 2016 CS-1Graph AlgorithmsMCQ2 marks−2/3 if wrong
G = (V,E) is an undirected simple graph in which each edge has a distinct weight, and e is a particular edge of G. Which of the following statements about the minimum spanning trees (MSTs) of G is/are TRUE?

I. If e is the lightest edge of some cycle in G, then every MST of G includes e
II. If e is the heaviest edge of some cycle in G, then every MST of G excludes e
Show answer without attempting

Answer: B

Q14

GATE CS 2016 CS-2Graph AlgorithmsMCQ1 mark−1/3 if wrong
The Floyd-Warshall algorithm for all-pair shortest paths computation is based on
Show answer without attempting

Answer: C

Q41

GATE CS 2016 CS-2Graph AlgorithmsMCQ2 marks−2/3 if wrong
In an adjacency list representation of an undirected simple graph G=(V,E)G = (V,E), each edge (u,v)(u, v) has two adjacency list entries: [v][v] in the adjacency list of uu, and [u][u] in the adjacency list of vv. These are called twins of each other. A twin pointer is a pointer from an adjacency list entry to its twin. If ∣E∣=m|E| = m and ∣V∣=n|V| = n, and the memory size is not a constraint, what is the time complexity of the most efficient algorithm to set the twin pointer in each entry in each adjacency list?
Show answer without attempting

Answer: B

0/70 correct0 marks

Related topics in Algorithms