![]()
"Without loss of generality, may all your theorems be proved." - Rashid.
"If thy theorems fail deduction reasoning thou shalt apply induction reasoning with the most meticulous care." - Rashid.
![]()
An algorithm, named after the ninth century scholar Abu Jafar Muhammad Ibn Musu Al-Khowarizmi, is defined as follows: Roughly speaking:
The most famous algorithm in history dates well
before the time
of the ancient Greeks: this is Euclid's algorithm for calculating the
greatest common divisor of two integers.
1. Multiplication, the American way:
Multiply
the multiplicand
one after another by each digit of the multiplier taken from right to
left.

2. Multiplication, the English way:
Multiply
the multiplicand
one after another by each digit of the multiplier taken from left to
right.

Algorithmic is a branch of computer science that consists of designing and analyzing computer algorithms
We start with defining the model of computation, which is usually the Random Access Machine (RAM) model, but other models of computations can be use such as PRAM. Once the model of computation has been defined, an algorithm can be describe using a simple language (or pseudo language) whose syntax is close to programming language such as C or java.
Two important ways to characterize the effectiveness
of an algorithm
are its space complexity and time complexity. Time complexity of an
algorithm concerns determining an expression of the number of steps
needed as a function of the problem size. Since the step count measure
is somewhat coarse, one does not aim at obtaining an exact step count.
Instead, one attempts only to get asymptotic bounds on the step count.
Asymptotic analysis makes use of the O (Big Oh) notation. Two
other notational constructs used by computer scientists in the analysis
of algorithms are Θ (Big Theta) notation and Ω
(Big Omega) notation.
The performance evaluation of an algorithm is obtained by totaling
the number of occurrences of each operation when running the algorithm.
The performance of an algorithm is evaluated as a function of the input
size n and is to be considered modulo a multiplicative constant.
The following notations are commonly use notations in performance analysis and used to characterize the complexity of an algorithm.



The complexity of an algorithm is a function g(n) that gives the upper bound of the number of operation (or running time) performed by an algorithm when the input size is n.
There are two interpretations of upper bound.
Because, it is quite difficult to estimate the statistical behavior of
the input, most of the time we content ourselves to a worst case
behavior.
Most of the time, the complexity of g(n) is approximated
by its family o(f(n)) where f(n)
is one of the following functions. n (linear complexity), log n
(logarithmic complexity), na where a≥2
(polynomial complexity), an (exponential complexity).
Once the complexity of an algorithm has been estimated, the question arises whether this algorithm is optimal. An algorithm for a given problem is optimal if its complexity reaches the lower bound over all the algorithms solving this problem. For example, any algorithm solving “the intersection of n segments” problem will execute at least n2 operations in the worst case even if it does nothing but print the output. This is abbreviated by saying that the problem has Ω(n2) complexity. If one finds an O(n2) algorithm that solve this problem, it will be optimal and of complexity Θ(n2).
Another technique for estimating the complexity of a problem is the transformation of problems, also called problem reduction. As an example, suppose we know a lower bound for a problem A, and that we would like to estimate a lower bound for a problem B. If we can transform A into B by a transformation step whose cost is less than that for solving A, then B has the same bound as A.
The Convex hull problem nicely illustrates
"reduction"
technique. A lower bound of Convex-hull problem established by
reducing the sorting problem (complexity: Θ(nlogn)) to the
Convex hull problem.
![]()