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

GATE 2005

203 questions

MCQ 2031-mark 203

Questions 116–120 of 203

Q116Greedy Technique1 markMCQ−0.33 if wrong
We are given 9 tasks T1, T2... T9. The execution of each task requires one unit of time. We can execute one task at a time. Each task Ti has a profit Pi and a deadline di Profit Pi is earned if the task is completed before the end of the dith unit of time.
Task Profit Deadline T1 15 7 T2 20 2 T3 30 5 T4 18 3 T5 18 4 T6 10 5 T7 23 2 T8 16 7 T9 25 3
Are all tasks completed in the schedule that gives maximum profit?

Q117Divide and Conquer1 markMCQ−0.33 if wrong
In the following table, the left column contains the names of standard graph algorithms and the right column contains the time complexities of the algorithms. Match each algorithm with its time complexity.
1.Bellman-Ford algorithmA:O(mlog⁡n)2.Kruskal’s algorithmB:O(n3)3.Floyd-Warshall algorithmC:O(nm)4.Topological sortingD:O(n+m)\begin{array}{|ll|ll|}\hline \text{1.} & \text{Bellman-Ford algorithm} & \text{A:} & \text{$O(m\log n)$} \\\hline \text{2.} & \text{Kruskal's algorithm} & \text{B:}& \text{$O(n^3)$} \\\hline \text{3.}& \text{Floyd-Warshall algorithm} & \text{C:} & \text{$O(nm)$} \\\hline \text{4.} & \text{Topological sorting} &\text{D:} & \text{$O(n+m)$} \\\hline \end{array}

Q118Graph Traversal (BFS and DFS)1 markMCQ−0.33 if wrong
In a depth-first traversal of a graph G with n vertices, k edges are marked as tree edges. The number of connected components in G is

Q119Minimum Spanning Tree1 markMCQ−0.33 if wrong
Let G be a weighted undirected graph and e be an edge with maximum weight in G. Suppose there is a minimum weight spanning tree in G containing the edge e. Which of the following statements is always TRUE?

Q120Minimum Spanning Tree1 markMCQ−0.33 if wrong
Let s and t be two vertices in a undirected graph G=(V, E) having distinct positive edge weights. Let [X, Y] be a partition of V such that s∈\inX and t∈\inY. Consider the edge e having the minimum weight amongst all those edges that have one vertex in X and one vertex in Y.

Let the weight of an edge e denote the congestion on that edge. The congestion on a path is defined to be the maximum of the congestions on the edges of the path. We wish to find the path from s to t having minimum congestion. Which one of the following paths is always such a path of minimum congestion?