Discrete Math
Discrete Math
Discrete Mathematics
Assignment No. 1
Basic Counting Principles:
There are two basic counting principles used throughout this chapter. The first one involves
addition and the second one multiplication.
Sum Rule principle: Suppose some event ‘E’ can occur in ‘m’ ways and a second event F can
occur in ‘n’ ways, and suppose both events cannot occur simultaneously. Then ‘E’ or ‘F’ can
occur in ‘m + n’ ways.
Product Rule Principle: Suppose there is an event ‘E’ which can in ‘m’ ways and, independent of
this event, there is a second event ‘F’ which can occur in ‘n’ ways. The combinations ‘E’ and ‘F’
can occur in ‘mn’ ways.
Sum Rule: If no two events can occur at the same time, then one of the event can occur in:
n1 + n2 + n3 + ….. ways.
Product Rule: If the events occur one after the other, then all the events can occur in the order
indicated in:
n1 . n2 . n3 . …… ways.
m = 3(4)(2) = 24
(b) The number of ‘n’ ways a student can choose just one of the course is:
n=3+4+2=9
(Solved Problem)
1- Suppose a bookcase shelf has 5 History texts, 3 Sociology texts, 6 Anthropology texts, and 4
Psychology texts. Find the number n of ways a student can choose:
2- A history class contains 8 male students and 6 female students. Find the number n of ways
that the class can elect:
(a) 1 class representative; (b) 2 class representatives, 1 male and 1 female; (c) 1 president and
1 vice president.
(c) There 14 ways to elect the president, and then 13 ways to elect the vice president. Thus n =
14 . 13 = 182.
Mathematical Functions:
We discuss two important mathematical functions frequently used in combinatorics.
Factorial Function: The product of the positive integers form 1 to n inclusive is denoted by n!,
read “n factorial”. Namely:
Binomial Coefficients:
The symbol (nr), read “nCr” or “n Choose r”, where r and n are positive integers with r ≤ n, is
defined as follows:
The numbers (nr) are called binomial coefficients, since they appear as the coefficients in the
expansion of (a+ b)n. Specifically:
10 = 4 + 6, 15 = 5 + 10, 20 = 10 + 10.
Since these numbers are binomial coefficients, we state the above property formally
PERMUTATIONS:
Any arrangement of a set of n objects in a given order is called a permutation of the object
(taken all at a time). Any arrangement of any r ≤ n of these objects in a given order is called an
“r-permutation” or “a permutation of the n objects taken r at a time.” Consider, for example,
the set of letters A, B, C, D. Then:
BDCA, DCBA, and ACDB are permutations of the four letters (taken all at a time).
n!
Theorem 5.3: P (n, r) = n(n − 1)(n − 2)···(n − r + 1) = (n−r )!
EXAMPLE 5.4: Find the number m of permutations of six objects, say, A, B, C, D, E, F, taken
three at a time. In other words, find the number of “three-letter words” using only the given six
letters without repetition. Let us represent the general three-letter word by the following three
positions:
The first letter can be chosen in 6 ways; following this the second letter can be chosen in 5
ways; and, finally, the third letter can be chosen in 4 ways. Write each number in its
appropriate position as follows:
6 , 5, 4.
By the Product Rule there are m = 6 · 5 · 4 = 120 possible three-letter words without repetition
from the six letters. Namely, there are 120 permutations of 6 objects taken 3 at a time. This
agrees with the formula in Theorem 5.4:
P (6, 3) = 6 · 5 · 4 = 120
In fact, Theorem 5.4 is proven in the same way as we did for this particular case. Consider now
the special case of P (n, r) when r = n. We get the following result.
EXAMPLE 5.5: Find the number m of seven-letter words that can be formed using the letters
of the word “BENZENE.”
We seek the number of permutations of 7 objects of which 3 are alike (the three E’s), and 2 are
alike (the two N’s). By Theorem 5.6,
Ordered Samples:
Many problems are concerned with choosing an element from a set S, say, with n elements.
When we choose one element after another, say, r times, we call the choice an ordered sample
of size r. We consider two cases.
EXAMPLE 5.6: Three cards are chosen one after the other from a 52-card deck. Find the
number m of ways this can be done: (a) with replacement; (b) without replacement
(a) Each card can be chosen in 52 ways. Thus m = 52(52)(52) = 140 608.
(b) Here there is no replacement. Thus the first card can be chosen in 52 ways, the
second in 51 ways, and the third in 50 ways. Therefore:
m = P (52, 3) = 52(51)(50) = 132600
COMBINATIONS:
Let S be a set with n elements. A combination of these n elements taken r at a time is any
selection of r of the elements where order does not count. Such a selection is called an r-
combination; it is simply a subset of S with r elements. The number of such combinations will
be denoted by
C(n, r)
Before we give the general formula for C(n, r), we consider a special case.
Thus the number of combinations multiplied by 3! gives us the number of permutations; that is
P (4 ,3)
C(4, 3) · 3! = P (4, 3) or C(4, 3) =
3!
But P (4, 3) = 4 · 3 · 2 = 24 and 3! = 6; hence C(4, 3) = 4 as noted above. As indicated above, any
combination of n objects taken r at a time determines r! permutations of the objects in the
combination; that is,
P (n, r) = r! C(n, r)
Accordingly, we obtain the following formula for C(n, r) which we formally state as a theorem.
This principle can be applied to many problems where we want to show that a given situation
can occur.
EXAMPLE 5.9:
(a) Suppose a department contains 13 professors, then two of the professors (pigeons)
were born in the same month (pigeonholes).
(b) Find the minimum number of elements that one needs to take from the set S = {1, 2, 3,...,
9} to be sure that two of the numbers add up to 10. Here the pigeonholes are the five
sets {1, 9}, {2, 8}, {3, 7}, {4, 6}, {5}. Thus any choice of six elements (pigeons) of S will
guarantee that two of the numbers add up to ten.
Example 5.10: Find the minimum number of students in a class to be sure that three of
them are born in the same month.
Here the n = 12 months are the pigeonholes, and k + 1 = 3 so k = 2. Hence among any kn + 1
= 25 students (pigeons), three of them are born in the same month.
In other words, to find the number n(A ∪B) of elements in the union of A and B, we add
n(A) and n(B) and then we subtract n(A ∩ B); that is, we “include” n(A) and n(B), and we
“exclude” n(A ∩ B). This follows from the fact that, when we add n(A) and n(B), we have
counted the elements of
(A ∩ B) twice. The above principle holds for any number of sets. We first state it for three sets.
Theorem 5.8: For any finite sets A, B, C we have n(A ∪ B ∪ C) = n(A) + n(B) + n(C) − n(A ∩ B) −
n(A ∩ C) − n(B ∩ C) + n(A ∩ B ∩ C) That is, we “include” n(A), n(B), n(C), we “exclude” n(A ∩ B),
n(A ∩C), n(B ∩C), and finally “include” n(A ∩ B ∩ C)
TREE DIAGRAMS:
A tree diagram is a device used to enumerate all the possible outcomes of a sequence of
events where each event can occur in a finite number of ways. The construction of tree
diagrams is illustrated in the following example:
EXAMPLE 5.12:
(a) Find the product set A × B × C, where A = {l, 2}, B = {a, b, c}, C = {x, y}
The tree diagram for A × B × C appears in Fig. 5-2(a). Here the tree is constructed
from left to right, and the number of branches at each point
corresponds to the possible outcomes of the next event. Each endpoint (leaf) of the
tree is labeled by the corresponding element of A × B × C. As noted previously, A × B × C
has n = 2(3)(2) = 12 elements.
(b) Mark and Erik are to play a tennis tournament. The first person to win two games in a
row or who wins a total of three games wins the tournament. Find the number of ways
the tournament can occur.
The tree diagram showing the possible outcomes of the tournament appears .Here the
tree is constructed from top-down rather than from left-right. (That is, the “root” is on
the top of the tree.) Note that there are 10 endpoints, and the endpoints correspond to
the following 10 ways the tournament can occur:
The path from the beginning (top) of the tree to the endpoint describes who won which
game in the tournament.