You are on page 1of 2

POKHARA UNIVERSITY

Level: Bachelor Semester – Fall Year : 2009


Programme: BE Full Marks : 100
Course: Analysis and Design of Algorithm Time : 3hrs.
Candidates are required to give their answers in their own words as far
as practicable.
The figures in the margin indicate full marks.
Attempt all the questions.

1. a. Explain the asymptonic notations Big Oh, Big Omega, and Big 7
Theta. Differentiate between them with an example.
b. Briefly explain a Binary tree data structure. Write algorithm to
8
delete element from binary tree and compute the complexity of
your algorithm.
2. a. Explain the Divide and Conquer strategy for algorithm design. For 8
a recursive algorithm, if the value of T (1) =2 and T(n) given by
T(n/2)+c for n>1, then compute the complexity of the algorithm.
b. What is the principle of Greedy methods? How do we use this 7
principle in the problem solving for finding maximum and
minimum numbers from a given list of numbers?
3. a. What do you understand by Dynamic Programming? Compare it 7
with the greedy method of problem solving.
b. Let X = a,a,b, a, a and Y = b,a,b,a. Find a minimum- cost edit
8
sequence that transforms X into Y.
4. a. Write algorithm for both BFS and DFS. Find time complexity for 7
both of them.
b. Explain Optimal Merge Pattern problem. How can you use greedy
8
method to solve this problem?
5. a. Briefly explain the concept of backtracking algorithm. Write an 8
algorithm to solve 8-queens problem. Calculate its time
complexity.
b. State graph coloring problem. Write its significances. Generate 7
state space tree for coloring a graph if it has n = 3 vertices and
chromatic number m = 5.
1
6. a. Explain 0/1 knapsack problem. How will you use dynamic 7
programming approach to solve this problem? Find the solution of
the following 0/1 knapsack problem using dynamic programming.
n=3, m=20, (p1, p2,p3)=(25,14,15), (w1,w2,w3)=(7,5,10).
b. Write a recursive algorithm to find the nth Fibonacci number, and 8
compute its complexity.
7. Write short notes on (Any Two) 5×2
a. Job Sequencing with Deadline
b. Bi-connected Components
c. Strassen' s Matrix Multiplication

You might also like