What is Algorithms?
7:53 AM
Algorithms are a set of instructions to solve a problem. We know that a problem constitutes of two parts - the data given and the conclusion to be found out. In the computer terminology they are input and output, respectively. Problem solving involves the procedure of receiving the necessary data (input) and processing them properly to arrive at the conclusion (output). Hence to begin the procedure of solving a problem we have to be clear in the following points.
- What is the required conclusion?
- How do we arrive at the conclusion?
- What are the necessary data?
If this analysis is done, it will be easy to enter in to the procedure of solving.
Examples
prepare an algorithm to find the sum of two given numbers.
- What is the required output? The sum.
- How do we get it? By adding the numbers.
- What are the necessary inputs? Two given numbers.
Hence to solve this problem, one should recognise the inputs, add them and give the result. So the instructions for understanding the inputs, adding them and writing the sum are to be given in the algorithm.
0 comments