GATE 2014 (Session 1) Computer Science and Information Technology (CS) Questions with Solutions

GATE 2014 (Session 1)

65 questions

MCQ 40 · NAT 251-mark 30 · 2-mark 35

Questions 21–25 of 65

Q21Graph Traversal (BFS and DFS)1 markMCQ−0.33 if wrong
Let G be a graph with n vertices and m edges. What is the tightest upper bound on the running time of Depth First Search on G, when G is represented as an adjacency matrix?

Q22Binary Tree1 markNAT
Consider a rooted n node binary tree represented using pointers. The best upper bound on the time required to determine the number of sub trees having exactly 4 nodes is O(nalog⁡bn)O(n^{a}\log^{b}n) . Then the value of a+10b is_______

Q23Graph Theory1 markMCQ−0.33 if wrong
Consider the directed graph given below.
P Q R S
Which one of the following is TRUE?

Q24Sorting1 markMCQ−0.33 if wrong
Let P be a quick sort program to sort numbers in ascending order using the first element as the pivot. Let t1 and t2 be the number of comparisons made by P for the inputs [1 2 3 4 5] and [4 1 5 3 2] respectively. Which one of the following holds?

Q25Regular Language1 markMCQ−0.33 if wrong
Which one of the following is TRUE?