What is an Algorithm & It's Characteristics

An algorithm is a set of well-defined instructions to solve a particular problem. It takes a set of inputs and produces the desired output.

For example,

An algorithm to multiply two numbers:

  1. Take two number inputs
  2. Multiply numbers using the * operator
  3. Display the result

 

Characteristics of an algorithm:

1.  Inputs It should take zero or more input.

2.  Outputs: It should produce at least one output.

3. Clear and Unambiguous: The algorithm should be clear and unambiguous. Each of its steps should be clear in all aspects and must lead to only one meaning.

4. Deterministic: It should be deterministic means giving the same output for the same input case.

5. Finiteness: The algorithm must be finite, i.e. it should terminate before a finite amount of time.

6. Feasible: The algorithm must be simple, generic, and practical, such that it can be executed with the available resources. It must not contain some future technology or anything.

7. Language Independent: The Algorithm designed must be language-independent, i.e. it must be just plain instructions that can be implemented in any language, and yet the output will be the same, as expected.

8. Effectiveness: Every step in the algorithm must be effective i.e. every step should do some work.