Pascal's Triangle - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Math Apps : Discrete Mathematics : MathApps/PascalsTriangle

Pascal's Triangle

Main Concept

Pascal's triangle is an infinite triangular array of integers with many interesting connections to integer arithmetic, including the binomial coefficients and the Fibonacci numbers. Although the triangle had been studied centuries earlier by Indian, Greek, Persian, Chinese, and Italian mathematicians, it is named Pascal's triangle after French mathematician Blaise Pascal, who developed many of its uses and organized his results in his treatise, Traité du triangle arithmétique.

 

Constructing Pascal's triangle

Each number in this array can be identified using its row and its specific position with the row. The rows are numbered from top to bottom, beginning with n = 0, while the terms in each row are numbered from left to right, beginning with k = 0. To construct this triangle, we begin by writing only the number 1 in row 0. Then, to find the elements of the following rows, we add the number above and to the left (Row = n1, Position = k1) and the number above and to the right (Row = n1, Position = k) of our current position (Row = n, Position = k) to get the number that belongs here. If we are at the edge of the triangle, where the number to the right or left is not present, we substitute a 0 in its place, which is why each row begins and ends with 1 (0+1 =1 on the left side and 1 + 0=1 on the right side for every row).

For example:

• 

To construct row 1, we imagine row 0 to have the form '0 1 0' and so the number in position 0 of row 1 is 0+1 =1 and the number in position 1 of row one is 1 + 0=1. This gives row 1 the form '1 1'.

• 

To construct row 2, we imagine row 1 to have the form '0 1 1 0' and so the number in position 0 of row 2 is 0+1 =1, the number in position 1 of row 2 is 1 + 1 =2, and the number in position 2 of row 2 is 1 + 0=1. This gives row 2 the form '1 2 1'.

Binomial coefficients

Consider the following expansions of the power x+yn into a sum of terms:

 

• 

x+y2 = x2 + 2xy + y2

• 

x+y3 = x3 + 3x2y + 3xy2 + y2

• 

x+y4 = x4 + 4x3y + 6x2y2 + 4x y3 + y4

 

This expansion can be expressed more compactly using the Binomial Formula:

 

x+yn = k=0nnkxnkyk = k=0nnkxkynk.

 

The binomial coefficient nk, also written Cn,k or nCk and pronounced n choose k, is the number of ways of choosing a subset of k objects from a group of n objects. Its value can be given more explicitly as

nk=nn1...nk+1 kk1...1= n!k!nk! for kn.

 

As you may have noticed, the coefficients of the expansion of the nth power x+yn correspond directly to the numbers in the nth row of Pascal's Triangle:

 

• 

x+y2 = 1 x2 + 2xy + 1y2

• 

x+y3 = 1 x3 + 3x2y + 3xy2 + 1 y2

• 

x+y4 = 1 x4 + 4x3y + 6x2y2 + 4x y3 + 1 y4  and so on...

 

In other words, the number in the kth position of the nth row of Pascal's Triangle is nk. For example, the number in position 0 of row 1 is 10=1 while the number in position 2 of row 5 is 52=10.

Also, due to the symmetry of Pascal's triangle, we can easily see that nk = nnk. Finally, looking back upon the the original way of constructing the triangle, in which the two numbers in the row above are added together to get the current value, we see that

 

n1k1+n1k=nk for n>0 and 0kn.

 

Select "Explore By Term" and then click on the diagram of Pascal's Triangle below to highlight any term and see how its value relates to its row and position. Select "Compare to Binomial Expansion" and then use the "Row" slider to highlight an entire row of the triangle and compare its terms with the coefficients of the corresponding binomial expansion.

 

Row (k)

More MathApps

MathApps/DiscreteMathematics