Practical Combinatorics
Practical Combinatorics
M.Sc.-I (Mathematics)
MTS- 415(C) – Combinatorics: Practical Course
======================================================
Practical-1
Two Basic Counting Principles, Simple Arrangements and Selections
1. Given 10 different English books, six different French books, and four different German
books,
(a) How many ways are there to select one book?
(b) How many ways are there to select three books, one of each language?
(c) How many ways are there to make a row of three books in which exactly one
language is missing (the order of the three books makes a difference)?
2. How many ways are there to pick two different cards from a standard 52-card deck such that,
(a) The first card is an Ace and the second card is not a Queen?
(b) The first card is a spade and the second card is not a Queen?
3. How many integers between 1,000 and 10,000 are there with (make sure to avoid sequences of
digits with leading 0s):
(a) Distinct digits?
(b) Repetition of digits allowed but with no 2 or 4?
(c) Distinct digits and at least one of 2 and 4 must appear?
4. If two different integers between 1 and 100 inclusive are chosen at random, what is the
probability that the difference of the two numbers is 15?
5. How many ways are there to seat six different boys and six different girls along one side of a
long table with 12 seats? How many ways if boys and girls alternate seats?
6. How many ways can a committee be formed from four men and six women with
(a) At least two men and at least twice as many women as men?
(b) Between three and five people, and Ms. Wonder is excluded?
(c) Five people, and not all of the three O’Hara sisters can be on the committee?
(d) Four members, at least two of whom are women, and Mr. and Mrs. Baggins cannot both be
chosen?
7. How many subsets of 3 different integers between 1 and 90 inclusive are there whose sum is
(a) An even number?
(b) Divisible by 3?
(c) Divisible by 4?
********************************* ************************************
MTS- 415(C) – Combinatorics: Practical Course
Practical-2
Binomial Identities
1
1. Show that 𝐶(2𝑛, 𝑛) + 𝐶(2𝑛, 𝑛 − 1) = 2 𝐶(2𝑛 + 2 𝑛 + 1).
2𝑛 𝑛 𝑛+𝑟−1 𝑛
(a) ( 2 ) = 2( 2 ) + 𝑛2 (b) (𝑛 − 𝑟)( 𝑟
)( 𝑟 ) = 𝑛(𝑛+𝑟−1
2𝑟
)(2𝑟
𝑟
).
(b) Evaluate ∑𝑛
𝑘=0(2 + 3𝑘)
2
(c) Evaluate ∑𝑛
𝑘=0 𝑘(𝑛 − 𝑘).
𝑘 𝑛+1 𝑚
4. Show that∑𝑛
𝑘=𝑚( 𝑟 ) = ( 𝑟+1 ) − (𝑟+1).
𝑃(𝑚+𝑛,𝑚+1)
5. Show that∑𝑛−1
𝑘=0 𝑃(𝑚 + 𝑘, 𝑚) = .
𝑚+1
2
6. Show that [(𝑛0) + (𝑛1) + (𝑛2) + ⋯ + (𝑛𝑛)] = ∑2𝑛 2𝑛
𝑘=0( 𝑘 ).
𝑚!(𝑛−𝑘)! 𝑛+1
7. Show that ∑𝑚
𝑘=0 𝑛!(𝑚−𝑘)! = 𝑛−𝑚+1 , 𝑚 ≤ 𝑛.
a) ∑ 𝑃(𝑛; 𝑖1 , 𝑖2 , … , 𝑖𝑘 ) = 𝑘 𝑛
************************************ **************************************
MTS- 415(C) – Combinatorics: Practical Course
Practical-4
Generating Functions
1. Build a generating function for 𝑎𝑟 , the number of integer solutions to the following equations:
(a) 𝑒1 + 𝑒2 + 𝑒3 + 𝑒4 + 𝑒5 = 𝑟, 0 ≤ 𝑒𝑖 ≤ 5
(b) 𝑒1 + 𝑒2 + 𝑒3 = 𝑟, 0 ≤ 𝑒𝑖 ≤ 6
(c) 𝑒1 + 𝑒2 + 𝑒3 + 𝑒4 = 𝑟, 2 ≤ 𝑒𝑖 ≤ 7, 𝑒1 even, 𝑒2 odd
(d) 𝑒1 + 𝑒2 + 𝑒3 + 𝑒4 = 𝑟, 0 ≤ 𝑒𝑖
(e) 𝑒1 + 𝑒2 + 𝑒3 + 𝑒4 = 𝑟, 0 < 𝑒𝑖 , 𝑒2 , 𝑒4 odd, 𝑒4 ≤ 3.
2. Build a generating function for𝑎𝑟 , the number of 𝑟 selections from
(a) Five red, five black, and four white balls
(b) Five jelly beans, five licorice sticks, eight lollipops with at least one of each type of candy
(c) Unlimited amounts of pennies, nickels, dimes, and quarters
(d) Six types of lightbulbs with an odd number of the first and second types.
3. Find a generating function for 𝑎𝑟 , the number of ways to distribute 𝑟 identical objects into 𝑞
distinct boxes with an odd number between 𝑟1 and 𝑠1 in the first box, an even number between
𝑟2 and 𝑠2 in the second box, and at most three in the other boxes. Note that 𝑟1 and 𝑠1 are
assumed to be odd numbers;𝑟2 and 𝑠2 are assumed to be even numbers.
4. Find a generating function for the number of integers between 0 and 999,999 whose sum of
digits is 𝑟.
5. Find a generating function for 𝑎𝑟 , the number of ways a roll of six distinct dice can show a sum
of 𝑟 if
(a) The first three dice are odd and the second three even
(b) The 𝑖th die does not show a value of 𝑖.
6. Find a generating function 𝑔(𝑥, 𝑦) whose coefficient of 𝑥 𝑟 𝑦 𝑠 is the number of ways to
distribute 𝑟 chocolate bars and 𝑠 lollipops among five children such that no child gets more
than three lollipops.
𝑟 𝑟 𝑟 𝑟
7. Find a generating function (𝑥1 , 𝑥2 , 𝑥3 , … , 𝑥𝑚 )whose coefficient of 𝑥11 𝑥22 𝑥33 … 𝑥𝑚𝑚 is the
number of ways 𝑛 people can pick a total of 𝑟1 chairs of type 1, 𝑟2 chairs of type 2,...,𝑟𝑚 chairs
of type 𝑚 if
(a) Each person picks one chair
(b) Each person picks either two chairs of one type or no chairs at all
(c) Person 𝑖 picks up to 𝑖 chairs of exactly one type.
************************************ *************************************
MTS- 415(C) – Combinatorics: Practical Course
Practical-5
4. Use generating functions to find the number of ways to select 10 balls from a large pile of red,
white, and blue balls if
(a) The selection has at least two balls of each colour
(b) The selection has at most two red balls
(c) The selection has an even number of blue balls.
5. How many ways are there to split six copies of one book, seven copies of a second book, and
11 copies of a third book between two teachers if each teacher gets 12 books and each teacher
gets at least two copies of each book?
m n m+n
6. Use generating functions to show that∑rk=0( k )(r−k) = ( r ).
𝑛 𝑘+5 𝑛−𝑘
2
7. Evaluate a)∑𝑘=n
1
( 𝑘 )b)∑𝑚
𝑘=0(𝑚−𝑘 ).
8. Suppose a red die is rolled once and then a green die is rolled as many times as the value on the
red die. If 𝑎𝑟 is the number of ways that the (variable length) sequence of rolls of the green die
can sum to 𝑟, show that the generating function for 𝑎𝑟 is 𝑓(𝑓(𝑥)), where 𝑓(𝑥) = (𝑥 + 𝑥 2 +
𝑥 3 + 𝑥 4 + 𝑥 5 + 𝑥 6 ).
************************************* ************************************
MTS- 415(C) – Combinatorics: Practical Course
Practical-6
Partitions
Practical-8
1. Find a recurrence relation for the number an of binary sequences oflength n that do not contain
the pattern 11.
2. Find a recurrence relation for the number an of ternary sequences oflength n that contain 2
consecutive digits that are the same. What arethe initial conditions? Find a6 .
3. [Rabbits and the Fibonacci Number]
[This problem posed by Fibonacci (Leonordo Pisano) in 13th century]
A young pair of rabbits (one of each sex) is placed in an island. A pair of rabbitsdoes not breed
until they are two months old, after 2 months, each pair of rabbitsproduces another pair each
month. Find a recurrence relation for the number ofpairs of rabbits on the island after n months,
assuming that no rabbits ever die.
4. Find the recurrence relation and give initial conditions for the number of bitstrings of length n
that do not have two consecutive 0’s. How many such bitstrings are there of length 5?
5. (a) Find a recurrence relation for the number of ways to go n kilometersby foot walking at
3 km/hr or jogging at 6 km/hr or runningat 10 km/hr; at the end of the hour a choice is made
of how to gonext hour.
(b) How many ways are there to go 12 kilometers?
6. Let {an} be a sequence that satisfies the recurrence relation an = an-1 – an-2 for
n = 2, 3, 4, . . . and suppose that a0 = 3 and a1 = 5. What are a2 and a3 ?
7. Derive the recurrence relation for the number of subsets of n element set.
8. Determine whether the sequence {an} where an = 3n for every non negative integer
n, is a solution of the recurrence relation an = 2an-1 – an-2 for n = 2, 3, 4, ….
Answer the same question where an = 2n and an = 5.
************************************** ***********************************
MTS- 415(C) – Combinatorics: Practical Course
Practical-9
1. Find recurrence relation for the number of regionsinto which the plane divided by n lines, if no two
of the lines are parallel and no three of the lines gothrough the same point. Also find their solution.
2. Let an = 2n + 5.3n for n = 0, 1, 2, . . .
4. Solve the following recurrence relations assuming that n is a power of 2 ( leaving a constant A to be
determined)
(a) an = 2an/2 + 5
(b) an = 2an/4 + n
(c) an = 2an/2 + 2n - 1
(d) an = 3an/3 + 4
(e) an = 16an/2 + 5n
5. Find and solve the recurrence relations for the number of matches played in a tournament with n
players, where n is a power of 2.
6. a) Use divide-and-conquer approach to divise a procedure to find the largest number in a set
of n distinct integers.
b) Give recurrence relation for the number of comparisons performed by your procedure.
c) Solve the recurrence relation obtained in part (b).
************************************** ************************************
MTS- 415(C) – Combinatorics: Practical Course
Practical-10
1. Given that a0 = 0, a1 = 1, a2 = 4, and a3 = 12 satisfy the recurrence relation ar + C1 ar-1 +C2 ar-2 = 0.
Determine ar.
2. Solve the recurrence relation for the Fibonacci sequence ar = ar-1+ ar-2.
4. Solve the recurrence relation 2ar = 7ar-1 – 3ar-2 with initial conditions a0 = 1,a1 = 1.
5. Solve the recurrence relation ar – 4ar-1 – 11 ar-2 + 30 ar-3 = 0 for r 3.
6. Solve the recurrence relation ar–12 ar-2 + 16 ar-3 = 0 forr 3 and a0 = 4, a1 = – 8,a2 = – 12.
7. Solve the recurrence relation an+1 = 2an + an-1 for n ≥ 2 with initial conditions a1 = 3, a2 = 7.
8. Solve the following homogeneous recurrence relations :-
(a) an = 3an-1 + 4an-2for n 2; a0 = a1 = 1
(b)an − 7an-1 + 10an-2 = 0 ; a0 = 4, a1 = 17.
(c) an − 6an-1 + 25an-2 = 0 for n 3; a1 = 1, a2 = 0.
******************************** ************************************
MTS- 415(C) – Combinatorics: Practical Course
Practical-11
************************************* ************************************
MTS- 415(C) – Combinatorics: Practical Course
Practical-12
1. How many 8-letter “words” using the 26-letter alphabet (letters can repeated) either begin or
end with a vowel?
2. How many n-digits ternary sequences are there in which at least one pair of consecutive digits
are the same?
3. What is te probability that a 7-card hand has at least one pair (possibly two pairs, three of a
kind, full house, or four of a kind)?
4. How many 5-digit numbers(including leading 0s) are there with exactly one 8 and no digit
appearing exactly three time s?
5. Among 700 families, 150 families have no children, 180 have only boys, and 200 have only
girls. How many families have boy(s) and girls(s)?
6. Suppose a bookcase has 300 books, 70 in French and 100 about mathematics. How many non-
French books not about mathematics are there if
(a) There are 40 French mathematics books?
(b) There are 60 French nonmathematics books?
7. If you pick an integer between 1 and 1000, what is the probability that it is either divisible by 7
or even (or both)?
8. How many numbers between 1 and 30 are relatively prime to 30?
9. How many numbers between 1 and 280 are relatively prime to 280?
******************************** ************************************
MTS- 415(C) – Combinatorics: Practical Course
Practical-13
Inclusion-Exclusion Formula
************************************** ************************************
MTS- 415(C) – Combinatorics: Practical Course
Practical-14
1. Describe the associated chessboard of darkened squares for finding all derangements of 1, 21,
3, 4, 5.
2. A computer dating service wants to match four women each with one of five men. If women 1
is incompatible with men 3 and 5; women 2 is incompatible with men 1 and 2: women 3 is
incompatible with men 4 ; and women 4 is incompatible with men 2 and 4, how many matches
of the four women are there?
3. Calculate the number of words that can be formed by rearranging the letters EERRIE so that no
letters appears at one of its original positions-for example, no E as the first, second or sixth
letter.
4. Find the rook polynomial for a full n x n board.
5. Find two different chessboards (not row or column rearrangements of one another) that have
the same rook polynomial.
************************************ ************************************
MTS- 415(C) – Combinatorics: Practical Course
Practical-15