Analysis of Algorithm & Design, Lecture notes of Design and Analysis of Algorithms

What is Algorithm? Why study Algorithm?

Typology: Lecture notes

2019/2020

Uploaded on 03/05/2020

fahadburhan
fahadburhan 🇵🇰

1 document

1 / 9

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Analysis & Design of Algorithms
Course Code: 3466
Program: BSCS
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

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

  1. To understand the basic idea of the problem.
  2. To find an approach to solve the problem.
  3. To improve the efficiency of existing techniques.
  4. To understand the basic principles of designing the algorithms.
  5. To compare the performance of the algorithm with respect to other techniques.
  6. It is the best method of description without describing the implementation detail.
  7. The Algorithm gives a clear description of requirements and goal of the problem to the designer.

Need of Algorithm Continued

  1. A good design can produce a good solution.
  2. To understand the flow of the problem.
  3. To measure the behavior (or performance) of the methods in all cases (best cases, worst cases, average cases)
  4. With the help of an algorithm, we can also identify the resources (memory, input-output) cycles required by the algorithm.
  5. With the help of algorithm, we convert art into a science.
  6. To understand the principle of designing.
  7. 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.