Introduction To Algorithm
Introduction To Algorithm
to Algorithm
The word algorithm has a rich history, originating from
the name of a Persian mathematician, Abu Ja’far
Mohammed ibn Musa al Khowarizmi (c. 825 A.D.). He is
credited with providing the step-by-step rules for basic
arithmetic operations like addition, subtraction,
multiplication, and division. When written in Latin, his
name became Algorismus, from which the word algorithm
is derived. This term has gained significant importance in
computer science, where it refers to a method used by
computers to solve problems.
by S. PRASATH vetias
Early Algorithms
1 Euclid's Algorithm
Between 400 and 300 B.C., the renowned Greek mathematician Euclid
developed an algorithm for finding the greatest common divisor (gcd) of
two positive integers. This algorithm is a fundamental concept in number
theory and has applications in various fields, including cryptography and
computer science.
2 Al-Khwarizmi's Contributions
Al-Khwarizmi's work on arithmetic provided the foundation for the
development of algorithms. His step-by-step rules for basic arithmetic
operations laid the groundwork for the development of more complex
algorithms in later centuries.
3 Evolution of Algorithms
Over time, algorithms have evolved and become increasingly
sophisticated. The development of computers and programming languages
has enabled the creation of algorithms for solving a wide range of
problems, from simple tasks to complex scientific calculations.
What is an Algorithm?
Set of Steps
An algorithm is essentially a set of well-defined instructions that, when followed,
accomplish a specific task. These instructions are designed to be clear,
unambiguous, and finite, ensuring that the algorithm will always produce a
predictable outcome.
Computational Devices
Algorithms are often implemented on computers or other computational
devices. They provide a structured approach to solving problems, enabling
machines to perform tasks efficiently and accurately.
Everyday Examples
Algorithms are used in many aspects of our daily lives. For instance, GPS
systems use shortest path algorithms to find the optimal route, while online
shopping platforms rely on cryptography algorithms to secure transactions.
Algorithm Definition
Definition 1 Definition 2
Algorithm Analysis
Algorithm analysis involves evaluating the efficiency of the algorithm in terms of time and
space complexity. Time complexity refers to the amount of time the algorithm takes to
execute, while space complexity refers to the amount of memory the algorithm requires.
Implementation
The implementation phase involves translating the algorithm into a programming language.
This requires choosing a suitable programming language, writing clean and well-documented
code, and ensuring that the code adheres to best practices.
Testing
Computer Algorithm
1 Procedure 2 Computational Complexity
A computer algorithm is a procedure, a finite The computational complexity of an
set of well-defined instructions, for algorithm is a measure of the resources,
accomplishing a specific task. It takes an such as time and memory, required to
initial state and, through a series of steps, execute it. Efficient implementation of an
transforms it into a defined end-state. algorithm is crucial for optimizing
performance and resource utilization.
Dynamic Programming
This technique is used to solve problems by breaking them down into overlapping
subproblems. The solutions to the subproblems are stored and reused to avoid
redundant calculations. Examples include the Fibonacci sequence and the shortest path
problem.
Algorithm Validation and
Analysis
Validation Analysis