Design and Analysis of Algorithms 2071

Question Paper Details
Tribhuwan University
Institute of Science and Technology
2071
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.  Why do you need the algorithm analysis? Explain the best, worst and average case complexities with suitable example.                                                                            

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

2.  Explain the master method for solving the recurrence relations. Solve the following recurrence relations using this method.                                                                                     

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

3.  Explain the divide and conquer approach for algorithm design. Design the binary search algorithm and analyze it’s time complexity.                                                               

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

4.  Explain the merge-sort algorithm with example and analyze its time complexity. 

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

5.  What do you mean by a prefix code? How Huffman algorithm generates prefix codes? Explain with an example.

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

6.  Discuss the 0/1 knapsack problem and how this problem can be solved? Explain the algorithm.          

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

7.  Explain the algorithm to find the all pair shortest path of a weighted connected graph. Trace the algorithm for the following graph. 

                                         

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

8.  Write an algorithm for depth first search. Use depth first search to find a spanning tree of the following graph.

                               

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

9.   Define the convex hull in 2D. Write the Grahm’s scan algorithm for computing the convex hull of points in 2D and analyze its time complexity. 

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

10.  What do you mean by approximation algorithm? Write the algorithm for approximate the vertex cover of a connected graph with example.

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...