You are on page 1of 3


Multiple Choice Questions

1. i) O-notation provides an asymptotic

a) upper bound c) light bound
b) lower bound d) none of these

ii) The minimum number of colors needed to color a graph having n>3 vertices and 2 edges is

a) 2 c) 4
b) 3 d) 1

iii) Kruskal algorithm is a

a) Asymptotically loose c) same as big oh

b) Asymptotically tight t.c d) none of these

iv) Which one of the following is true?

a) All NP hard problems are NP complete

b) All NP complete are NP hard
c) Some NP complete problems are NP hard
d) None of these

v) Time complexity for recursive relation T(n) = 2T ( ) + 1 is

a) c)

b) ) d)

vii) Time complexity for the Floyd’s algorithm to find all parts of shortest path of a graph G with
V vertices and E edges using dynamic programming method is

a) O ( V2 ) c) O ( V3 )
b) O ( E2 ) d) O ( E3 )

viii) The diagonal of the adjacency matrix of a graph with a self loop contains

a) 1 c) -1
b) 0 d) both 0 and 1

ix) In which sorting technique at every step each element is placed in its proper position?

a) Bubble sort c) Quick sort

b) Merge sort d) Heap sort

x) Optimal substructure property is exploited by

a) Dynamic programming c) Both (a) & (b)

b) Greedy method d) None of these

Short Answer Type Questions

2. Write down the difference between :

a) Prim’s algorithm and Kruskal’s algorithm
b) Linear search and binary search
3. Use a recursion tree to give an asymptotically tight solution to the recurrence:
T(n) = T (n – a) + T (a) + cn where a >= 1 and c>0 are constant.

4. Find the minimum number of operations requird for the following matrix chain multiplication
using dynamic programming:
A(10 х 20) * B (20 50) * C (50 х 1) * D (1 х 100)
5. Write the algorithm of Quick sort. Find the best case, worst case and average case time
complexities of this algorithm.
6. Compare and contrast BFS vis-à-vis DFS.

Long Answer Type Questions


7. a) Define the classes P and NP.

b) Discuss what you mean by polynomial reductions.

c) Discuss diagrammatically the relations among P class, NP class, NP hard and NP complete.
d) Describe Clique Decision Problem (CDP).
e) Prove that CDP is NP complete.
8. a) Find out the minimum cost spanning tree using any algorithm:

b) Let (u, v) be a minimum weight edge in a graph G. Show that (u, v) belongs to some minimum
spanning tree of G.
c) What is union-find algorithm?

9. a) Find out the worst case time complexity of merge sort.
b) Design a back tracking algorithm to find all the Hamiltonian cycles in a Hamiltonian graph.
What is the worst-case time complexity of the algorithm?
10. a) Differentiate between greedy method and dynamic programming.
b) What do you mean by non-deterministic algorithms?
c) A newspaper agent daily drops te newspaper to the area assigned in such a manner that he
has to cover all the houses in the respective area with minimum travel cost. Compute the
minimum travel cost. The area assigned to the agent where he has to drop the newspaper is

shown in the figure below:


11. Write short notes on any three of the following:

a) Recursion Tree
b) FFT algorithm
c) Approximation algorithms
d) 0/1 knapsack problem