Monday, August 13, 2012

The Formula for Pascal's Triangle


The formula for Pascal's triangle is n!/(r!(n-r)!). This needs quite a lot of explaining. Firstly, what are n and r supposed to be in this formula? In this equation, n means the row in which the number you're trying to find the value of is. For the formula to work, we must count the row 1,1 as row 1. r is the number of numbers across your number is. In slightly better English, you count from left to right how far along the number you want to calculate is, and this gives you a value for r. The catch, however, is that we count the leftmost 1 as r=0, so you then have to subtract 1. Let's look at an example:
1 1
1 2 1
1 3 3 1
1 4 6 ? 1
So, what values would I use for n and r if I wanted to calculate the number in the position of the question mark? We are in the fourth row down, so n=4. Counting from left to right, the question mark is the fourth number along (okay, a question mark isn't a number, I know, but you get my point). However, we must remember that the first 1 in the row is r=0. Counting up from 0 gives r=3. So, in this example, we get 4!/(3!(4-3)!).
This is all very well, but we still don't know what this actually equals. However, have patience, as I am about to explain what all those "!" signs were for (no, they weren't just punctuation to show how amazing the formula is!)
To calculate n! you have to multiply together every positive whole number up to and including n itself. Perhaps a few examples will clarify this:
1! = 1
2! = 1 x 2 = 2
3! = 1 x 2 x 3 = 6
4! = 1 x 2 x 3 x 4 = 24
10! = 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x 10 = 3628800
It should now be clear how to use the formula for Pascal's triangle! I have given one example here just to you how cool it is:
Say I was walking down the street one day and suddenly needed to know (as one so often does) what the 5th number along on the 14th row of Pascal's triangle was. What do I do?
Firstly, I would have to decide what n and r are. n = 14 as I am interested in the 14th row, and r = 4, as we count along five numbers starting from 0. So, we get 14!/(5!(15-5)!)
= 87178291200/(24×3628800)=1001
So, the number I was looking for was therefore 1001.
This is definitely one of my favourite mathematical formulas. I suggest you try out a few examples yourself to get a feel for how it works. Then, you can try it on your friends and impress them with how fast you can calculate numbers in Pascal's triangle. Have fun!

No comments:

Post a Comment