Design & Analysis of Algorithms (DAA) SPPU Endsem Question Paper Nov 2024
All 8 questions from this SPPU endsem paper, as printed. Read them here or open the PDF.
- Subject code
- 410241
- Pattern
- 2019 pattern
- Exam
- Endsem
- Session
- Nov 2024
- Max. marks
- 70
- Time
- 2½ Hours
- Semester
- VII
- Paper code
- [6354]-485
Printed for: B.E. (Computer Engineering)
Instructions to the candidates
- Attempt Q1 or Q2, Q3 or Q4, Q5 or Q6, Q7 or Q8.
- Neat diagrams must be drawn wherever necessary.
- Assume suitable data if necessary.
- Figures to the right indicate full marks.
Questions
Q1
- a)[8]
You are given a set of tasks, each with a deadline and a penalty for missing the deadline. The objective is to schedule these tasks in a way that minimizes the total penalty incurred. However, you can only work on one task at a time, and once a task is started, it must be completed before moving on to the next task. Additionally, you can't start a task after its deadline has passed. Design a greedy algorithm to efficiently schedule these tasks to minimize the total penalty and prove its correctness.
- b)[8]
Suppose we have a knapsack with a maximum weight capacity of 15 units, and we have the following items with their respective weights (Wi) and values (Vi) : Objects Weight Value O1 8 10 O2 6 8 O3 4 3 O4 2 4 Use greedy approach to maximize the total value of items we can put into the knapsack without exceeding its weight capacity.
- c)[2]
With respect to dynamic programming, what do you understand by optimal substructure? 2
OR- a)
Q2
- a)[10]
This part has equations that don’t show as text. Open the PDF to read it.
- b)[4]
Under what situation do you think the dynamic programming approach for solving a knapsack problem might struggle to find the optimal solution? Briefly explain.
- c)[4]
Enlist the uses of writing control abstraction for any algorithmic strategies.
- a)
Q3
- a)[8]
This part has equations that don’t show as text. Open the PDF to read it.
- b)[9]
This part has equations that don’t show as text. Open the PDF to read it.
OR- a)
Q4
- a)[8]
This part has equations that don’t show as text. Open the PDF to read it.
- b)[5]
Write a short note on LC branch and bound method.
- c)[4]
What are the drawbacks of branch and bound method?
Also asked:May 2025
- a)
Q5
- a)[8]
What are the advantages and disadvantages of : i) Aggregate Analysis ii) Accounting Method
- b)[9]
What are approximation algorithms? Based on the approximation ratio, classify the approximation algorithms.
Also asked:May 2024
OR- a)
Q6
- a)[8]
Why potential function method cannot be used for analysing binary counter? Explain
- b)[9]
Comment on the following statements : i) “The knapsack problem is NP-hard” ii) “Boolean Satisfiability Problem (SAT) is NP-complete” iii) “Minimum spanning tree is tractable problem” 4
- a)
Q7
- a)[10]
Write a Rabin-Karp string matching algorithm. Let input to the algorithm be Original text “t” of length n and pattern text being matched is “p” of length m. What is the expected runtime and worst–case runtime of this algorithm?
- b)[8]
Briefly explain performance measures – speedup, efficiency, throughput, contention, and latency of rnultithreaded algorithms.
OR- a)
Q8
- a)[10]
This part has equations that don’t show as text. Open the PDF to read it.
- b)[8]
If we have two matrices of the order m x n and n x p then what will be the time complexity of multiplying these matrices in conventional approach and in multithreaded approach. Discuss. ♦♦♦
- a)