Professional Documents
Culture Documents
An algorithm
Topic/Course is a set of well-defined instructions or a sequence of steps
that are used to solve a specific problem or accomplish a particular task.
Each algorithm has its unique characteristics, and it is essential to choose the
appropriate algorithm for a specific problem to ensure optimal performance.
We need algorithms because of the following reasons:
Topic/Course
Scalability: It helps us to understand the scalability. When we
have a big real-world problem, we need to scale it down into
small-small steps to easily analyze the problem.
• Well-Defined Outputs: The algorithm must clearly define what output will be yielded and it
should be well-defined as well.
• Finiteness: The algorithm must be finite, i.e. it should not end up in an infinite loops or similar.
• Feasible: The algorithm must be simple, generic and practical, such that it can be executed
upon will the available resources.
• Input: After designing an algorithm, the required and the desired inputs
are provided to the algorithm.
• Processing unit: The input will be given to the processing unit, and the
processing unit will produce the desired output.
On the right side, the flow of Euclid’s algorithm to calculate GCD of two
numbers are given.
How to design algorithms:
What is an algorithm?
a) A computer program
b) A set of instructions to solve a problem
c) A programming language
d) A computer hardware component
THANK YOU