Académique Documents
Professionnel Documents
Culture Documents
If a algorithm is composed of several parts, then its complexity is the sum of the complexities
of its parts. In many cases, this is not as simple as it sounds. The algorithm may consist of
a loop executed many times, each time with a di¤erent complexity. We need techniques for
summing expressions in order to analyse such cases.
3. Prove that:
h i
n(n+1)
12 22 + 32 42 + :::( 1)n 1
2
Notation:
bxc Floor function. Largest integer less than or equal to x.