ALGORITHMS AND ALGORITHMIC THINKING
PROGRAMMING BASICS
ALGORITHM
A process or a set of rules either done in the form of calculations or
other problem-solving operations especially by a computer
Finite sequence of mathematically rigorous instructions typically used
to solve a class of specific problems or to perform a computation
Specifications for calculations and data processing
ALGORITHM – THE VISUALS
CHARACTERISTICS
Unambiguous – Each step in the algorithm should be clear, precise,
and lead to only one possible interpretation
Finiteness – An algorithm must terminate after a finite number of
steps. It cannot run indefinitely.
Effectiveness – Every step in the algorithm should be basic enough to
be executed in a finite amount of time and with available resources
CHARACTERISTICS
INPUT – An algorithm should accept zero or more well-defined inputs.
OUTPUT – An algorithm should accept zero or more well-defined
output.
FEASIBILITY – The steps of the algorithm should be achievable with the
available resources
SECONDARY CHARACTERISTICS
LANGUAGE INDEPENDENCE – An algorithm should be described in a
way that is not tied to a specific programming language
CLEAR AND ORDERED STEPS – The sequence of steps should be
logically structured and be easy to follow
DETERMINISTIC – For the same input, an algorithm should always
produce the same output
SECONDARY CHARACTERISTICS
CORRECTNESS – The algorithm should accurately solve the problem
it is designed for
EFFICIENCY – The algorithm should use resources (like time and
memory) in an optimal way
CHARACTERISTICS – A VISUAL