0% found this document useful (0 votes)
29 views

Assignment 1 Daa

The document outlines an assignment focused on design and analysis of algorithms (DAA), covering topics such as asymptotic notations, algorithm characteristics, time and space complexity, and various sorting algorithms including merge sort, quick sort, and heap sort. It includes problems on solving recurrence relations using substitution, master’s theorem, and recursive tree methods. Additionally, it requires explanations of stable and unstable sorting, along with the derivation of complexities for specific algorithms.

Uploaded by

2200521520030
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

Assignment 1 Daa

The document outlines an assignment focused on design and analysis of algorithms (DAA), covering topics such as asymptotic notations, algorithm characteristics, time and space complexity, and various sorting algorithms including merge sort, quick sort, and heap sort. It includes problems on solving recurrence relations using substitution, master’s theorem, and recursive tree methods. Additionally, it requires explanations of stable and unstable sorting, along with the derivation of complexities for specific algorithms.

Uploaded by

2200521520030
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Assignment-1 (DAA)

1. Explain various asymptotic notations with the help of diagram.


2. Define main characteristics of an algorithm. Discuss time and space complexity of a
program.

3. Solve the following recurrence relation using substitution method:


(i) T (n) = T (n-1) + n (ii) T (n) = 2T (n/2) + n

4. Solve the following recurrence relation using master’s theorem:


(i) T (n) = 4T (n/2) + n3 (ii) T (n) = 8T (n/4) + 3n2

5. Sort the following sequence {23, 11, 5, 15, 68, 31, 4, 17} using merge sort algorithm.
6. Sort the following sequence {20, 10, 40, 30, 60, 15} using quick sort algorithm.
Where last element as pivot.

7. Write Master’s theorem and explain it with the help of suitable example.

8. Write Merge sort algorithm.

9. Write quick sort algorithm.

10. What do you understand by stable and unstable sorting? Sort the following

sequence {25, 57, 48, 36, 12, 91, 86, 32} using heap sort.

11. Solve the following recurrence relation using recursive tree method:
(i)T (n) = T (n/5) + T (3n/5) + n (ii) T (n) = T (n/10) + T (9n/10)+ n

12. Write the algorithm of shell sort and derive its complexity.

You might also like