Design and Analysis of Algorithms 2076

Question Paper Details
Tribhuwan University
Institute of Science and Technology
2076
Bachelor Level / Fifth Semester / Science
Computer Science and Information Technology ( CSC314 )
( 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.  What do you mean by time and space complexity? Explain Big Oh, Big Omega and Big Theta.

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

2.  Define recurrence relation. Explain the recursion tree method for solving the recurrence relation with example.

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

3.  Explain the algorithm for binary search with an example and also discuss its time complexity.

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

4.  Compare the algorithms for quick sort, merge sort and heap sort in terms the time and space complexity.

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

5.  Discuss how knapsack problem can be solved in greedy approach. Explain the algorithm and complexity.

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

6.  Describe prim's algorithm for finding the minimum spanning tree of a graph. Also trace the algorithm for a weighted connected graph.

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

7.  Trace the algorithm for matrix chain multiplication for the given chain ABCD with size array {5, 2, 3, 5, 4}.

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

8.  Define the convex hull in 2D. Write the Graham's scan algorithm and discuss its correctness and analyze its time complexity.

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

9.  Define the term left turn and right turn. Explain, how can you detect the intersection of two given line segments efficiently.

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

10.  What is the application of approximate algorithms? 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...