Download Analysis of Algorithm & Design and more Lecture notes Design and Analysis of Algorithms in PDF only on Docsity!
Analysis & Design of Algorithms Course Code: 3466 Program: BSCS
Design and Analysis of Algorithm Our DAA Course is designed for beginners and professionals both. Our DAA Tutorial includes all topics of algorithm, asymptotic analysis, algorithm control structure, recurrence, master method, recursion tree method, simple sorting algorithm, bubble sort, selection sort, insertion sort, divide and conquer, binary search, merge sort, counting sort, lower bound theory etc.
Algorithm
- (^) An algorithm can be defined as a well-defined computational procedure that takes some values, or the set of values, as an input and produces some value, or the set of values, as an output. An algorithm is thus a sequence of computational steps that transform the input into output.
- (^) It describes specific computational procedures for achieving the input-output
relationship.
An algorithm must have the following properties:
- (^) Correctness: It should produce the output according to the requirement of the algorithm
- (^) Finiteness: Algorithm must complete after a finite number of instructions have been executed.
- (^) An Absence of Ambiguity: Each step must be defined, having only one interpretation.
- (^) Definition of Sequence: Each step must have a unique defined preceding and succeeding step. The first step and the last step must be noted.
- (^) Input/output: Number and classification of needed inputs and results must be stated.
Need of Algorithm
- To understand the basic idea of the problem.
- To find an approach to solve the problem.
- To improve the efficiency of existing techniques.
- To understand the basic principles of designing the algorithms.
- To compare the performance of the algorithm with respect to other techniques.
- It is the best method of description without describing the implementation detail.
- The Algorithm gives a clear description of requirements and goal of the problem to the designer.
Need of Algorithm Continued
- A good design can produce a good solution.
- To understand the flow of the problem.
- To measure the behavior (or performance) of the methods in all cases (best cases, worst cases, average cases)
- With the help of an algorithm, we can also identify the resources (memory, input-output) cycles required by the algorithm.
- With the help of algorithm, we convert art into a science.
- To understand the principle of designing.
- We can measure and analyze the complexity (time and space) of the problems concerning input size without implementing and running it; it will reduce the cost of design.