GATE 2008 Computer Science and Information Technology (CS) Questions with Solutions

GATE 2008

185 questions

MCQ 1851-mark 52 · 2-mark 133

Questions 111–115 of 185

Q111Graph Traversal (BFS and DFS)1 markMCQ−0.33 if wrong
The most efficient algorithm for finding the number of connected components in an undirected graph on n vertices and m edges has time complexity

Q112Minimum Spanning Tree2 marksMCQ−0.67 if wrong
For the undirected, weighted graph given below, which of the following sequences of edges represents a correct execution of Prim's algorithm to construct a Minimum Spanning Tree?
a d g b f i c e h 5 10 3 2 1 6 6 3 7 8 8 7 12

Q113Minimum Spanning Tree2 marksMCQ−0.67 if wrong
G is a graph on n vertices and 2n-2 edges. The edges of G can be partitioned into two edge-disjoint spanning trees. Which of the following is NOT true for G?

Q114Shortest Path2 marksMCQ−0.67 if wrong
1 2 3 2 −3 −5 2 1 1 2 3 2 a b c d e f g h
Dijkstra's single source shortest path algorithm when run from vertex a in the above graph, computes the correct shortest path distance to

Q115Regular Expression1 markMCQ−0.33 if wrong
Which of the following regular expressions describes the language over{0,1}\{0, 1\} consisting of strings that contain exactly two 1's?