Counting II: Fundamental Forms and Types

Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

15-251: Spring 2013, Lecture 6 Great Theoretical Ideas in Computer Science

Correspondence Principle

Counting II: Fundamental Forms and Types

If two finite sets can be placed into 1-1 onto correspondence, then they have the same size.

)(

) = ?

Choice Tree

A choice tree is a rooted, directed tree with an object called a choice associated with each edge and a label on each leaf.

A choice tree provides a choice tree representation of a set S, if 1)! Each leaf label is in S 2)!No two leaves have the same label.

How many shortest routes from A to B? A

Reversibility: From each object we should be able to deduce the choices that were made to create it.

How many shortest routes from A to B? A

Symmetry In The Formula

" 14 ! $6# % &


B
A route is any sequence containing 6 Ds and 8 Rs Reversible?

n! n n = = r r!(n-r)! n-r
# of ways to pick r out of n elements = # of ways to choose the (n-r) elements to omit

Permutations vs. Combinations


Subsets of r out of n distinct objects

Storing 5 card Hands How many bits per hand?


I want to store a 5 card poker hand using the smallest number of bits (space efficient). Nave scheme: 2 bits for suit, 4 bits for a rank, and hence 6 bits per card 30 bits per hand

n! (n-r)!
Ordered

n! n = r!(n-r)! r
Unordered

Total:

How can I do better?

How can we store a 5 card hand without storing its order?

Order the 2,598,560 Poker hands lexicographically [or in any fixed manner]
To store a hand all I need is to store its index of size !log(2,598,560) "=22 bits. Hand 0000000000000000000000 Hand 0000000000000000000001 Hand 0000000000000000000010 . . .

22 Bits Is OPTIMAL
221 < 2,598,560 There are more poker hands than there are 21 bit strings. Hence, you cant have a string for each hand.

An n-element set can be stored so that each element uses !log2(n) " bits.
Furthermore, any representation of the set will have some strings of that length.

Information Counting Principle: If each element of a set can be represented using k bits, the size of the set is bounded by 2k

POLYNOMIALS EXPRESS CHOICES AND OUTCOMES Products of Sum = Sums of Products

+ +

+ +

)(
+

+ +

) =
+

b1 t1 t2

b2 t1 t2

b3 t1 t2

b1 t1 t2

b2 t1 t2

b3 t1 t2

b 1 t1 b 1 t2

b 2 t1 b 2 t2 b 3 t1 b 3 t2

(b1 + b2 + b3)(t1 + t2) =

b1 t1 t2

b2 t1 t2

b3 t1 t2

b1 t1 t2

b2 t1 t2

b3 t1 t2

b 1 t1 b 1 t2

b 2 t1 b 2 t2 b 3 t1 b 3 t2

b 1 t1 b 1 t2

b 2 t1 b 2 t2 b 3 t1 b 3 t2

(b1 + b2 + b3)(t1 + t2) = b1t1 +

(b1 + b2 + b3)(t1 + t2) = b1t1 + b1t2 +

b1 t1 t2

b2 t1 t2

b3 t1 t2

b1 t1 t2

b2 t1 t2

b3 t1 t2

b 1 t1 b 1 t2

b 2 t1 b 2 t2 b 3 t1 b 3 t2

b 1 t1 b 1 t2

b 2 t1 b 2 t2 b 3 t1 b 3 t2

(b1 + b2 + b3)(t1 + t2) = b1t1 + b1t2 + b2t1 +

(b1 + b2 + b3)(t1 + t2) = b1t1 + b1t2 + b2t1 + b2t2 +

b1 t1 t2

b2 t1 t2

b3 t1 t2

b1 t1 t2

b2 t1 t2

b3 t1 t2

b 1 t1 b 1 t2

b 2 t1 b 2 t2 b 3 t1 b 3 t2

b 1 t1 b 1 t2

b 2 t1 b 2 t2 b 3 t1 b 3 t2

(b1 + b2 + b3)(t1 + t2) = b1t1 + b1t2 + b2t1 + b2t2 + b 3t1 +

(b1 + b2 + b3)(t1 + t2) = b1t1 + b1t2 + b2t1 + b2t2 + b 3t1 + b 3t2

There is a correspondence between paths in a choice tree and the cross terms of the product of polynomials!
1

Choice tree for terms of (1+X)3


1 1 X X 1 X

X2

X2

X2

X3

Combine like terms to get 1 + 3X + 3X2 + X3

What is a closed form expression for ck?

What is a closed for expression for cn?

(1 + X) n

n times

(1 + X) n = c 0 + c1 X + c2X2 +. . .+c n Xn

= (1 + X)(1 + X)(1 + X)(1 + X). . . (1 + X)


Before combining like terms, when we multiply things out we get 2n cross terms, i.e., paths in the choice tree. Ck, the coefficient of Xk, is the number of paths with exactly k Xs.

&n # ck = $ $k ! ! % "

The Binomial Formula

The Binomial Formula


(1+X)0 = (1+X)1 = (1+X)2 = (1+X)3 = (1+X)4 = 1 1 + 1X 1 + 2X + 1X2 1 + 3X + 3X2 + 1X3 1 + 4X + 6X2 + 4X3 + 1X4

& n # &n # & n # 2 &n # n (1 + x) n = $ $0! !+$ $1 ! !x + $ $2! !x + ... + $ $n ! !x % " % " % " % "
Binomial Coefficients

binomial expression

The Binomial Formula

The Binomial Formula

& n # &n # & n # 2 &n # n ! $ ! $ ! $ (1 + x) n = $ + x + x + ... + $ 0 ! $ 1 ! $2! $n ! !x % " % " % " % "

!n" k (1 + x ) = ( $ % # x k =0 & k '


n n

& n # & n # 1 n '1 & n # 2 n ' 2 &n # n 0 $ ! !+$ $ ! !x y + $ $ ! !x y + ... + $ $ ! !x y (x + y)n = $ 0 1 2 % " % " % " %n "

One polynomial, two representations

Power Series Representation


n " n# (1 + x)n = ) % & $ x k k =0 ' k ( ! " n# k = ) % &$ x Closed form or k =0 ' k ( Generating form

!n" (1 + x ) = ( $ % # x k k =0 & k '


n n
Product form or Generating form Additive form or Expanded form

!n" Since # $ = 0 if k > n %k &

Power series (Taylor series) expansion

By playing these two representations against each other we obtain a new representation of a previous insight:
n !n" (1 + x ) n = ( $ % # x k k =0 & k '

By varying x, we can discover new identities


n "n# (1 + x ) n = ) % & $ x k k =0 ' k (

Let x= -1.
n "n# 0 = ) % & $ ( !1) k k =0 ' k (

Let x=1.
n !n" 2n = ( $ % k =0 & k ' ! "#

Equivalently,
n k even

The number of subsets of an n-element set

) %k & = ) %k & = 2
' (
k odd

"n#

"n# ' (

n !1

The number of even-sized subsets of an n element set is the same as the number of odd-sized subsets.
n "n# (1 + x ) n = ) % & $ x k k =0 ' k (

n ! n" (1 + x)n = ( $ % # x k k =0 & k '

Let x= -1.
n "n# 0 = ) % & $ ( !1) k k =0 ' k (

Equivalently,
n k even

) %k & = ) %k & = 2
' (
k odd

"n#

"n# ' (

n !1

We could discover new identities by substituting in different numbers for X. One cool idea is to try complex roots of unity, however, the lecture is going in another direction.

n ! n" (1 + x)n = ( $ % # x k k =0 & k '

n k even

( $k % = ( $k % = 2
& '
k odd

"n#

"n# & '

n !1

Proofs that work by manipulating algebraic forms are called algebraic arguments. Proofs that build a 1-1 onto correspondence are called combinatorial arguments.

Let On be the set of binary strings of length n with an odd number of ones. Let En be the set of binary strings of length n with an even number of ones. We gave an algebraic proof that |On | = | En |

A Combinatorial Proof
Let On be the set of binary strings of length n with an odd number of ones. Let En be the set of binary strings of length n with an even number of ones. A combinatorial proof must construct a one-toone correspondence between On and En

An attempt at a correspondence
Let fn be the function that takes an n-bit string and flips all its bits. fn is clearly a one-to-one and onto function
for odd n. E.g. in f7 we have 0010011 ! 1101100 1001101 ! 0110010

...but do even n work? In f6 we have 110011 ! 001100 101010 ! 010101 Uh oh. Complementing maps evens to evens!

A correspondence that works for all n Let fn be the function that takes an n-bit string and flips only the first bit. For example, 0010011 ! 1010011 1001101 ! 0001101 110011 ! 010011 101010 ! 001010

n ! n" (1 + x)n = ( $ % # x k k =0 & k '

The binomial coefficients have so many representations that many fundamental mathematical identities emerge

The Binomial Formula


(1+X)0 = (1+X)1 = (1+X)2 = (1+X)3 = (1+X)4 = 1 1 + 1X 1 + 2X + 1X2 1 + 3X + 3X2 + 1X3 1 + 4X + 6X2 + 4X3 + 1X4

Pascals Triangle: kth row are the coefficients of (1+X)k (1+X)0 = (1+X)1 = (1+X)2 = (1+X)3 = (1+X)4 = 1 1 + 1X 1 + 2X + 1X2 1 + 3X + 3X2 + 1X3 1 + 4X + 6X2 + 4X3 + 1X4

kth Row Of Pascals Triangle:


!n" !n" ! n" ! n" ! n" # $ , # $ , # $ ,..., # $ ,... # $ % 0& % 1& % 2& % k & % n&

Inductive definition of kth entry of nth row: Pascal(n,0) = Pascal (n,n) = 1; Pascal(n,k) = Pascal(n-1,k-1) + Pascal(n-1,k)

(1+X)0 = (1+X)1 = (1+X)2 = (1+X)3 = (1+X)4 =

1 1 + 1X 1 + 2X + 1X2 1 + 3X + 3X2 + 1X3 1 + 4X + 6X2 + 4X3 + 1X4

(1+X)0 = (1+X)1 = (1+X)2 = (1+X)3 = (1+X)4 =

1 1 + 1X 1 + 2X + 1X2 1 + 3X + 3X2 + 1X3 1 + 4X + 6X2 + 4X3 + 1X4

Pascals Triangle

!0" #0$ = 1 % & !1 " !1" #0$ = 1 #1$ = 1 % & % & !2" !2" #1 $ = 2 #2$ = 1 % & % & ! 3" !3" ! 3" #1 $ = 3 #2$ = 3 # 3$ = 1 % & % & % &

Pascals Triangle
It is extraordinary how fertile in properties the 1 1 triangle is. 1 2 1 Everyone can try his 1 3 3 1 hand. 1 4 6 4 1 1 1 1 6 5 15 10 20 10 15 5 6 1 1

!2" #0$ = 1 % & !3" #0$ = 1 % &

Al-Karaji, Baghdad 953-1029


Chu Shin-Chieh 1303 The Precious Mirror of the Four Elements . . . Known in Europe by 1529 Blaise Pascal 1654

Summing The Rows


n !n" 2n = ' # $ k =0 % k &

1 =1 =2 =4 =8 =16 =32 1 1 6 1 5 15 1 4 10 20 1 3 6 10 15 1 2 3 4 5 6 1 1 1 1 1 1

1 1 + 1 1 + 2 + 1 1 + 3 + 3 + 1

1 + 4 + 6 + 4 + 1 1 + 5 + 10 + 10 + 5 + 1

1 + 6 + 15 + 20 + 15 + 6 + 1 =64

6+20+6 = 1+15+15+1

Summing on 1st Avenue


1 1 1 1 1 1 5 6 1 4 10 15 3 6 20 2 3 4 10 15 1 1 1 1 5 1 6 1 1 1 6
n i =k

Summing on kth Avenue


1 1 1 2 3 4 10 15 6 20 3 4 10 15 1 1 1 5 1 6 1
n i =k

( i = ( $1% = $

! i " ! n + 1" n # (n + 1) %= 2 i =k & ' & 2 '


n

1 1 1 5

' # k $ = # k + 1$
% & % &

! i " ! n + 1"

1
=2 =3 1 2 1 =5 =8 1 3 3 1 =13

1 1 1 1 1 1 6 1 1 5 6 1 4 10 15
2

1 2 6 20
2

1 4

2 2

12 32 32 1 10

1 1 5 6 1

4 10 15

6 20

4 10 15

1 5

1 5 1 6 1

15

Al-Karaji Squares
1 1 1 1 1 1 1 1 1 4 10 15 1 5 6 1 2 + 2*1 3 + 2*3 4 + 2*6 20 =0 =1 =4 =9 =16 =25 1=36

All these properties can be proved inductively and algebraically. We will give combinatorial proofs using the Manhattan block walking representation of binomial coefficients.

5 + 2*10 6 + 2*15

How many shortest routes from A to B? A

Manhattan
jth Street 4 3 2 1 0 0 1 kth Avenue 2 3 4

! 10 " #5$ % &

10

Level n

Manhattan

0 kth Avenue 0 . 1 1 2 2 3 3 4 4

Level n

Manhattan 1

0 kth Avenue 0 . 1 2 2 3 3 4 4

level n . . . . . .

. . . . . . . . .1 . 1 . . .1 . 2 . . . 3 .1 .1 4 6
6 5

1 3

kth Avenue
1 4 1

1 5 10 10 15 20 15 6

..... ..... level n . . . . . 1 1 ..... 3 1 ..... 4


1 1 6 5 15 10

1 1 2 3 6 10 20 15 4 5 1 1

kth Avenue

1 1 6

" n # " n ! 1# " n ! 1# $ k % = $ k ! 1% + $ k % & ' & ' & '

..... ..... level n . . . . . 1 1 ..... 3 1 ..... 4


1 1 6 5 15 10

1 1 2 3 6 10 20 15 4 5 1 1

kth Avenue

1 1 6

..... ..... level n . . . . . 1 1 ..... 3 1 ..... 4


1 1 6 5 15 10

1 1 2 3 6 10 20 15 4 5 1 1

kth Avenue

1 1 6

"n# ( $ % = 2n!1 k even & k '

! n " ! 2n " ' # $ =# n $ k =0 % k & % &


n

11

Application (Al-Karaji):
By convention:
n

/i
(empty product = 1)
i =0

= 12 + 22 + 32 + ! + n 2

0! = 1

= (1 ! 0 + 1) + (2 ! 1 + 2) + (3 ! 2 + 3) + ! + ( n( n " 1) + n) = 1 ! 0 + 2 ! 1 + 3 ! 2 + ! + n( n " 1) + / i
i =1 n

!n" # k $ = 1 if k = 0 % & !n" # k $ = 0 if k < 0 or k > n % &

#% 2 & % 3 & % 4 & % 5 & % n & $ % n + 1& = 2 ') * + ) * + ) * + ) * + ! + ) * ( + ) * 2 2 2 2 + 2 ,. + 2 , -+ , + , + , + , % n + 1 & % n + 1 & (2n + 1)( n + 1)n = 2) *+) *= 6 + 3 , + 2 ,

1 + X1 + X2 + X 3 + + Xn-1 + Xn =

Xn+1 - 1 X- 1

Polynomials, and Vector Programs

The Geometric Series

!X1!+ !X2!+ !X3

1 + X1 + X2 + X 3 + + Xn + .. =

1 1-X

1 + X1 + X2 + X 3 + + Xn + .. =

1 1-X

The Infinite Geometric Series

(X-1) ( 1 + X1 + X2 + X 3 + + Xn + ) = X1 + X2 + X 3 + + Xn + Xn+1 + . - 1 - X1 - X2 - X 3 - - Xn-1 Xn - Xn+1 - = 1

12

1 + X1 + X2 + X 3 + + Xn + .. =

1 1-X

1 + aX1 + a2X2 + a3X 3 + + anXn + .. =

1 1 - aX

1 + x + .. ____________________ 1-x | 1 -[1 x] _____ x -[x x2 ] ______ x2 -....

Geometric Series (Linear Form)

Vector Programs
Lets define a (parallel) programming language called VECTOR that operates on possibly infinite vectors of numbers. Each variable V! can be thought of as:

Vector Programs
Let k stand for a scalar constant <k> will stand for the vector <k,0,0,0,> <0> = <0,0,0,0,.> <1> = <1,0,0,0,> V! + T! means to add the vectors position-wise. <4,2,3,> + <5,1,1,.> = <9,3,4,>

< * , * , * , * , *, *, . . . . . . . . . > 0 1 2 3 4 5.........

Vector Programs
RIGHT(V!) means to shift every number in V! one position to the right and to place a 0 in position 0. RIGHT( <1,2,3, > ) = <0,1,2,3,. >

Vector Programs
Example: V! := <6>; V! := RIGHT(V!) + <42>; V! := RIGHT(V!) + <2>; V! := RIGHT(V!) + <13>; Stare V! = <6,0,0,0,..> V! = <42,6,0,0,..> V! = <2,42,6,0,..> V!= <13,2,42,6,.>

V! = < 13, 2, 42, 6, 0, 0, 0, . . . >

13

Vector Programs
Example: V! := <1>; Loop n times: V! := V! + RIGHT(V!); Stare V! = <1,0,0,0,..> V! = <1,1,0,0,..> V! = <1,2,1,0,..> V! = <1,3,3,1,.>

!+1 !X

2 !+ !X

!X3

Vector programs can be implemented by polynomials!

V! = nth row of Pascals triangle.

Programs -----> Polynomials


The vector V! = < a0, a1, a2, . . . > will be represented by the polynomial:

Formal Power Series


The vector V! = < a0, a1, a2, . . . > will be represented by the formal power series:

V! = < a0, a1, a2, . . . >


Example: V! := <1>;

Vector Programs

<0> is represented by <k> is represented by V! + T! is represented by

0 k (PV + PT) (PV X)

PV := 1;

Loop n times: V! := V! + RIGHT(V!);

PV := PV + PV X;

RIGHT(V! ) is represented by

V! = nth row of Pascals triangle.

14

Vector Programs
Example: V! := <1>; Loop n times: V! := V! + RIGHT(V!); PV := 1; Example: V! := <1>;

Vector Programs

PV := PV (1+ X);

Loop n times: V! := V! + RIGHT(V!);

PV = (1+ X)n

V! = nth row of Pascals triangle.

V! = nth row of Pascals triangle.

What is the coefficient of Xk in the expansion of: (1+X+ X 2 + X3 + X4 + .... )n ?

( 1 + X + X2 + X3 + X4 + . . . . )n =
! # n + k " 1$ k 1 = ) % &X n n -1 ( (1 " X ) k =0 '

" n + k ! 1# $ % n 1 & '

What is the coefficient of Xk in the expansion of:


(a0 + a1X + a2X2 + a3X3 + ) ( 1 + X + X2 + X3 + . . . ) = (a0 + a1X + a2X2 + a3X3 + ) / (1 X) ?

(a0 + a1X + a2X2 + a3X3 + ) / (1 X)

" k # i =k ( % ( ai $X k =0 & i =0 '


!

a0 + a1 + a2 + .. + ak

= PREFIXSUM(a0 + a1X + a2X2 + a3X3 + )

15

Lets add an instruction called PREFIXSUM to our VECTOR language. W! := PREFIXSUM(V!) means that the ith position of W contains the sum of all the numbers in V from positions 0 to i.

What does this program output?


V! := 1! ; Loop k times: V! := PREFIXSUM(V!) ;

0 kth Avenue 1 2 3 4

Can you see how PREFIXSUM can be represented by a familiar polynomial expression?

W! := PREFIXSUM(V!) is represented by

PW = PV / (1-X) = PV (1+X+X2+X3+ .. )

Al-Karaji Program
Zero_Ave := PREFIXSUM(<1>); First_Ave := PREFIXSUM(Zero_Ave); Second_Ave :=PREFIXSUM(First_Ave); Output:= First_Ave + 2*RIGHT(Second_Ave)

Al-Karaji Program
Zero_Ave = 1/(1-X); First_Ave = 1/(1-X)2; Second_Ave = 1/(1-X)3; Output = 1/(1-X)2 + 2X/(1-X)3

(1-X)/(1-X)3 + 2X/(1-X)3 OUTPUT! = <1, 4, 9, 25, 36, 49, . > = (1+X)/(1-X)3

16

(1+X)/(1-X)3
Zero_Ave := PREFIXSUM(<1>); First_Ave := PREFIXSUM(Zero_Ave); Second_Ave :=PREFIXSUM(First_Ave); Output:= RIGHT(Second_Ave) + Second_Ave

(1+X)/(1-X)3 outputs <1, 4, 9, ..> X(1+X)/(1-X)3 outputs <0, 1, 4, 9, ..> The kth entry is k2

Second_Ave = <1, 3, 6, 10, 15,. RIGHT(Second_Ave) = <0, 1, 3, 6, 10,.


Output = <1, 4, 9, 16, 25

X(1+X)/(1-X)4 expands to : X(1+X)/(1-X)3 = # k2Xk What does X(1+X)/(1-X)4 do? # Sk Xk where Sk is the sum of the first k squares

Using pirates and gold we found that:

Aha! Thus, if there is an alternative interpretation of the kth coefficient of X(1+X)/ (1-X)4 we would have a new way to get a formula for the sum of the first k squares.

! # n + k " 1$ k 1 = ) % &X n n -1 ( (1 " X ) k =0 '

THUS:
1

(1 & X )

! "k + 3# k = )$ %X 3 ( k =0 '

17

Coefficient of Xk in PV = (X2+X)(1-X)-4 is the sum of the first k squares:

Vector programs -> Polynomials -> Closed form expression

(1 & X )

! "k + 3# k = )$ %X 3 ( k =0 '

Expressions of the form


Finite Polynomial / Finite Polynomial are called Rational Polynomial Expressions. Clearly, these expressions have some deeper interpretation as a programming language.

What about this one? X/(1-X-X2)

! x = F0 x 0 + F1 x1 + F2 x 2 + F3 x 3 + ! = # Fi x i 2 1" x " x i =0

Vector Program I/O


Example: INPUT I!; /* not allowed to alter I! */ V! := I! + 1; Loop n times: V! := V! + RIGHT(V!) + I! ; OUTPUT V!

The action of dividing one polynomial by another can simulate a program to recursively compute Fibonacci numbers.

18

Vector Recurrence Relations


Let P be a vector program that takes input. A vector relation is any statement of the form: V! = P( V! ) If there is a unique V! satisfying the relation, then V! is said to be defined by the relation V! = P( V! ).

Fibonacci Numbers
Recurrence Relation Definition:

F0 = 0, F1 = 1, Fn = Fn !1 + Fn !2 , n > 1
Vector Recurrence Relation Definition: F! = RIGHT( F! + <1> ) + RIGHT( RIGHT( F! ) )

F! = RIGHT( F! + <1> ) + RIGHT( RIGHT( F! ) )

F! = RIGHT( F! + 1 ) + RIGHT( RIGHT( F! ) )

F! = a 0 , a 1

, a 2, a 3, a 4, . . .

F = a 0 + a 1 X + a 2 X2 + a 3 X3 +
RIGHT(F + 1) = (F+1) X

RIGHT(F! +<1>) = 0, a0 + 1, a1, a2, a3,


RIGHT( RIGHT( F! ) )

= 0, 0

, a 0, a 1, a 2, a 3, .

RIGHT( RIGHT( F ) )

F X2

F = (F + 1) X + F X2
F= a 0 + a 1 X + a 2 X2 + a 3 X3 + . . .

F = F X + X + F X2
Solve for F. F - FX - FX2 = X F(1-X-X2) = X F = X/(1-X-X2)

RIGHT(F + 1) = (F+1) X

RIGHT( RIGHT( F ) )

F X2

19

What is the Power Series Expansion of x / (1-x-x2) ?

Since the bottom is quadratic we can factor it. X / (1-X-X2) = X/(1- $X)(1 (-$)-1X) where $ = The Golden Ratio

X (1 $X)(1- (-$-1X)

(1 + aX1 + a2X2 + + anXn + ..) (1 + bX1 + b2X2 + + bnXn + ..) =

1 (1 aX)(1-bX) an+1 bn+1 a- b

#n=0..!

Xn

#n=0..1

Xn

Linear factors on the bottom

Geometric Series (Quadratic Form)

1 (1 $X)(1- (-$-1X)

X (1 $X)(1- (-$-1X)

#n=0.. !

$n+1 (-$-1)n+1 !5

Xn

#n=0.. !

$n+1 (-$-1)n+1 n+1 X !5

Geometric Series (Quadratic Form)

Power Series Expansion of F

20

! x 0 1 2 3 = F x + F x + F x + F x + ! = Fi x i # 0 1 2 3 1 " x " x2 i =0

! x 0 1 2 3 = F x + F x + F x + F x + ! = Fi x i # 0 1 2 3 1 " x " x2 i =0

i " x 1 # i # 1$ $ i % = ! ' ' * % & &x 1 ' x ' x 2 i =0 5 % ( !) & ( )

The ith Fibonacci number is:


"

*
i =0

1 # i # 1$ %! & % & ' 5% ( !) (

$ ' ' )

References
Applied Combinatorics, by Alan Tucker

There is much, much more to be said about how polynomials encode counting questions!

x1 + x2 + x3 + ... + xn "1 + xn = k x1 , x2 , x3,..., xn "1 , xn ! 0


! n + k -1" ! n + k -1" =# $ n %1 $ ' & k '

has # &

integer solutions.

21

You might also like