ALGORITHM
OBJECTIVE
At the end of the Lesson the student must be able to:
Describe Recognize that
algorithms Develop a set alternative
through varied of algorithms to algorithm in
examples solve a problem solving a given
problem
The word Algorithm means "A set of finite
rules or instructions to be followed in
calculations or other problem-solving
operations" Or "A procedure for solving a
mathematical problem in a finite number of
steps that frequently involves recursive
What is operations"
Algorithm? Therefore Algorithm refers to a sequence of
finite steps to solve a particular problem.
Computer Science: Algorithms form
the basis of computer programming
Use of and are used to solve problems
ranging from simple sorting and
Algorithm? searching to complex tasks such as
artificial intelligence and machine
learning.
What are the
Characteristics
of an
Algorithm?
ADVANTAGES AND
DISADVANTAGES
OF ALGORITHMS
Advantages of Algorithms:
In an Algorithm the
problem is broken
An algorithm is a
down into smaller
It is easy to step-wise
pieces or steps
understand. representation of a
hence, it is easier for
solution to a given
the programmer to
problem.
convert it into an
actual program.
Disadvantages of Algorithms:
Writing an algorithm Understanding Branching and
takes a long time so complex logic Looping statements
it is time- through algorithms are difficult to show
consuming. can be very difficult. in Algorithms
To write an algorithm, the following things are
needed as a pre-requisite:
1.The problem that is to be solved by this
algorithm i.e. clear problem definition.
2.The constraints of the problem must be
considered while solving the problem.
3.The input to be taken to solve the
How to Design problem.
4.The output is to be expected when the
an Algorithm? problem is solved.
5.The solution to this problem is within the
given constraints.
Then the algorithm is written with the help of
the above parameters such that it solves the
problem.