Combinatorics 16

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

MTL180 - Discrete Mathematical Structures

Lecture 15

Course Instructor : Prof. Biplab Basak

Department of Mathematics
Indian Institute of Technology Delhi

(Maths Dept., IIT Delhi) MTL180 - Discrete Mathematical Structures, Tutorial-1 1 / 11


Generating function
Let a0 , a1 , a2 , . . . be a sequence of real numbers. Then the generating
function f (x ) for the sequence a0 , a1 , a2 , . . . is

f (x ) =
X
an x n .
n=0

Scaling Rule
Let a0 , a1 , a2 , . . . be a sequence of real numbers. If a0 , a1 , a2 , . . . gives a
generating function f (x ) then ca0 , ca1 , ca2 , . . . gives the generating
function cf (x ), for c ∈ R.

Addition Rule
If a0 , a1 , a2 , . . . give a generating function f (x ) and b0 , b1 , b2 , . . . give a
generating function g(x ) then a0 + b0 , a1 + b1 , a2 + b2 , . . . give the
generating function f (x ) + g(x ).

(Maths Dept., IIT Delhi) MTL180 - Discrete Mathematical Structures, Tutorial-1 2 / 11


Right Shifting Rule
If a0 , a1 , a2 , . . . give a generating function f (x ) then
0, 0, . . . , 0, a0 , a1 , a2 , . . . give a generating function x k f (x ).
| {z }
k times

Derivative Rule
If a0 , a1 , a2 , a3 , . . . give a generating function f (x ) then a1 , 2a2 , 3a3 . . .
give a generating function f ′ (x ).

Problem 1
Find the number of solutions to x1 + x2 + x3 + x4 = 17, where
0 ≤ x1 ≤ 2, 0 ≤ x2 ≤ 5, 0 ≤ x3 ≤ 5 and 2 ≤ x4 ≤ 6.

Solution:
Consider the function f (x ) = (1 + x + x 2 )(1 + x + x 2 + x 3 + x 4 +
x 5 )(1 + x + x 2 + x 3 + x 4 + x 5 )(x 2 + x 3 + x 4 + x 5 + x 6 ).

(Maths Dept., IIT Delhi) MTL180 - Discrete Mathematical Structures, Tutorial-1 3 / 11


The coefficient of x 17 will be the number of ways to choose one term
from each factor so that the exponents of the terms add up to 17.
This is precisely the number of solutions to the given equation.
Here f (x ) = x 2 + 4x 3 + 10x 4 + 19x 5 + · · · + 4x 17 + x 18 .
Since the coefficient of x 17 is 4, the number of solution is 4.

Problem 2
Find the number of solutions to x1 + x2 + x3 = 11, where x1 , x2 , x3 are non
negative integers such that x1 is odd, x2 is even, and x3 is unrestricted.

Solution:
Consider the function f (x ) = (x + x 3 + x 5 + x 7 + x 9 + x 11 + · · · )(1 +
x 2 + x 4 + x 6 + x 8 + x 10 + · · · )(1 + x + x 2 + x 3 + x 4 + · · · ).
Since we need coefficient of x 11 , we can consider the function
f (x ) = (x + x 3 + x 5 + x 7 + x 9 + x 11 )(1 + x 2 + x 4 + x 6 + x 8 +
x 10 )(1 + x + x 2 + x 3 + x 4 + · · · + x 11 )

(Maths Dept., IIT Delhi) MTL180 - Discrete Mathematical Structures, Tutorial-1 4 / 11


Thus, f (x ) =
x + x 2 + 3x 3 + 3x 4 + 6x 5 + 6x 6 + 10x 7 + 10x 8 + 15x 9 + 15x 10 + 21x 11 .
Thus the number of solution is 21.
One can check the multiplication from
https://www.whitman.edu/mathematics/cgt_online/sage/expand_
gen_fn_sage.html
f=(x+xˆ3+xˆ5+xˆ7+xˆ9+xˆ11)*(1+xˆ2+xˆ4+xˆ6+xˆ8+xˆ10+
xˆ12)/(1-x)
show(taylor(f,x,0,11))

Problem 3
Find the coefficient of x 17 in the expansion of (1 + x 5 + x 7 )20 .

Solution:
The only way to form an x 17 term is to gather two x 5 and one x 7 .

(Maths Dept., IIT Delhi) MTL180 - Discrete Mathematical Structures, Tutorial-1 5 / 11


Since there are 20
2 = 190 to choose two x from the 20
5


multiplicands and 18 ways to choose one x 7 from the remaining 18


multiplicands, the answer is 190 × 18 = 3420 .

Problem 4
How many integer solutions to the equation a + b + c = 6 satisfy
−1 ≤ a ≤ 2 and 1 ≤ b, c ≤ 4?

Solution:
Since −1 ≤ a ≤ 2, the variable a contributes a term
x −1 + x 0 + x 1 + x 2 to the generating function.
Similarly, each of b and c contributes a term x 1 + x 2 + x 3 + x 4 .
Hence the generating function is
f (x ) = (x −1 + x 0 + x 1 + x 2 )(x 1 + x 2 + x 3 + x 4 )2 = x (1 + x + x 2 + x 3 )3 .
Thus, f (x ) = x + 3x 2 + 6x 3 + 10x 4 + 12x 5 + 12x 6 + · · · .
The number of solutions is 12.

(Maths Dept., IIT Delhi) MTL180 - Discrete Mathematical Structures, Tutorial-1 6 / 11


Problem 5
In the USA, there are coins of denominations 1, 5, 10, 25, 50 cents and
$1. In how many different ways can we make up $1 (i.e. 100 cents) from
these coins?
Solution:
The 1 cent may contribute a sum of 1, 2, 3, . . . cents, thus leading to
the factor 1 + x + x 2 + · · · .
The 5 cents may contribute a sum of 5, 10, 15, . . . cents, thus
leading to the factor 1 + x 5 + x 10 + · · · .
Using the same idea for the 10, 25, 50 and 100 coins, the generating
function is given by
f (x ) = (1 + x + x 2 + · · · )(1 + x 5 + x 10 + · · · )(1 + x 10 + x 20 +
· · · )(1 + x 25 + x 50 + · · · )(1 + x 50 + x 100 + · · · )(1 + x 100 + x 200 + · · · ).
f (x ) = 1
1−x · 1
· 1 · 1 · 1 · 1 .
1−x 5 1−x 10 1−x 25 1−x 50 1−x 100
f (x ) = 1 + x + x 2 + · · · + 252x 99 + 293x 100 + · · ·
The number of solutions is 293.
(Maths Dept., IIT Delhi) MTL180 - Discrete Mathematical Structures, Tutorial-1 7 / 11
Partition of positive integers
A partition of a positive integer n is a multiset of positive integers that
sum to n. We denote the number of partitions of n by pn .

Example
The partitions of 5 are
5
4+1
3+2
3 + 1 + 1,
2+2+1
2+1+1+1
1 + 1 + 1 + 1 + 1.
Thus p5 = 7.

(Maths Dept., IIT Delhi) MTL180 - Discrete Mathematical Structures, Tutorial-1 8 / 11


Problem
Find the generating function for pn .

Solution:
A partition is uniquely described by the number of 1s, number of 2s,
and so on and their sum is n.
Thus, f (x ) = (1 + x + x 2 + x 3 + · · · )(1 + x 2 + x 4 + x 6 + · · · ) · · · (1 +
x k + x 2k + x 3k + · · · ) · · · .
For example, if we pick x 3 from the first factor, x 3 from the third
factor, x 15 from the fifth factor, and 1s from all other factors, we get
x 21 . In the context of the product, this represents 3 · 1 + 1 · 3 + 3 · 5,
corresponding to the partition 1 + 1 + 1 + 3 + 5 + 5 + 5 of 21, that is,
three 1s, one 3, and three 5s.
Q∞
Thus, f (x ) = n=1 1−x n .
1

pn is the coefficient of x n in f (x ).

(Maths Dept., IIT Delhi) MTL180 - Discrete Mathematical Structures, Tutorial-1 9 / 11


Problem
Find p8 .

Solution:
Q∞
The generating function if f (x ) = n=1 1−x n .
1

Since we need the coefficient of x 8 , it is sufficient to consider the


function f (x ) = (1 + x + x 2 + · · · + x 8 )(1 + x 2 + x 4 + x 6 + x 8 )(1 +
x 3 + x 6 )(1 + x 4 + x 8 )(1 + x 5 )(1 + x 6 )(1 + x 7 )(1 + x 8 ) =
1 + x + 2x 2 + 3x 3 + 5x 4 + 7x 5 + 11x 6 + 15x 7 + 22x 8 + · · · + x 56 .
Thus p8 = 22.

Theorem
Let pd (n) be the number of partitions of n into distinct parts. Let po (n)
be the number of partitions into odd parts. Then pd (n) = po (n).

(Maths Dept., IIT Delhi) MTL180 - Discrete Mathematical Structures, Tutorial-1 10 / 11


Solution:
The generating function for pd (n) is
f (x ) = (1 + x )(1 + x 2 )(1 + x 3 ) · · · = ∞
n=1 (1 + x ).
n
Q

The generating function for po (n) is


g(x ) = (1 + x + x 2 + x 3 + · · · )(1 + x 3 + x 6 + x 9 + · · · ) · · · (1 +
x 2k−1 + x 4k−2 + x 6k−3 + · · · ) · · · = ∞n=1 1−x 2n−1 .
1
Q

1−x 2 1−x 4 1−x 6 1−x 8


f (x ) = (1 + x )(1 + x 2 )(1 + x 3 ) · · · = 1−x · 1−x 2
· 1−x 3
· 1−x 4
···
Observe that every numerator is eventually canceled by a
denominator, leaving only the denominators containing odd powers of
x.
Thus,

1
f (x ) = = g(x ).
Y

n=1
1 − x 2n−1
Therefore, pd (n) = po (n).

(Maths Dept., IIT Delhi) MTL180 - Discrete Mathematical Structures, Tutorial-1 11 / 11

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy