ALGORITHMS
A set of rules that must be followed while solving a particular
problem.
PROPERTIES OF ALGORITHMS
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
ADVANTAGES OF ALGORITHMS
It is a step-wise representation of a solution to a given problem, which makes it easy
to understand.
An algorithm uses a definite procedure.
It is not dependent on any programming language, so it is easy to understand for
anyone even without programming knowledge.
Every step in an algorithm has its own logical sequence so it is easy to debug.
By using algorithm, the problem is broken down into smaller pieces or steps hence, it
is easier for programmer to convert it into an actual program.
DISADVANTAGES
Algorithms is Time consuming.
Difficult to show Branching and
Looping in Algorithms.
Big tasks are difficult to put in
Algorithms.
CHARACTERISTICS
Precision – the steps are precisely stated(defined).
Uniqueness – results of each step are uniquely definedand only depend on the input
and the result of the precedingsteps.
Finiteness – the algorithm stops after a finite number of instructions are executed.
Input – the algorithm receives input.
Output – the algorithm produces output.
Generality – the algorithm applies to a set ofinputs.