Design and Analysis of Algorithms 2072

Question Paper Details
Tribhuwan University
Institute of Science and Technology
2072
Bachelor Level / Fifth Semester / Science
Computer Science and Information Technology ( CSC-303 )
( Design and Analysis of Algorithms )
Full Marks: 80
Pass Marks: 32
Time: 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.

Attempt all questions.

Official Answer
AI Generated Answer

AI is thinking...

1.  Describe the best case and worst case complexity of an algorithm. Write algorithm for insertion sort and estimate the best and worst case complexity.  

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

2.  Explain the big Oh of the following recurrence relations using the iterative expansion method.                                                                                                                                                                                                                                                       

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

3.  What is the worst-case of quick sort? Show the how quick sort can be made to run in optimal time in the worst case.                                                                              

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

4.  Trace the heap-sort algorithm for the following data: {16, 41, 18, 99, 74, 20, 17, 25, 10}.   

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

5.  What is prefix code? How Huffman algorithm generates optimal prefix codes? Explain with suitable example. 

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

6.  What do you mean by dynamic programming approach for design of algorithm? Write the algorithm for matrix chain multiplication and estimate its time complexity.  

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

7.  Write the Dijkstra’s algorithm for single source shortest path in a weighted connected graph. Find the shortest path from the node S to other nodes in the following graph.

                                        
 

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

8.  Write an algorithm to compute the LCS of given two sequences. Trace the running of the algorithm to find the LCS of the sequences “XMJYAUZ” and “MZJAWXU”.  

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

9.   Define the term diagonal, ear and mouth of a simple polygon. How can you determine the intersection of two line segment efficiently? Explain in detail.

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

10.  Discuss NP completeness. What is the role of approximation algorithms? Explain the algorithm for vertex cover of a graph with running example.                                                                    

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...