Confused about counting triangles
-
This post is deleted! -
Module 0 Week 2 Day 8 Challenge Explanation Part 3
It's normally very difficult to count all the triangles yourself. However, Professor Loh showed a very neat shortcut.
Instead of counting every possible triangle, he counted every possible way to pick 3 of the lines in the picture. This is because when you draw 3 lines, you get a triangle (Unless 2 of them are parallel. Fortunately, none of those 6 lines are parallel to each other!).
Here are some pictures that show how this work:
\
You can see how no matter which three lines I choose, they always make one of the triangles in the picture! So if I just figure out how many ways there are to choose 3 lines, then that's just the number of triangles in total.
How do we choose 3 of the 6 lines? Let's call the 6 lines A, B, C, D, E, and F. One way to do it is to just write down every possible combination of 3 lines. So, I could do A B C, A B D, A B E, A C D, A C E, A D E, B C D, ... You can see that this can take a long time! But, one important thing to see is that if I choose the three lines B C D, that's the same as choosing the three lines C D B. This is because the order in which we draw the 3 lines doesn't matter! No matter how I draw those 3 lines, I will get the same triangle.
Instead of writing them all down, though, we can use another shortcut! You can think of it as drawing three blank spots: _ _ _ Then, we choose which of the 6 letters from A to F we write in each spot. We can't use the same letter twice!
There are 6 possible letters to write in the first spot. Then, there are only 5 possible letters left, so there are 5 letters to write in the second spot. Finally, we have 4 letters left, so there are 4 possible letters we can write in the third spot. Altogether, there would be 6 x 5 x 4 possible combinations of letters, right?
However, remember that the order doesn't matter! We actually counted too many possible combinations, because we actually counted every triangle 6 times. How did this happen? Well, we actually counted the triangle from the lines A, B, and C every time we wrote down: ABC, ACB, BAC, BCA, CAB, or CBA. So we're counting everything 6 times more than we should: We only want the ABC, not any of the rest of the orders. So we have to divide by 6: 6 x 5 x 4 / 6 = 20 triangles
Notice that 6 = 3 x 2 x 1, the number of ways to order 3 letters! That's another way to see why we have to divide by 6.