Graphs GATE CS PYQ Quiz

Last Updated :
Discuss
Comments

Question 1

Consider the following directed graph. GATECS20167 The number of different topological orderings of the vertices of the graph is   Note : This question was asked as Numerical Answer Type.

  • 1

  • 2

  • 4

  • 6

Question 2

Consider the weighted undirected graph with 4 vertices, where the weight of edge {i, j} g is given by the entry
Wij in the matrix W


gt164


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 ________


 
Note : This question was asked as Numerical Answer Type.

  • 8

  • 12

  • 10

  • 11

Question 3

If G is a forest with n vertices and k connected components, how many edges does G have?

  • floor(n/k)

  • ceil(n/k)

  • n-k

  • n-k+1

Question 4

Let G be a connected undirected weighted graph. Consider the following two statements.

  • S1: There exists a minimum weight edge in G which is present in every minimum spanning tree of G.
  • S2: If every edge in G has distinct weight, then G has a unique minimum spanning tree.

Which one of the following options is correct?

  • Both S1 and S2 are true

  • S1 is true and S2 is false

  • S1 is false and S2 is true

  • Both S1 and S2 are false

Question 5

Consider the directed graph given below. Which one of the following is TRUE? GATECS2014Q22

  • The graph doesn't have any topological ordering

  • Both PQRS and SRPQ are topological ordering

  • Both PSRQ and SPRQ are topological ordering

  • PSRQ is the only topological ordering

Question 6

Consider a simple undirected weighted graph G, all of whose edge weights are distinct. Which of the following statements about the minimum spanning trees of G is/are TRUE? 

  • The edge with the second smallest weight is always part of any minimum spanning tree of G .

  • One or both of the edges with the third smallest and the fourth smallest weights are part of any minimum spanning tree of G .

  • Suppose S C V be such that S β‰ βˆ… and S β‰  V . Consider the edge with the minimum weight such that one of its vertices is in S and the other in V \ S . Such an edge will always be part of any minimum spanning tree of G

  • G can have multiple minimum spanning trees

Question 7

Consider a simple undirected graph of 10 vertices. If the graph is disconnected, then the maximum number of edges it can have is ____________. 

  • 24

  • 48

  • 36

  • 64

Question 8

Let 𝐺(𝑉, 𝐸) be an undirected and unweighted graph with 100 vertices. Let 𝑑(𝑒, 𝑣) denote the number of edges in a shortest path between vertices 𝑒 and 𝑣 in 𝑉. Let the maximum value of 𝑑(𝑒, 𝑣), 𝑒, 𝑣 ∈ 𝑉 such that 𝑒 β‰  𝑣, be 30. Let 𝑇 be any breadthfirst-search tree of 𝐺. Which ONE of the given options is CORRECT for every such graph 𝐺?

  • The height of 𝑇 is exactly 15.

  • The height of 𝑇 is exactly 30.

  • The height of 𝑇 is at least 15.

  • The height of 𝑇 is at least 30.

There are 8 questions to complete.

Take a part in the ongoing discussion