Thursday, 18 June 2015

Sum of 1 to 100

Back in school, during Math, one of the arithmetic examples that spoke the most to me about how Powerful Math can be, was the explanation for the adding up of the first one hundred numbers.

The short explanation

When you have a nice distribution of numbers like 1 to 100, it is obvious that the average is right down the middle, which is 50½. And given the fact that we have 100 numbers, the solution becomes obvious.

Okay, so for some people that explanation might have been a bit too short.

The Long Explanation

Determining the average of a series of numbers, \(x_{1}, x_{2}, x_{3}, ... x_{n-1}, x_{n}\) is done by summing them all, and then dividing by the amount of numbers you have.
\[x_{avg} = {\displaystyle\sum_{i=1}^{n} x_i \over n}\]
Therefore, it follows that the sum, i.e. the thing we wish to know, is obviously:
\[{\displaystyle\sum_{i=1}^{n} x_i} = n * x_{avg}\]
For the first 100 numbers, this gives:
\[{\displaystyle\sum_{i=1}^{100} x_i} = 100 * 50{1 \over 2} = 5050\]

The Staircase

Of course, most explanations use a bit more imagination to make things clear2.

Think of the problem as a staircase, with steps reaching from 1 to 100. To make things a bit more simple, and to save my having to draw 100 steps, let's try it with 10 first. With 100 steps the principles are the same.
The interesting part here, is that we can pair different numbers. We will add the numbers at the outside of the figure above, 1 and 10. This gives 11. Next the following outside numbers 2 and 9, also gives 11. In a figure, this would look as follows:
Hence, the answer is the surface of the square, \(5 * 11 = 55\).

Triangles

Obviously the surface area of the square is equal to the surface area of the staircase. If you look at the staircase, you might see a triangle. The surface of the triangle is half the surface of the square containing the triangle (actually containing the two triangles, forming the square).

So you could compute the surface of the staircase also by computing the surface of the square and dividing by two. As it's not a perfect triangle, we need to do some cutting. In geometry, this would look something like the following:

Anecdote

The Anecdote that everybody knows or has heard relates that Carl Friedrich Gauss3, a German mathematician who contributed significantly to many fields, solved this problem in primary school.

References

[1] LaTeX Mathematics
http://en.wikibooks.org/wiki/LaTeX/Mathematics
[2] What is the sum of the first 100 whole numbers?
http://mathcentral.uregina.ca/QQ/database/QQ.02.06/jo1.html
[3] Wikipedia - Carl Friedrich Gauss
http://en.wikipedia.org/wiki/Carl_Friedrich_Gauss

No comments:

Post a Comment