LOYOLA COLLEGE (AUTONOMOUS), CHENNAI – 600 034
|
M.Sc. DEGREE EXAMINATION – MATHEMATICS
FIRST SEMESTER – November 2008
MT 1808 – COMPUTER ALGORITHMS
Date : 13-11-08 Dept. No. Max. : 100 Marks
Time : 1:00 – 4:00
Answer ALL questions
- a) Ifthen prove that
OR
- b) Explain sequential labeling of the nodes of a binary tree. Give an example of a complete binary tree which is not full. (5)
- c) Give an algorithm to form a heap of n elements inserting one element at a time. Simulate it on A(1:8) = (34, 67, 12, 55, 80, 71, 99, 10).
OR
- d) Give an algorithm to form a heap of n elements using algorithm ADJUST. Simulate it on A(1:7) = (66, 83, 14, 90, 45, 33, 81). (15)
- a) Give the control abstraction for divide and conquer strategy.
OR
- b) Explain the problem ‘Optimal Merge Pattern’. (5)
- c) State algorithm BinSearch.
Simulate it on A(1:12) = (12, 23, 33, 45, 56, 61, 66, 70, 78, 89, 90, 95) when (i) x=23, (ii) x=57 and (iii) x=95. Draw the binary decision tree when n = 12.
OR
- d) State algorithm QUICKSORT.
Simulate it on (1:9) = (33, 67, 78, 31, 90, 51, 29, 66, 84). (15)
- a) Give the control abstraction for greedy method.
OR
- b) Explain clearly the job sequencing problem with deadlines. (5)
- c) Give algorithm GREEDYKNAPSACK. If p1/w1 ≥ p2/w2 ≥ … pn/wn then prove that GREEDYKNAPSACK generates an optimal solution to the given instance of the knapsack problem.
OR
- d) Explain the optimal storage on tapes problem with an example. With usual notations prove that if then the ordering minimizes over all possible values of the (15)
- a) Explain the inorder and the preorder tree traversals with examples.
OR
- b) Explain the breadth first search traversal with an example. (5)
- c) Explain two different formulations of the sum of subsets problem. Give a recursive backtracking algorithm for sum of subsets problem.
OR
- d) Explain in detail the 4-queens problem. Give a backtracking algorithm to solve the n-queens problem. (15)
- a) What is Satisfiability problem? State Cook’s Theorem.
OR
- b) Define a nondeterministic algorithm with an example. (5)
- c) Explain maximum clique problem with an example. Prove that CNF-satisfiability α clique decision problem.
OR
- d) Explain the node cover decision problem with an example. Prove that the problem is NP-complete. (15)
Latest Govt Job & Exam Updates: