Pascal`s Triangle Mod 2

advertisement

Pascal’s Triangle Mod 2

Pascal’s Triangle is formed by starting with a one in the first row and two ones in the second row.

Adjacent numbers in a row are summed and the result is placed below and between the summed numbers, to form the next row. Ones are entered on either end of each row. In order to form the mod 2 triangle, we mod 2 each row entry. The resulting triangle looks like this

1

1 1

1 0 1

1 1 1 1

1 0 0 0 1

1 1 0 0 1 1

1 0 1 0 1 0 1

1 1 1 1 1 1 1 1 for rows 0 to 7. The one entries form triangle shapes. The general form of these triangles is shown in the diagram below:

Some triangle of ones, T k

, is repeated twice in the rows below it. These three triangles form the next triangle, T k+1

, which is also repeated twice across the rows below it. Each of the triangles has a triangle of zeroes in the center, with the exception of the first triangle, T

0

. This pattern continues infinitely.

Lemma: The height of a triangle T k

in rows is given by 2 k .

Proof of Lemma: The first triangle, T

1

, should have 2 1 rows, which it does. Since each triangle T k+1

is made up of three T k

triangles arranged to form a triangle, we can see that triangle T k+1

has twice as many rows as triangle T k

. This means that moving to the next triangle should double the number of rows in the formula, which it does (2(2 k )=2 k+1 ).

Theorem: The number of entries with a one in a row r is given by 2 n , where n is the number of ones in the binary expansion of r.

Proof of Theorem:

For a base case, we will use the first triangle of ones, T

1

. Row 0 has 1 one in the row, and no ones in the expansion (n=0). 2 0 =1. Row 1 has 2 ones in the row, and a one in the binary expansion (n=1).2

1 =2.

Given a row r, if a one is removed from the binary expansion, the new row number is given by r’.

Assume row r’ has some positive integer n ones in its binary expansion. Row r will then have (n + 1) ones in its binary expansion. According to the formula, row r should have twice as many ones in the binary expansion as row r’ (2x2 n =2 n+1 ).

When a one is removed from the binary expansion, the row number is shifted upwards on the triangle by some 2 n rows. Each triangle is of length 2 n , so this movement distance in rows corresponds to the height of some triangle T k

in rows. By simple geometry, we can see that r and r’ will lie on the same relative row in T k

. The only difference now is that the row r’ lies in the top half of T k+1

, and r is in the bottom half of T k+1

. Row r’ is comprised of one T k

triangle and row r is composed of two T k

triangles.

Where n k

is the number of one entries in a given row in T k

,: n k

+ n k

= 2*n k

(# of one entries in r) = 2*(# of one entries in r’)

2 n+1 = 2(2 n )

Download