0% found this document useful (0 votes)
31 views

Chapter 3 Plus

The document discusses permutations and combinations with and without repetition. It defines a permutation as an ordered arrangement of objects from a set, and a combination as an unordered selection of objects from a set. Formulas are provided for calculating the number of k-permutations and k-combinations of a set with n objects, with and without repetition allowed. Examples are included to illustrate different cases such as permutations of indistinguishable objects and distributing indistinguishable items like pennies among children.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views

Chapter 3 Plus

The document discusses permutations and combinations with and without repetition. It defines a permutation as an ordered arrangement of objects from a set, and a combination as an unordered selection of objects from a set. Formulas are provided for calculating the number of k-permutations and k-combinations of a set with n objects, with and without repetition allowed. Examples are included to illustrate different cases such as permutations of indistinguishable objects and distributing indistinguishable items like pennies among children.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

1 Permutations

Suppose S is a set of n distinct objects. A permutation of S is an ordered arrange-


ments of these objects. This is called a list in the text. Thus, for any k, 0 ≤ k ≤ n,
a k-permutation is a length-k list. We denote by P(n, k) to be the number of k-
permutations of a set of n distinct objects. Thus
n!
P(n, k) = (n−k)!
.

1.1 Permutations with repetitions


The number of k-permutations (length-k lists) of a set of n objects with repetition
allowed is nk .
This has been discussed in the class. This is nothing but generating lists with
repetitions.

1.2 Permutations with indistinguishable objects


This is not directly discussed in Chapter 3 of the text. So far we have assumed
that the objects are distinct. We will now consider the case when some elements
may be indistinguishable (not distinct).
Example How many different lists one can make by reordering the letters of the
word JESSEE? (Note that ’JESSEE’ and ’SJESEE’ are two different words
(lists).) We discuss two methods.

First method
We first indicate three Es as E 1 , E 2 , E 3 and two Ss as S1 , S2 . Thus ‘JESSEE’
can be written as ‘JE 1 S1 S2 E 2 E 3 ’. If all the three Es and two Ss are treated as
distinct, we know that the number of permutations of length 6 is 6!. Now note
that ‘JE 1 S1 S2 E 2 E 3 ’ and ‘JE 1 S2 S1 E 2 E 3 ’ are the same. Therefore, the number
lists using the letters of ‘JE 1 SSE 2 E 3 ’ is 6! 1 2 3
2! . Similarly, in ‘JE SSE E ’ reordering
the ‘E 1 , E 2 , E 3 ’ will result in the same list, the number of lists using the letters of
6!
‘JESSEE’ is 3!2! .

Second Method

The word ’JESSEE’ contains 3 Es, 2Ss and one J. We note that 3Es can be
placed among the six positions in C(6, 3) different ways. There are three more

1
positions to be filled once Es are placed. Two of these positions will be oc-
cupied by two Ss. There are C(3, 2) ways to fill in these positions. We are
left with just one position, after 3 Es and 2Ss are placed, which is occupied
by J. The number of ways to place J is C(1, 1). Using the product rule we
can conclude that the number of different odds using the letters of ’JESSEE’
6! 3! 1! 6!
is C(6, 3).C(3, 2).C(1, 1) = 3!3! × 2!1! × 1!0! = 3!2!1! .

Theorem: The number of different permutations of n objects, where there are n1


type 1 similar (indistinguishable) objects, n2 type 2 similar objects, ..., and nt type
t similar (indistinguishable) object, is n1 !n2n!
!.....nt ! .

Distributing Presents (Another version of the above theorem)


We have n distinct gifts to be distributed to k, k ≤ n, children such that child i
gets exactly ni gifts. We assume ∑ti=1 ni = n. The number of ways to distribute n
gifts to k children is n1 !n2n!
!.....nt ! .
Note here that the order of the gifts child i receives is not important.

2 Combinations
A k-combination of elements of a set is an unordered selection of k elements
from the set. When repetitions are not allowed, a k-combination is a size-k subset
of the set. Thus, for any k, 0 ≤ k ≤ n, the number of k-combination of a set of n
elements is

n!
C(n, k) = k!(n−k)! .
Note the identities C(n, k) = P(n,k)
k! , and C(n, k) = C(n, n −k). The Pascal trian-
gle identity C(n + 1, k) = C(n, k − 1) +C(n, k) is very well known, and important.
We can prove these identities analytically by applying the properties of factorial.
We should also be able to prove these identities using combinatorial arguments.
A combinatorial proof of an identity is a proof that uses the counting arguments
to prove that both sides of the identity realize the same number.

2.1 Combinations with repetitions


This topic is not covered in the text.
Consider the following problem, called distribution of money.

2
We have n pennies that we want to distribute to k kids. Each child gets at least
one penny. How many ways can we distribute the money?
Note that the pennies are not distinct. There will be only one way of dis-
tributing n1 pennies to the first kid, n2 pennies to the second kid, and so on where
n1 + n2 + ... + nk = n.
Let us consider the following experiment.

• Line up the pennies, order doesn’t matter; they are all alike
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

• Let the first child pick them from left to right. After a while we stop the kid.
x x x x x x x x x x x x x stop x x x x x x x x x x x x x x x x x
kid 1 gets these coins

• Let the second child picks up pennies, etc.


x x x x x x x x x x x x x stop x x x x x x stop x x x x x x x x x x x

There are three kids. The first kid gets 13 pennies, the second kid gets 6
pennies and the last one gets the remaining 11 pennies.

The distribution of money is determined by specifying where to start with a


new child. The first child always start from position 1. The other k − 1 kids can
enter at position 2, 3, 4, ..., n. This means that there are C(n − 1, k − 1) = n−1
k−1
ways to choose the entry points. Therefore,

Theorem: There are C(n − 1, k − 1) ways to distribute n pennies to k kids with


the condition that each kid gets at least one penny.
Now we would like to relax the condition that each kid gets at least one penny.
Now it is possible that some kid doesn’t receive any penny.
We use the following trick. We borrow one penny from each kid, and then
distribute (n + k) pennies to k kids such that each kid gets at least one penny.

Theorem: There are n+k−1



k−1 ways to distribute n pennies to k kids with no re-
strictions. This is the same as selecting k objects with repetitions where order is
not important.
The above problem can be formulated differently in the following equivalent
one. Let xi , i = 1, 2, ..., k be integer variables. The number of integer solutions to
the equation

3
x1 + x2 + ... + xk = n, xi ≥ 0 ——————–(A)

is the same as the number of ways to distribute n pennies to k kids with no restric-
tions. Consider a solution (α1 , α2 , ...., αk ) where ∑ki=1 αi = n. Moreover αi ≥ 0 ∀i.
This solution corresponds to a solution of distributing n pennies to k kids, with no
restrictions, where kid i gets αi pennies. Similarly, a solution of distributing n pen-
nies to k kids with no restrictions corresponds to a solution to the integral equation
where the value of xi is the number of gifts kid i gets. Thus we can conclude that
the number of integral solutions to equation (A) is C(n + k − 1, k − 1) which is the
same as the number of distributing n pennies to k kids with no restrictions.
What happens when we place the restriction that each kid must receive at least
one penny? This is equivalent to the problem of determining the number of inte-
gral solutions to
x1 + x2 + ... + xk = n, xi ≥ 1 ——————–(B)

In some literature the example of distributing pennies to the kids is replaced


by the example of distributing balls (pennies) to the bins (kids). In this case the
bins are distinct (distinguishable) and balls are similar (indistinguishable).
How do we tie equation (A) with k-combinations of n distinct objects. In
this case, xi denotes the ith distinct objects (bins), and k represents the number of
indistinguishable (unordered) objects (balls) to be selected. Placing a ball in bin
xi indicates that ith object is selected.
Example: Consider the following programming piece

for i= 1 to 100 do
for j= 1 to i do
for k= 1 to j do
print(i*j+k)

How many times the print statement is executed?


Ans: The number of times the print statement is executed is
j 100 i(i+1)
∑100 i 100 i
i=1 ∑ j=1 ∑k=1 1 = ∑i=1 ∑ j=1 j = ∑i=1 2 =??.

There is another way to count this. This count can be converted into placing three
indistinguishable balls into 100 distinguishable bins without any constraints. Let
a, b and c be the bins where three balls are placed, a ≤ b ≤ c. Note that bins need
not be distinct. Since 1 ≤ k ≤ j ≤ i ≤ 100, we assign k = a, j = b and i = c.

4
We can also see that any i, j and k in the code is also a solution to distributing 3
balls to 100 bins. Thus the number of times the print statement will be executed
is exactly the same as placing three balls into 100 bins without restrictions, which
3+100−1 102 102
is 100−1 = 99 = 3 = 102.101.100 3.2.1 times.

We can now summarize permutations and combinations without and with repeti-
tion in the following table.

Type Repetition Allowed? Formula

n!
k-permutations No P(n, k) = (n−k)!

k-permutations Yes nk

n!
k-combinations No C(n, k) = k!(n−k)!

(n+k−1)!
k-combinations Yes C(n + k − 1, n − 1) = (n−1)!k!

5
Example: Consider the set {a, b, c, d}. Suppose we select two letter from these
four. We now have the following four cases.
A. Permutations with repetitions: In this case there are 42 = 16 possible cases.

B. Permutations without repetitions: In this there are P(4, 2) = 12 possible per-


mutations.

C. Combinations with repetitions: There are C(2 + 4 − 1, 4 − 1) = 10 possible


combinations.

6
D. Combinations without repetitions: There are C(4, 2) = 6 possible combina-
tions.

Test bank of problems

1. ***Find the number of bit strings of length 100

(a) that begin with 1 and end with 0.


(b) that begin with 1 or end with 0.
(c) that have exactly 20 locations with 1s.
(d) that have exactly 20 locations with 1s and none of these 1s are adjacent
to each other.

2. ***Ten points are placed on the circumference (boundary) of a circle, and


all the chords connecting these points are drawn. What is the largest number
of intersection of these chords?
{ Any four points determine a pair of chords that intersect.}

3. ***How many ways can the 11 distinct horses be lined up in a row?

7
4. ***How many ways can the 11 distinct horses be lined up in a cycle?
Note that (in case of 3 horses) < a, b, c > order is the same as < b, c, a >
and < c, a, b >. In this case, there is no position 1, position 2 or position 3.
The correct answer is 11!
11 which is 10!.

5. ***How many ways can the 11 identical horses on a cycle be painted so


that three are brown, three are white and five are black?

6. ***Find the number of lists (permutations) of the word

(a) the word SASKATCHEWAN


(b) the word BATTERED
(c) the word COEFFICIENT
(d) the word BHATTACHARYYA

7. ***You have 50 books (25 computer science books, 15 mathematics books


and 10 engineering books). All books are different. In how many ways can
you:

(a) put 50 books in a row on one shelf?


(b) put 50 books in a row on three shelves, each shelf containing at least
one book.
{Hint: Each permutation of 30 books can be split into three parts in
29
2 . }
(c) put 50 books in a row on three shelves such that one shelf contains CS
books only, another self contains math books only, and the remaining
self contains engineering books only.
(d) get bunch (subset) of 7 CS books and 5 engineering books to a friend.

8. ***Make up a word problem in English whose answer is

(a) 25 10

7 × 3 .
(b) 2n .
(c) 2n − 2.

9. ***Let S = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0}. Find the number of subsets of S that


contain:

8
(a) both 4 and 8.
(b) neither 4 nor 8.
(c) either 3 or 4 or both.
(d) no odd numbers.
(e) exactly 4 elements, one of which is 0.
(f) exactly five elements including, the sum of which is even.
10. ***Let A be the set of all words of length 6 of letters of the alphabet with
no repeated letters (counting lists).
(a) How many elements of A has exactly one vowel?
(b) How many elements of A that begins and ends with a vowel.
11. ***Use binomial theorem to prove the following:
10
(a) ∑10
i=0 i = 2 .
10

100 100 
(b) ∑50
i=0 2i = ∑ 50
i=1 2i−1 .

12. ***Find:
(a) the coefficient of x9 y3 in the expansion of (4x − 2y)12 .
(b) the coefficient of x5 in (2 + x2 )9 .
(c) the coefficient of x3 y4 z2 in the expansion of (x + y + z)10 .
(d) largest coefficient in the expansion of (1 + x)8 .
(e) largest coefficient in the expansion of (1 + x)9 .
13. Determine the number of integer solutions to the following:
(a) equation x1 + x2 + x3 = 6, xi ≥ 0, 1 ≤ i ≤ 3.
(b) equation x1 + x2 + x3 + x4 + x5 = 15, xi ≥ 0, 1 ≤ i ≤ 5.
(c) equations x1 + x2 + x3 = 6 and x1 + x2 + x3 + x4 + x5 = 15, xi ≥ 0, 1 ≤
i ≤ 5.

Answer: For x1 + x2 + x3 = 6 there are 3+6−1 = 82 nonnegative


 
3−1
integer solutions. With x1 +x2 +x3 = 6 and x1 +x2 +x3 +x4 +x5 = 15,
the number of nonnegative integer solutions for x4 + x5 = 9 is 2+9−1

2−1 .
8 10
The number of solutions for the pair of equations is 6 × 1 .

9
(d) equations x1 + x2 + x3 ≤ 6 and x1 + x2 + x3 + x4 + x5 ≤ 15, xi ≥ 0, 1 ≤
i ≤ 5.

Answer: Let 0 ≤ k ≤ 6. For x1 + x2 + x3 = k, there are 3+k−1



3−1 =
k+2
2 solutions. To solve x4 + x5 ≤ 15 − k, consider x4 + x5 + y =
15 − k, x4 , x5 , y ≥ 0. There are 3+15−k−1 17−k

3−1 = 2 solutions. The
6 k+2 17−k
total number of solutions is ∑k=0 2 × 2 .

14. ***Four connecting rooms are to be painted with k district colors so that no
two adjacent rooms have the same color. Room A is connected to room B
(by door 1) and room C (by door 2). Room B is connected to room C (by
door 3). Room C is connected to room D by door 4. How many ways can
one paint the rooms so that no two adjacent rooms (shared by a door) cave
the same colour.

{ Let Di be the painting schemes if the wall containing door i is removed.


Di ∩ D j is set of the painting schemes coloring the rooms if the walls con-
taining i and j are removed. We can define similarly Di ∩ D j ∩ Dk and
Di ∩ D j ∩ Dk ∩ Dl . Note that when all 4 walls containing doors are removed,
there are only k ways to paint one room. If there is no constraint on colors
of adjacent rooms, k4 different ways we can paint four rooms. }

15. Some questions from a past midterm.

(a) (10 points) Consider selecting 4 objects from the set A = {1, 2, 3, 4, 5, 6, 7, 8}.
i. How many ordered sequences without repetition can be chosen
from A? ans= P(8,4)
ii. How many ordered sequences with repetition can be chosen from
A? ans= 84 ; there are 8 choices for each position.

10
iii. How many unordered sequences without repetition can be chosen
from A? ans= C(8,4)
iv. How many unordered sequences with repetition can be chosen
from A? 8+4−1

8−1 ; this r-combinations with repetitions.
v. How many strictly increasing sequences can be chosen from A?
{ < 2, 4, 4, 7 > is not a strictly increasing sequence.}
It is the same as the number of 4−combinations without repe-
titions, since every such 4−element combination, there is only
one strictly increasing sequence. Hence the answer is C(8,4).
(b) (10 points) Consider a eight letter word aeemrryt.
i. How many different arrangements of these seven letters are there?
8!
no constraint: 2!2!
ii. How many such arrangements are there that contain eye?
Arrangements with eye: use {eye, a, r, m, r,t} : 6!
2!
iii. How many such arrangements are there that contain eye and ram?
Arrangements with eye and ram: use {ram, eye, r,t} : 4!
iv. How many such arrangements are there that do not contain either
eye or ram?
8!
Arrangements with neither eye nor ram = 2!2! − 6! 6!
2! − 2! + 4!
(c) (10 points) Suppose you are interested in buying pizzas, and each pizza
gets up to 10 distinct toppings.
i. How many ways can you choose toppings for a pizza?
There are 210 different pizzas.
ii. How many ways can you choose two pizzas with the same top-
pings?
It is the same as the number of different pizzas. The answer
is 210 .
iii. How many ways can you choose toppings for two pizzas?
Since we can have two pizzas with the same toppings, the
problem is combination with repetitions. There are 210 differ-
ent pizzas, and we need to select two of them where repetitions
10 −1 210 +1
are allowed. Therefore, the answer is 2+2 10
2 −1 = 2
iv. How many ways can you choose toppings for n pizzas?
We now select n pizzas from 210 different toppings ones. The
10 −1
answer is n+22 −1 .
10

11
(d) (10 points) We have seen that the following problem captures many
counting problems.
Determine the number of non-negative integer solutions to
x1 + x2 + .... + xk = n
xi ≥ 0, i = 1, 2, ..., k.
Formulate each of the following problems as a variation of the above
problem.
i. Determine the number of ways to select k objects with replace-
ments from a set of n objects.
Ans:
x1 + x2 + .... + xn = k
xi ≥ 0, i = 1, 2, ..., n.
ii. Determine the number of ways to place n nondistinguisable balls
in k boxes.
Ans:
x1 + x2 + .... + xk = n
xi ≥ 0, i = 1, 2, ..., k.
iii. Determine the number of ways to distribute n pennies to k kids
such that each kid gets at least 1 penny.
Ans:
x1 + x2 + .... + xk = n
xi ≥ 1, i = 1, 2, ..., k.
iv. Determine the number of times the following pseudocode prints
the PRINT statement:
for i = 1 to 20
for j = i to 20
for k = j to 20
PRINT(i,j,k)

Ans:
x1 + x2 + .... + x20 = 3
xi ≥ 0, i = 1, 2, ..., 20.
Once the three integers are selected, we assign the largest one to
k, the smallest one to i and the third one to j.

12

You might also like