Assignment # 1
Assignment # 1
Assignment # 1
1
What is design and analysis of algorithms?
Good algorithm design is about finding solutions that are correct, efficient, and often
elegant.
2. Algorithm Analysis:
Algorithm analysis is an important part of computational complexity theory, which
provides theoretical estimation for the required resources of an algorithm to solve a
specific computational problem. Analysis of algorithms is the determination of the
amount of time and space resources required to execute it.
1
implementation). However, the main concern of analysis of algorithms is the required
time or performance.
Q. No. 2
What is algorithm and its types?
Algorithm:
Properties of Algorithm:
It should terminate after a finite time.
It should produce at least one output.
It should take zero or more input.
It should be deterministic means giving the same output for the same input
case.
Every step in the algorithm must be effective i.e., every step should do some
work.
Types of Algorithms:
There are several types of algorithms, and they can be categorized based on their
characteristics and application areas. Here are some common types of algorithms:
2
02. Divide and Conquer Algorithms:
These algorithms break complex problems into smaller, manageable
subproblems.
Each subproblem is solved independently, and their solutions are combined to
solve the original problem efficiently.
Examples include sorting algorithms like Merge Sort and Quick Sort.
3
08. Sorting Algorithms:
Sorting algorithms are designed to arrange elements in a specific order,
enhancing data organization and retrieval.
THE END