Definition: The algorithm is defined as a collection of unambiguous instructions occurring in some specific sequence and such an algorithm should produce output for given set of input in finite amount of time.
Properties of Algorithm
We just cannot simply write a sequence as algorithm which is not sufficient to complete certain tasks. The algorithm should have following properties associated with it.
- Non-ambiguity: Each step in an algorithm should be non-ambiguous. That means each instruction should be clear and precise. The instruction in an algorithm should not denote any conflicting meaning. This property also indicate the effectiveness of algorithm.
- Range of input: The range of input should be specified. This is because normally the algorithm is input driven and if the range of the input is not been specified then algorithm can go in an infinite state.
- Multiplicity: The same algorithm can be represented in several different ways, That means we can write in simple English the sequence of instructions or we can write it in the form of pseudo code. Similarly for solving the same problem we can write several different algorithms. For instance: for searching a number from the given list we can use sequential search or a binary search method.
- Speed: The algorithms are written using some specific ideas(which is popularly known as logic of algorithm). But such algorithms should be efficient and should produce the output with fast speed.
- Finiteness: The algorithm should be finite. That means after performing required operations it should terminate.
An algorithm must satisfy following criteria
Thank you for reading the blog. Read our other blogs here
Follow us on Instagram. 💖