0% found this document useful (0 votes)
6 views3 pages

DAA Notes

The document provides an overview of algorithms and their analysis, focusing on time and space complexity, as well as growth functions using Big-O, Omega, and Theta notations. It details various sorting algorithms, their time and space complexities, and introduces advanced data structures like Red-Black Trees, B-Trees, and Fibonacci Heaps. The notes emphasize the importance of performance measurements and include linear time sorting methods such as Counting Sort and Radix Sort.

Uploaded by

shivanklaur
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)
6 views3 pages

DAA Notes

The document provides an overview of algorithms and their analysis, focusing on time and space complexity, as well as growth functions using Big-O, Omega, and Theta notations. It details various sorting algorithms, their time and space complexities, and introduces advanced data structures like Red-Black Trees, B-Trees, and Fibonacci Heaps. The notes emphasize the importance of performance measurements and include linear time sorting methods such as Counting Sort and Radix Sort.

Uploaded by

shivanklaur
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/ 3

Design and Analysis of Algorithms (DAA) Notes

I. Introduction

Algorithms and Analyzing Algorithms

- Algorithm: A step-by-step procedure to solve a problem.

- Analyzing Algorithms: Evaluating an algorithm's performance in terms of time and space complexity.

Complexity of Algorithms

- Time Complexity: Amount of time taken by an algorithm to run as a function of the input size.

- Space Complexity: Amount of memory space required by an algorithm.

Growth of Functions

- Big-O Notation (O): Upper bound of an algorithm's growth rate.

- Omega Notation: Lower bound of an algorithm's growth rate.

- Theta Notation: Tight bound of an algorithm's growth rate.

Performance Measurements

- Execution Time

- Memory Usage

- Input/Output Operations

Sorting and Order Statistics

Sorting Algorithms

1. Shell Sort: Sorting using incrementally smaller gaps.

2. Quick Sort: Divide and conquer; pivot-based partitioning.

3. Merge Sort: Divide and conquer; merging sorted subarrays.

4. Heap Sort: Using binary heaps for sorting.


Design and Analysis of Algorithms (DAA) Notes

Comparison of Sorting Algorithms

- Time Complexity:

- Quick Sort: Average - O(n log n), Worst - O(n^2)

- Merge Sort: O(n log n)

- Heap Sort: O(n log n)

- Space Complexity:

- Quick Sort: O(log n)

- Merge Sort: O(n)

- Heap Sort: O(1)

Sorting in Linear Time

1. Counting Sort: Assumes a range of integer keys; O(n).

2. Radix Sort: Sorts by processing digits; O(nk).

3. Bucket Sort: Divides data into buckets and sorts individually; O(n).

---

II. Advanced Data Structures

Red-Black Trees

- Self-balancing binary search tree.

- Properties ensure O(log n) operations.

B-Trees

- Generalization of binary search trees.

- Used in databases and filesystems.


Design and Analysis of Algorithms (DAA) Notes

Binomial Heaps

- Collection of binomial trees.

- Supports efficient merging of heaps.

Fibonacci Heaps

- Better amortized time complexity for decrease-key and delete operations.

Tries

- Prefix tree for string searching.

- Used in dictionaries and autocomplete systems.

Skip Lists

- Layered linked lists with elements sorted by key.

- Allows O(log n) search, insert, and delete.

You might also like