Design and Analysis of Algorithms 2075

Question Paper Details
Tribhuwan University
Institute of Science and Technology
2075
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 complexity of an algorithm? Explain RAM model for the analysis of algorithm with example.                                                                                           

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

2.  What is recurrence tree method? Determine a good asymptotic upper bound of following relation using recurrence tree method. 

                                         

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

3.  What is heap sort? Trace the following data using heap sort algorithm.                      

X[]={10, 8, 12, 70, 20, 5, 30}

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

4.  What is Huffman code? Write down Hoffman algorithm and find out its complexity.[

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

5.  What is dynamic programming? Find the longest common subsequence between “XYYXXY” and “XXYXXYY”.                                                                                  

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

6.  Explain the Kruskal’s algorithm for computing spanning tree of weighted connected graph with an example of seven nodes graph.

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

7.  What is left turn and right turn? How to detect the intersection of two line segment? Explain with example.                                                                                                   

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

8.  What types of problems are called class-P, class-NP and NP-completeness? Explain with examples.                                                                                                                       

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

9.  What is short path problem? Explain Dijkstra’s algorithm to compute shortest path.  

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

10.  Explain worst case, best case and average case of algorithm analysis with an example. 

8 marks
Details
Official Answer
AI Generated Answer

AI is thinking...