Daa Model
Daa Model
Daa Model
MODEL EXAM
DEPARTMENT OF INFORMATION TECHNOLOGY
COMMON TO CSE & IT
SUBJECTCODE/TITLE: CS8451/DESIGN ANALYSIS AND ALGORITHM YEAR/SEM: II/IV
MAX. MARKS: 100 DURATION: 3 HRS
PART-A[10*2=20]
1. What do you mean by algorithm?
2. Define big oh notation.
3. What do you mean by Divide and Conquer strategy?
4. Derive the complexity of Binary Search algorithm.
5. Write down the optimization technique used for Floyds’s algorithm. State the rules and assumptions which are implied behind
that.
6. Differentiate variable length encoding and fixed length encoding
7. What do you mean by ‘perfect matching ‘in bipartite graphs?
8. What is maximum cardinality matching?
9. What is Hamiltonian cycle?
10. An NP-hard problem can be solved in deterministic polynomial time, how?
PART-B –(13*5=65)
11. A) i) Briefly explain the time complexity, space complexity estimation. (4)
ii) Write the linear search algorithm and analyze its time complexity. (9)
[or]
B) Write the asymptotic notations used for best case ,average case and worst case analysis of algorithms and Write an algorithm
for finding maximum element of an array perform best , worst and average case complexity with appropriate order notations.(13)
1 2 1 1 2 1 0 2
0 3 2 4 * 1 2 1 1
0 1 1 1 0 3 2 1
5 0 1 0 4 0 0 4
13 A) i) How do you construct a minimum spanning tree using Kruskal’s Algorithm? Explain. (5)
ii) Let A={l/119, m/96,c/247, g/283, h/72, f/77, k/92, j/19} be the letters and its frequency of distribution in a text file.
Compute a suitable Huffman coding to compress the data effectively. (8)
[or]
B) Apply the bottom up dynamic programming algorithm to the following instance of Knapsack Problem. Capacity W=10.(13)
PART-C [15*1=15]
16. Obtain a Optimal Binary Search Tree for following nodes(do,if,int,while) with following probabilities(0.1,0.2,0.4,0.3)