An algorithm has the following features:
1 ) Input: An algorithm is supplied with information. This information is called input. Addition operation can be performed with two numbers. An algorithm performing addition is given two numbers as input. Input transformation is the job of algorithm design. The addition algorithm transforms the two input numbers into 'sum'.
2 ) Output: The result(s) of an algorithm is called output. Output is produced by an algorithm. The addition of two numbers gives a result. This result is the output of the addition algorithm. Similarly, the quotient is the output given by the division algorithm.
3 ) Definiteness: Each step of an algorithm is very clear. There is no scope for confusion. In the addition algorithm the step dedicated to accept a number definitely ensures input of a number. This step cannot dedicate itself to accept an alphabet. Number means only number and not an alphabet. If an alphabet is accepted as input for addition, it is confusing for a Computer. We know that an alphabet cannot be considered for addition. If an alphabet is considered, the output cannot be correct. Definiteness ensures the correctness of output.
4 ) Finiteness: An Algorithm has a finite number of steps. It means an algorithm has an end. An algorithm ( solution) that does not end is not a problem solver and hence not an algorithm. In fact, it is a problem. But we know that a solution is an algorithm. The finiteness feature has resulted in the development of excellent solutions using algorithms.
5 ) Effectiveness: Each step of an algorithm produces effect. An algorithm has a series of steps. So, we may say that an algorithm produces a series of effects.
The effect of each step can be felt. To realize the feeling, we trace each step using pencil and paper.
For example, when output is given by an algorithm, the transformation of inputs is the effect produced.
Comments
Post a Comment