Tribhuvan University
Bachelor of Science in Computer Science and Information Technology
Semester 5 · TU Board 2081
Course Title: Design and Analysis of Algorithms (CSC314)
Full Marks: 60Pass Marks: 24Time: 3 hours
Candidates are required to give their answers in their own words as far as practicable. The figures in the margin indicate full marks.
Group A
Attempt any TWO questions.(2 × 10 = 20)
- 1.10
Differentiate between dynamic programming and memorization. Compute the shortest path between every pairs in the following graphs using Floyd Warshal algorithm.
[figure in the original paper]
- 2.10
What is the worst case of quick sort and how does randomize quick sort handle this problem? Sort the data { -2, 4, -3, 6, 12, 10, 11, 13, 9 } using quick sort.
- 3.10
Does greedy algorithm guarantee optimal solution? Solve the Fractional knapsack problem to find maximum loot from given information.
Item
1
2
3
4
5
6
7
Value
12
10
20
15
2
3
50
Weight (kgs)
2
1
3
2
12
10
1
Group B
Attempt any EIGHT questions.(8 × 5 = 40)
- 4.5
Given a set A=(5,7,10,12,15,18,20}, find the subset that sum to 35 using backtracking.
Answer comingAlso asked in Model question
- 5.5
Solve the following recurrence relations using master's method.
(a)
(b)
Answer comingAlso asked in 2082, 2079, 2078, 2076
- 6.5
Write an algorithm to find the n^th fibonacci number with its time and space complexity.
- 7.5
Define order statistics problem. Find the edit distance between "cat" and "car" using dynamic programming.
- 8.5
Discuss about recursion and backtracking. Analyze the complexity of Miller Rabin Randomized Primality test.
- 9.5
Solve the following linear equation using Chinese Remainder Theorem.
x = 1 MOD 3
x = 2 MOD 5
x = 0 MOD 7
Answer comingAlso asked in 2079
- 10.5
Explain the approximation algorithm for vertex cover of a connected graph with an example.
- 11.5
State cooks theorem. Discuss about problem reducibility.
- 12.5
Write short notes on:
a) Big Oh, Big Omega, Big theta
b) Class P, Class NP and NP-Complete
— The End —