您的位置:首页 > 大数据 > 人工智能

[BetterExplained]How can we add the numbers from 1 to 100?

2017-10-21 22:12 375 查看
Hi,

Welcome to BetterExplained! This is the first in a series of weekly emails to help cement your math intuition.

Let's start with a quick example: How can we add the numbers from 1 to 100?

It's a little tricky. Sure, at some point you may have seen the formula:
total = n * (n + 1) / 2


And in this case, we can plug in n=100 to get
100 * 101 / 2 = 5050


Ok. Is that true understanding? Sure, we can memorize a formula, but have we internalized how it works? Is there an insight that makes us see the world differently?

I doubt it. Now, you may have seen a proof of this result, but the dirty secret of math class is that proofs demonstrate correctness, not insight.

I know we can get a solid intuition for this concept. Let's dig deeper.

Step 1: Simplify The Problem

Why are we adding 1 to 100? It's unmanageable. Let's use 1 to 10. If we can figure out that simpler case, we can extend our thinking up to 100.

Step 2: Extract the Intuition

The key insight is that a list like
1  2  3  4  5  6  7  8  9  10


doesn't have much of a pattern to it. Sure, the numbers are getting bigger, but what do we do?

Imagine this setup instead:
1  2  3  4  5  6  7  8  9  10
10 9  8  7  6  5  4  3  2  1


Interesting. This change might seem nonsensical -- a forward and backward row -- but look at the pattern emerging. There's 10 pairs (1 to 10 along the top) and the sum of the top and bottom element is always 11. One list gets bigger as the other gets smaller,
and the total is always the same.

There's ten pairs, each sum to eleven, so the total is:

10 * 11 = 110


We only need half of this total (one list, not both), so we get:

110 / 2 = 55


Whoa! We rearranged the lists a bit and our thinking started cranking through the problem. Our intuition might be something like this:

Insight: It's hard to see the pattern within a single list. Line up several and see if a pattern emerges.

The general formula is we have n pairs, the total of each is n + 1 (first and last element together), and we want half:

total = n * (n + 1) / 2

Step 3: Explore Variations

A solid intuition means understanding the result from different angles.

Geometry Variation

Imagine stacking bricks in a pile, like this:
x
x x
x x x
x x x x
x x x x x


How many are there? 1 + 2 + 3 + 4 + 5. Ok, fine. But is there a shortcut to counting? Well, imagine completing the wall with 5 more rows!
x o o o o o
x x o o o o
x x x o o o
x x x x o o
x x x x x o


The wall is now a rectangle: a height of 5, and width of 6. There's a total of 30 bricks, but we only want half (the x's), so we get 30 / 2 = 15.

Cool! We can visualize stacking up the bricks, and it might sit better with us.

Intuition: We have a wall n bricks tall, n + 1 bricks wide, and we want half.

total = n  * (n + 1) / 2


Statistics Variation

What if we don't like visualizing things? No problem. We have a pattern of items from 1 to n, which changes by the same amount each time (+1). There's a symmetry there, right?

The average element in this sequence is
(first + last) / 2 = (1 + n) / 2


And since we have n elements, we can think of the total like this:

Intuition: Size of average item * number of items
total = (1 + n)/2  * n


Neat!

Takeaway: What an Aha! moment feels like

If I did my job, one of the approaches above (line-up, making a square, taking the average) clicked. Aha! That's why the formula works!

The goal of learning is to experience the concept firsthand. Then, the formula bec
4000
omes a shorthand description of
what you know. It's like reading sheet music: it's a description of a song, but not the same as experiencing it yourself.

Our goal is to find analogies, diagrams, examples, and plain-English descriptions that help bring concepts to life.

Happy math,

-Kalid
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  math
相关文章推荐