Web viewWrite control abstraction for divide and conquer strategy. Give the recurrence relation for...

1
DAA University question for unit 1 (2012 Pattern) 1. Explain in brief Amortized analysis. Find Amortized cost with respect to stack operations. 2. Solve the recurrence relation T(n)=2T(n/2)+n 2 ? 3. Solve the recurrence relation T(n)=8T(n/2)+n 2 ? 4. Define Big O,Omega and Theta Notation. 5. What are different problem solving strategies. 6. Consider the recurrence: T(n)=O(n) T(1)=Θ(1) Show that above recurrence is asymptotically bound by Θ(n) 7. State whether the following functions are CORRECT or INCORRECT and justify your answer. i) 3n+2=O(n) ii) 100n+6=O(n) iii) 10n 2 +4n+2=O(n 2 ) 8. 9. 10. Explain how divide and conquer method 11. Write control abstraction for divide and conquer strategy. Give the recurrence relation for the same and solve this recurrence relation. 12. Explain different strategies to find running time complexities of algorithm. 13. What are different time complexities. 14. What is meant by Best case, Average case and Worst case.

Transcript of Web viewWrite control abstraction for divide and conquer strategy. Give the recurrence relation for...

Page 1: Web viewWrite control abstraction for divide and conquer strategy. Give the recurrence relation for the same and solve this recurrence relation

DAA University question for unit 1 (2012 Pattern)

1. Explain in brief Amortized analysis. Find Amortized cost with respect to stack operations.2. Solve the recurrence relation T(n)=2T(n/2)+n2 ?3. Solve the recurrence relation T(n)=8T(n/2)+n2 ?4. Define Big O,Omega and Theta Notation.5. What are different problem solving strategies. 6. Consider the recurrence:

T(n)=O(n)T(1)=Θ(1)Show that above recurrence is asymptotically bound by Θ(n)

7. State whether the following functions are CORRECT or INCORRECT and justify your answer.i) 3n+2=O(n)ii) 100n+6=O(n)iii) 10n2 +4n+2=O(n2)

8.

9.

10. Explain how divide and conquer method 11. Write control abstraction for divide and conquer strategy. Give the recurrence relation for

the same and solve this recurrence relation.12. Explain different strategies to find running time complexities of algorithm.13. What are different time complexities.14. What is meant by Best case, Average case and Worst case.