Marco and Andrea's Algorithms

05 May 2012

Conventions

The first post will probably be a bit boring but this is a step we need to go through in order to understand each other later.
Here, we just want to list all (or at least most) of the conventions we are going to use in our blog.

Greek letters

Greek letters are used as constants or angles. For example $\pi$ is the constant 3.14159....

Functions

Functions are identified by Latin letters like $f$ or $g$ and the variable is always seen in the definition. For example $f(x)$ is a function depending on $x$.

If we want to describe a recursive function we put an index below the function name.
$$g_i(x) = g_{i-1}(x) + 2x^2$$

Vectors and Matrix

Vectors are identified by bold Latin letters with a bar above them and Matrix are just bold capital letters

$${\bf A \bar{x}}= {\bf \bar{y}}$$

To indicate a component of a vector we put an index below the vector name and we do not put the bar above
$${\bf \bar{v}} = ({\bf v}_1, {\bf v}_2)$$

Other Symbols

The same is for the symbol $\prod$ where the product is used instead of the sum,

$\lceil a \rceil$ is to indicate the upper value of a and $\lfloor a \rfloor$ the lower value.

$\log$ is always the $\log_2$ of a number.

$\approx$ means almost equals to.

$\partial$ is a derivative and $\int$ is an integral

Order of growth

We indicate the order of growth with a big $O$ and the parameter in the brackets. For example
$$O(n)$$
is the sign of a linear growth.
The order of growth is an indication of the efficiency of the algorithm. If an algorithm is $O(n)$ is called linear and it completes in a number of operation proportional to the size of the problem $n$. If we have an algorithm that is $O(n^2)$ it will complete in a number of operation proportional to the squared of the size of the problem.

"Pseudo" code

There won't be any "Pseudo code" we will use C/C++ code. We think that C/C++ can be clear enough for our purpose.