Concept of Algorithm

Concept definition of algorithm

Informally, algorithm is simply a method of solving problem which can be implemented on a computer. The term algorithm has no root meaning. According to the American Heritage Dictionary, it is derived from the name of Muhammad ibn Musa al-Khwarizm (780A.D850A.D), a Muslim mathematician whose works introduced Arabic numerals and algebraic concepts to Western mathematics. The word “algebra” stem from the title of his book Kitab al jabr wa’l-muq’abala. The concept meaning of algorithm has come to be accepted as: set of step-by-step instructions for solving a well-defined problem which takes allowable inputs to produce desired output. In other words, an algorithm consists of a set of unambiguous instructions that take one or more acceptable inputs to produce desired output. This definition emphasize that an algorithm must consists of:

        i.            Set of instructions that can be followed, typically by a computer when implemented in computer language.

      ii.            Algorithm takes acceptable data as input.

    iii.            It produces desired output based on the input provided. If wrong input is provided, algorithm will not give correct output

The concept of algorithm is depicted in the diagram below;


One important concept in algorithm is that the problem solver must write explicitly all the instructions required to solve the problem without assumptions. In fact, if a problem solver cannot express the concept clearly, the algorithm will not be useful to solve the problem. Consider a problem to find the largest of three numbers. Almost anyone can immediately tell which is the largest, but many cannot explain the steps they followed to arrive at it. Most people will be exclaimed, “I just know it!”. However, an algorithm approach desires the steps to be clearly and unambiguously stated. This is what separate algorithm from ordinary human intuition, as human intuition is an impression that something might be the case.

The algorithm is stated below.

Step 1: Enter the three numbers say a,b,c.

Step 2: If a>b then go to step 3 else go to step 4

Step 3: If a>c then a is largest go to step 5 else c is largest go to step 5

Step 4: If b>c then b is the largest.

Step 5: stop