ALGORITHM
* The origin of the word algorithm to a famous Arab mathematician,
ABU JAFAR MOHAMMED IBN
MUSAA AL- KHOWARIZMI.
* The word 'algorithm' is derived from the last part of his name AL-KHOWARIZMI.
* In computer terminology an algorithm may be
defined as a finite sequence of instructions to solve a problem.
*
It is a step-by-step procedure to solve a problem, where each step represents a
specific task to be carried out.
CHARACTERISTICS
·
It should begin with instructions to accept inputs.
·
Use variables to refer the data , where variables are user-defined
works consisting of alphabets & numerals.
·
Each & every instructions should be precise & unambiguous.
·
Each instructions must be sufficient
·
The total time to carry out
all the steps in the algorithm must be finite.
·
After performing the instructions given in the algorithm ,the
desired results must be obtained.
APPROACHES IN PROBLEM
SOLVING
In problem solving there are different approaches are there :---
v Top down design
v Bottom up design
Top down design
·
The
whole problem is broken down into
smaller tasks.
·
Some
of these tasks are further subdivided.
·
Any
complex problem can be solved by breaking it down into different tasks &
solving each task by performing simpler activities.this concept is known as Top Down Design in problem solving.
Advantages of problem solving ·
Breaking
the problem into parts helps us to clarify what is to be done in each part. ·
At
each step of refinement,the new parts become less comblicated & therefore
,easier to figure out. ·
Parts
of the solution may turn out to be reusable. ·
Breaking
the problem into parts allows more tan one person to work for the solution. Γ Write a procedure for solving to find the sum & average of 3 numbers.
Step 1
: Input three numbers Step 2
: Add these numbers to get sum Step 3
: Divide the sum by 3 to get the average Step
4 : Print sum,average Algorithm
Step 1
: start Step 2
: Input X,Y,Z Step 3
: S=X+Y+Z Step 4
: AVG=S/3 Step 5 : Print S,AVG Step 6 :
stop
|
Comments