Cs 503 - Design & Analysis of Algorithm: Multiple Choice Questions
Cs 503 - Design & Analysis of Algorithm: Multiple Choice Questions
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
om
iii) Kruskal algorithm is a
a) c)
m
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?
om
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)
t.c
5. Write the algorithm of Quick sort. Find the best case, worst case and average case time
complexities of this algorithm.
bu
6. Compare and contrast BFS vis-à-vis DFS.
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?
om
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?
t.c
10. a) Differentiate between greedy method and dynamic programming.
b) What do you mean by non-deterministic algorithms?
bu
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
yw