0% found this document useful (0 votes)
70 views6 pages

Math 114 Discrete Mathematics

The document discusses principles of combinatorics used to count outcomes of events with multiple choices or selections. The inclusion-exclusion principle states that the number of elements in the union of sets A, B, and C is equal to the sum of their individual cardinalities minus the cardinalities of their double intersections plus the triple intersection. The multiplicative principle states that if there are m choices for the first selection, n choices for the second given the first choice, and so on, the total number of outcomes is equal to the product of the number of choices at each stage. Tree diagrams can be used to illustrate the stages of selecting permutations by showing the branching choices at each step.

Uploaded by

ariqchowdhury
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views6 pages

Math 114 Discrete Mathematics

The document discusses principles of combinatorics used to count outcomes of events with multiple choices or selections. The inclusion-exclusion principle states that the number of elements in the union of sets A, B, and C is equal to the sum of their individual cardinalities minus the cardinalities of their double intersections plus the triple intersection. The multiplicative principle states that if there are m choices for the first selection, n choices for the second given the first choice, and so on, the total number of outcomes is equal to the product of the number of choices at each stage. Tree diagrams can be used to illustrate the stages of selecting permutations by showing the branching choices at each step.

Uploaded by

ariqchowdhury
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

With three sets, it says |A ∪ B ∪ C| = |A| + |B|

+|C| − |A ∩ B| − |A ∩ C| − |B ∩ C| + |A ∩ B ∩ C|.
For four sets, you can find the cardinality of their
union by first adding the cardinalities of each of the
four sets, then subtracting the cardinalities of all six
Math 114 Discrete Mathematics of their double intersections, then adding the car-
Notes on combinatorics dinalities of all four triple intersections, and finally
D Joyce, Spring 2018 subtracting the cardinality of the quadruple inter-
section. In summary, include each set, exclude each
double intersection, include each triple intersection,
What is combinatorics? It’s that part of dis-
and exclude the quadruple intersection.
crete mathematics devoted to counting things. The
Of course, the inclusion-exclusion principle ex-
things are often sets with some kind of struc-
tends to any finite number of sets.
ture, perhaps subsets of other sets with certain
properites. There are various principles used in
combinatorics and we’ll look at some of the more The multiplicative principle, choices and
basic ones including additive and multiplicative stages, and tree diagrams. The basic multi-
principles, permutations, combinations, binomial plicative principle says that if you have m choices,
coefficients and Pascal’s triangle. and for each choice you have n second choices, then
altogether you have mn choices.
One situation in which this occurs is when you
The additive principle and the inclusion-
take the Cartesian product of two sets A and B.
exclusion principle. You’ve known the additive
The Cartesian product A×B consists of all ordered
principle ever since you learned how to add. If you
pairs (a, b) where a ∈ A and b ∈ B. Then
have two disjoint sets A and B, then the cardinality
of their union is the sum of their cardinalities, |A × B| = |A| |B|.
|A ∪ B| = |A| + |B|. In many of our applications, however, what the sec-
ond choices are depend on the first choice you make,
In other words, if none of these things are those so we’re not looking at just Cartesian products of
things, then the number of things altogether is the sets.
sum of the number of these things and the number Suppose now that you’re making choices in sev-
of those things. eral stages and the number of choices mi you can
There’s actually a proof for the additive prin- choose from at a stage i doesn’t depend on previ-
ciple, and that proof uses mathematical induction ous choices you’ve made. Then the total number
on the cardinality of B where the base case is when of outcomes for n stages 1, 2, . . . , n is the product
|B| = 0. m1 m2 . . . mn .
The additive principle generalizes to n sets. A special case of this is the product of sets. Given
Given n pairwise disjoint sets A1 , A2 , . . . , An , then finite sets A1 , A2 , . . . , An , their product A1 × A2 ×
· · · × An consists of ordered n-tuples (a1 , a2 , . . . , an )
|A1 ∪ · · · ∪ An | = |A1 | + · · · + |An |.
where each ai belongs to the corresponding set Ai .
The inclusion-exclusion principle generalizes the In order to choose one of these ordered n-tuples,
additive principle to when the sets aren’t disjoint. for the first stage you have a choice of choosing any
In the case of two sets A and B, it says one of the elements of A1 to be a1 . The number
of choices at stage 1 is the cardinality of A1 . For
|A ∪ B| = |A| + |B| − |A ∩ B|. the second stage you have |A2 | choices for a2 , and

1
so forth. The multiplicative principle gives us the This last expression is usually abbreviated n! and
standard formula for the cardinality of the product read “n factorial” or “factorial n” (except by some
Yn people who like to say “n shriek” or “n bang”).
|A1 × A2 × · · · × An | = |Ai |. Thus, there are 4! = 24 permutations of a set
i=1 of 4 elements; 3! = 6 permutations of a set of 3
We’ll use the multiplicative principle right away elements; 2! = 2 permutations of a set of 2 elements;
to count permutations and combinations. 1! = 1 permutations of a set of 1 element; and
0! = 1 permutations of the empty set ∅. The last
is because the unique function ∅ → ∅ is, by our
Permutations. Suppose we want to count all
definition, a permutation.
the ways you can rearrange the letters in ROFL.
There are a lot of them such as FROL, OLFR,
etc. These rearrangements are called permutations. Tree diagrams. The stages in choosing a permu-
When choosing a permutation of ROFL, you have tation can be illustrated in a tree diagram. When
4 choices for the first letter, 3 remaining choices choosing a permutation of the four letters abcd
for the second (since we cant choose the first let- there are four stages.
ter again), 2 remaining choices for the third, and
 abc abcd
then the fourth is forced on us. Thus there are ab 

abd abdc
4 · 3 · 2 · 1 = 24 choices altogether.  
acb acbd
aH ac ```` acd
HH acdb
 H ad P adb adbc
Counting permutations. Our main question, PPP adc
 adcb
an easily answered one, is how may permutations 
bac bacd

are there on a set A of n elements? If n is small, 

ba 
bad badc

say 4, then we can list all the permutations. Let’s 
bca bcac
b  bc ````

list all the rearrangements of abcd.  HH bcd bcda
 HH bd P bda bdac
PP
abcd bacd cabd dabc  P bdc bdca
◦ cab cabd
abdc badc cadb dacb @
B 

acbd bcad cbad dbac B @  ca  cad cadb
B @ @ c  
cba cbad
acdb bcda cbda dbca cb ````
B HH cbd cbda
adbc bdac cdab dcab B HH cd P cda cdab
B PP
adcb bdca cdba dcba B P cdb cdba
B  dab dabc
There are 24 of them.

B
 da  dac dacb
Even when n is not small, it’s easy to deter- B
B d 

dba dbac
db ````
mine how many permutations there are. We just HH dbc dbca
HH dc P dca dcab
use the multiplicative principle. In the first stage, PPP dcb dcba
choose one of the n elements to go first. In the
second stage, there are n − 1 remaining elements, The first stage chooses one of the four letters to
and choose one of them to go second. At the next go first. That gives us our first branching of the tree
stage, chose one of the remaining n − 2 elements at the left. After we’ve taken that branch, we’ll be
to go next. And so forth until the last stage, when at one of the four nodes or states labelled a, b, c, or
there’s only one element left, so it goes last. Thus, d. At this second stage, we choose a second letter
the number of permutations of a set of n elements that can’t be the same as the first. In each case
is we have three choices this time, so we’ll take one of
n(n − 1)(n − 2) · · · 2 · 1. the three branches to get to a state labelled by two

2
letters. At the third stage, we’ve got two choices, ordered listing of just k elements of a set of n el-
so for each state there are two branches leading to ements. For instance, the 3-permutations of abcd
a state labelled with three letters. At this state the are these
last letter is determined, so there’s only one branch abc bac cab dab
to a leaf of the tree. abd bad cad dac
Sometimes variants of permutations come up. acb bca cba dba
Here’s one. Say you want to count the permu- acd bcd cbd dbc
tations of ROFLCOPTER. The two R’s can’t be adb bda cda dca
distinguished, so exchanging them shouldn’t count adc bdc cdb dcb
as a different permutation. If we said that there while the 2-permutations are these
are 10! permutations, we would be doubly counting
them because the R’s aren’t distinguishable. There ab ba ca da
are two O’s, too, so the actual number of distin- ac bc cb db
guishable permutations is 10! divided by 4. ad bd cd dc

We can determine how many k-permutations of a


Sterling’s approximation for factorials. set of n elements there are using the multiplicative
Sometimes you’ll need to compute factorials of principle. In the first stage, choose one of the n
large numbers. Sterling’s approximation helps. elements to go first. In the second stage, there are
The factorial function n! grows very fast with n. n − 1 remaining elements, and choose one of them
James Sterling (1692–1770) this approximation for to go second. At the next stage, chose one of the
factorials: remaining n − 2 elements to go next. And so forth
√ until the kth stage, when there are n−k+1 remain-
n! ≈ nn e−n 2πn
ing elements. Thus, the number of k-permutations
This approximation is fairly good even for numbers of a set of n elements is
as small as 10 where the approximation has an error n!
of less than 1%. It’s accuracy increases with n. n(n − 1)(n − 2) · · · (n − k + 1) = .
(n − k)!
n n! approx ratio There is no particular standard notation for the
1 1 0.922137 1.084 number of k-permutations of a set of n elements,
2 2 1.91900 1.042 but you’ll see it denoted (n)k as in our text, nP k,
3 6 5.83621 1.028 Pkn , and various other things. We’ll probably just
4 24 23.5062 1.021 n!
use .
5 120 118.019 1.016 (n − k)!
6 720 710.078 1.014
7 5040 4980.40 1.012 Definition of combinations and their relation
8 40320 39902.4 1.011 to partial permutations. Combinations are re-
9 362880 359536 1.0093 lated to partial permutations, but order is disre-
10 3628800 3598690 1.0084 garded, as youll see.
11 39916800 39615600 1.0076 A combination of size k from a set S of size n is
12 479001600 475687000 1.0070 just a subset of size k. It’s more often it’s called a
k-subset when the size is specified.
k-permutations. Sometimes we don’t want full A k-subset is related to k-permutations but
permutations of a set of n elements, but just par- they’re not the same. A k-permutation is a list-
tial permutations. If k ≤ n, a k-permutation is an ing of k distinct elements of S where the order of

3
the elements in the listing is relevant. But for a k- table of its powers (x + y)n for the first few n.
subset, the elements are not listed in any particular
order; that is, order doesn’t matter. (x + y)0 = 1
Let’s take an example. Let S be the 5-element (x + y)1 = x+y
set S = {a, b, c, d, e}. There are 5 · 4 · 3 = 60 3- (x + y)2 = x + 2xy + y 2
2

permutations of S, but there are far fewer 3-subsets (x + y)3 = x3 + 3x2 y + 3xy 2 + y 3
of S. For instance, one 3-subset is {a, b, c}. But (x + y)4 = x4 + 4x3 y + 6x2 y 2 + 4xy 3 + y 4
this subset is associated to 6 of the 3-permutations, (x + y)5 = x +5x4 y+10x3 y 2 +10x2 y 3 +5xy 4 +y 5
5

namely, abc, acb, bac, bca, cab, and cba. There are
The coefficients in these polynomials, the powers
6, of course, because there are 3! = 6 full permuta-
of the binomial x + y, are the binomial coefficients.
tions of a set of 3 elements.
That’s the binomial theorem.
In general, each k-subset is associated to k! of
n! n  
n k n−k X
n
n!
the k-permutations. Since there are of
X
n
(n − k)! (x + y) = x y = xk y n−k .
k k!(n − k)!
the k-permutations altogether, that implies that k=0 k=0
the number of k-subsets of a set of n elements is
n! To see why binomial coefficients count combina-
exactly . tions, consider the coefficient 6 of x2 y 2 . When you
k!(n − k)!
expand the product (x + y)(x + y)(x + y)(x + y)
you’ll get a term x2 y 2 if you choose an x from ex-
Binomial coefficients. That last expression actly 2 of the 4 factors x+y, the y 2coming from the
 is 4

n
called a binomial coefficient, and it’s denoted , remaining two factors. There are 2 = 6 ways of
k
pronounced “n choose k”. choosing 2 of the four factors, and each one con-
tributes one x2 y 2
,so the coefficient of x2 y 2 in the
4
product will be .
  2
n n! One important identity of the many important
=
k k!(n − k)! identities that hold for binomial coefficients is this
one:    
n n
  =
n k n−k
Thus, there are subsets of size k in a set
k You can see why that’s true in three different ways.
of size n. Binomial coefficients are also called com- n!
binations, and an alternative notation for them is First, they’re both equal to k!(n − k)! . Second as
nCk. coefficients in the expansion of (x + y)n , the coeffi-
Note that this definition is relevant so long as cient of xk y n−k is equal to the coefficient of y k xn−k .
0 ≤ k ≤ n and n ≥ 0, where, as always, 0! = 1. And third, each subset of k elements in a set of size
 
n n has a complement that has n − k elements. The
The number of combinations of n things
k last reason is
 the
 best because it directly uses the
chosen k at a time is usually called a binomial coef- n
meaning of .
ficient. That’s because they occur in the expansion k
of the nth power of a binomial.
A binomial is a polynomial with two terms. Let’s Pascal’s triangle. We’ll compute a few of these
take the simplest binomial, x + y, and write up a binomial coefficients. Then we’ll show the recur-

4
rence relation There are lots of interrelations among these en-
      tries in Pascal’s triangle, and we may have time to
n n−1 n−1
= + , look at a couple of them. Note that in each row, n
k k k−1 is fixed. Let’s call that the nth row; the top row is
th th
then display these binomial coefficients in a trian- then the 0 row. Note that the numbers in the n
n
gular table usually called Pascal’s triangle. row sum to 2 .
Blaise Pascal (1623–1662) and Pierre de Fermat    
n n

n
  
n
(1601–1665) studied these binomial coefficients in + + ··· + + = 2n
0 1 n−1 1
the context of probability in the 1600s. Their cor-
respondence resulted in some of the first significant For instance, when n = 5, we have 1 + 5 + 10 + 10 +
theory of probability and a systematic study of bi- 5 + 1 = 32 = 25 . That’s because these binomial
nomial coefficients. Because of Pascal’s publication coefficients tell us the number of subsets of various
of their results, a particular arrangement of the bi- sizes of a set of n elements. Since there are 2n
nomial coefficients in a triangle is called Pascal’s subsets in all, they have to add up to 2n .
triangle. If you prefer, you can call it the arith- There are different kinds of proofs you can give
metic triangle. It was known in Europe for a cou- for these identities. You can prove this one using
ple of centuries before Pascal, and it was known counting arguments or algebraic arguments.
much longer in Islamic mathematics, in India, and
Counting proof: These binomial coefficients tell us
in China.
the number of subsets of various sizes of a set of
1 n elements. Since there are 2n subsets in all, they
1 1 have to add up to 2n .
1 2 1 Algebraic proof: Use the binomial theorem
1 3 3 1
n  
1 4 6 4 1 n
X n k n−k
1 5 10 10 5 1 (x + y) = x y
k=0
k
The numbers along the sides are all 1s, and each
with both x and y set to 1.
entry in the middle is the sum of the two entries
above
  it. These are just the binomial coefficients
n Graphic interpretation of binomial coeffi-
arranged in a table. By making it a triangle cients. It’s interesting to look at a row of bi-
k
rather than a rectangle, you can see the two rela- nomial coefficients displayed as bar chart, or his-
tionships togram. Compare these graphs for n = 10 and
          n = 20.
n n−1 n−1 n n
= + and =
k k k−1 k n−k
more clearly. Here’s the triangle again, but one less
row of it so it fits on the page.
0

0
1 1
 
0 1
2 2 2
  
3
 0 3
 1 3
 2 3

0 1 2 3
4 4 4 4 4
    
0 1 2 3 4

5
They’re on different scales, and only the center por-
tion of the second graph is shown since the bars
are too short to see outside the range shown. Their
shapes are about the same, and, in the limit, give an
important distribution of probability and statistics
called the normal distribution, sometimes called the
Gauss or Laplace-Gauss distribution, although it
was first mentioned by De Moivre in 1733.

Math 114 Home Page at http://math.clarku.


edu/~djoyce/ma114/

You might also like