Skip to main content

Algorithms

An algorithm is simply an answer to a particular kind of problem or question. The answer is expressed as a series of steps. Really, algorithms are solutions. These solutions are well organized. Yes, you know, here solutions are in forms of steps. All of the steps are effective. They cause effects.

The general outline of an algorithm is as:

1 )Make a start.

2 )Find the solution in a number of steps

3 )Stop.

The concept of algorithm is very popular in the Computer field. It is taken from the field of mathematics.

Mathematics is broadly the study of numbers or quantities. In this subject we are given some numbers. On the given numbers some kind of operation is done. The arithmetic operations are done by arithmetic operators. Some examples of arithmetic  operators are '+',  '-',  '×', and '÷'.  After completion of the operation the result is obtained.



The numbers which form the main part of mathematical problems are taken as inputs of algorithms. 

Question) 4 + 5 = ?

In the above question, 4 and 5 are considered as inputs in case of algorithm studies. The arithmetic operator is '+'.  The operator '+' is also considered in the design of algorithms. For the '+' operator, we write an algorithm for the addition of two numbers. 

We have dedicated steps in case of algorithms. For the addition algorithm, we have a step that starts the algorithm.We have a dedicated step for the addition of the two numbers. After adding the two numbers, the result is stored safely. Then the result is displayed. After displaying the result we stop the algorithm.


Algorithm for addition of two numbers:

1 ) Start

2 )Input first number, n1

3 )Input second number, n2

4 )n = n1 + n2

5 )Display n

6 )Stop 

Comments

Popular posts from this blog

Interface Message Processor ( IMP )

Interface Message Processor ( IMP ) is a special purpose Computer. The Processor plays a vital role in Host-to-Host communication. IMP is placed between Host Computers.  IMP helps Hosts to exchange information. IMPs ( Interface Message Processors ) form a group. The group dedicates itself towards reliable transmission of Packets. _________________________ Note: An Interface Message Processor can be supposed to have a face. Firstly this supposed face of IMP is in the direction of the first Host, which sends the  message. Secondly, this face is turned towards the other Host.  Now, the IMP,  with its face turned around, communicates with this other Host.  Transformed message from IMP is communicated to this Host. __________________________ Message ( a piece of information ) sent from the Host ( source of information  ) is transformed into Packets. Transformation of the message into Packets is performed by an IMP. These Packets are forwarded to the receiver H...