You are on page 1of 2

# Code No: 35/MCA

NR
M.C.A III Semester Supplementary Examinations, April/May -2008.

## Answer any five questions

All questions carry equal marks
---

## 1. a) Define big-O notation.

b) If f(n)= amnm+…..+a1n+a0 and am > 0, then f (n) = o (nm)
c) Write an algorithm which demonstrates weighted union operation
on two input sets.

## 2. a) Explain the general method of divide-and-conquer rule.

b) Justify that the 2-way merge sort algorithm follows divide and-
conquer a method.

## 3. a) Write an algorithm to implement Kruskal’s algorithm for minimum

spanning tree.
b) Analyse the time complexity of Kruskal’s algorithm.

## 4. a) Write an algorithm for determining minimum-cost path in a multi-

stage graph using forward approach.
b) Find the all pairs-shortest path of the following graph.

## 5. a) Write an algorithm for breadth first search (BFS) traversal of a

given tree.
b) How to find the connected components in a given graph.

6. a) What are the steps involved in finding all solutions to the 8-queen
problem using back tracking approach.
b) Using ‘sum of subsets’ algorithm, find all possible solutions to the
problem when the set W = {5, 7, 10, 12, 15, 18, 20} and sum value
m = 35.

Contd…2
Code No: 35/MCA ::2::

## 7. a) Describe the control abstraction for LC-search.

b) Find the LC Branch-and-Bound solution for the Knapsack
instance: n = 4, (P1, P2, P3, P4) = (10, 10, 12, 18) (W1, W2, W3, W4) =
(2, 4, 6, 9) and m = 4.

8. a) Show that the job sequencing with dead lines problem in NP-hard.
b) What are the assumptions followed in Cooks theorem.

*****