Posts

Showing posts from January, 2020

Design And Analysis of Algorithms

Definition: An algorithm is a finite set of instructions that, if followed, accomplishes a particular task. In addition, all algorithms must satisfy the following criteria: • Input. Zero or more quantities are externally supplied. • Output. At least one quantity is produced. • Definiteness. Each instruction is clear and unambiguous. • Finiteness. The algorithm terminates after a finite number of steps. • Effectiveness. Every instruction must be very basic enough and must be feasible. Algorithm Definition:  • An algorithm is a sequence of unambiguous instructions for solving a problem, i.e., for obtaining a required output for any legitimate input in a finite amount of time.  • Algorithms that are definite and effective are also called computational procedures.  • A program is the expression of an algorithm in a programming language. We can describe an algorithm in many ways.  1. Natural language: use a natural language like English  2.Flow charts: Grap