0% found this document useful (0 votes)
3 views9 pages

Discrete Math

The document is an assignment on basic counting principles in discrete mathematics, detailing the Sum Rule and Product Rule for counting events. It includes examples and problems related to combinations, permutations, and mathematical functions like factorials and binomial coefficients. Additionally, it covers principles such as the Pigeonhole Principle, Inclusion-Exclusion Principle, and the use of tree diagrams for enumerating outcomes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views9 pages

Discrete Math

The document is an assignment on basic counting principles in discrete mathematics, detailing the Sum Rule and Product Rule for counting events. It includes examples and problems related to combinations, permutations, and mathematical functions like factorials and binomial coefficients. Additionally, it covers principles such as the Pigeonhole Principle, Inclusion-Exclusion Principle, and the use of tree diagrams for enumerating outcomes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Submitted to : Sir Zahid Karim.

Submitted by : Muhammad Sohaib Naseer.


Roll No. : BSF2002030.
BS-IT-SEMESTER 2nd (EVENING)
University of Education Lahore, D. G. Khan Campus.

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.

Example 5.1: Suppose a college has 3 different history courses, 4 different


literature courses, and 2 different sociology course.
(a) The number of ‘m’ ways a student can choose one of each kind of courses is:

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:

(a) one of the texts; (b) one of each type of text.

(a) Here the Sum Rule applies; hence, n = 5+3+6+4 = 18

(b) Here the Product Rule applies; hence, n = 5.3.6.4 = 360

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.

(a) Here the Sum Rule is used; hence, n = 8+6 = 14

(b) Here the Product Rule is used; hence, n = 8 . 6 = 48

(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:

n! = 1 . 2 . 3 . ….. . (n-2)(n-1)n = n(n-1)(n-2) . ….. . 3 . 2 . 1

Accordingly, 1! = 1 and n! = n(n-1)!. It is also convenient to define 0! = 1.


Example 5.2:
(a) 3! = 3.2.1 = 6, 4! = 4.3.2.1 = 24, 5! = 5.4! = 120.

12. 11.10 12.11.10.9 ! 12 ! n!


(b)
3 .2 .1
= 3.2 .1 .9!
= 3! 9!

r ! ( n−r ) !

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:

(nr) = n ( n−1 ) … .(n−r +1)


r ( r −1 ) … .3.2 .1
or equivalently (nr) = r ! ( n−r
n!
)!

Binomial Coefficients and Pascal’s Triangle:

The numbers (nr) are called binomial coefficients, since they appear as the coefficients in the
expansion of (a+ b)n. Specifically:

Theorem (Binomial Theorem) 5.2: (a+ b)n = ∑


k=0
n n an −k b k
r ()
The coefficients of the successive powers of a + b can be arranged in a triangular array of
numbers, called Pascal’s triangle, as pictured in Fig. 5-1. The numbers in Pascal’s triangle have
the following interesting properties:

(i) The first and last number in each row is 1.


(ii) Every other number can be obtained by adding the two numbers appearing above it.
For example

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).

The number of permutations of n objects taken r at a time will be denoted by

P (n, r) (other texts may use nPr, Pn.r, or (n)r )

The following theorem applies

n!
Theorem 5.3: P (n, r) = n(n − 1)(n − 2)···(n − r + 1) = (n−r )!

We emphasize that there are r factors in n(n − 1)(n − 2)···(n − r + 1).

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,

m = P (7; 3, 2) = (27! 3! !)= 7.62.1.3


.5.4 .3.2 .1
.2 .1
=420

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.

(1) Sampling with replacement:


n · n · n ··· n · n(r factors) = nr

(2) Sampling without replacement:


n!
(3) P (n, r) = n(n − 1) (n − 2)···(n − r + 1) = (n−r )!

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.

EXAMPLE 5.7: Find the number of combinations of 4 objects, A, B, C, D, taken 3 at a time.


Each combination of three objects determines 3! = 6 permutations of the objects as follows:

ABC: ABC, ACB, BAC, BCA, CAB, CBA

ABD: ABD, ADB, BAD, BDA, DAB, DBA

ACD: ACD, ADC, CAD, CDA, DAC, DCA

BCD: BDC, BDC, CBD, CDB, DBC, DCB

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.

THE PIGEONHOLE PRINCIPLE:


If ‘n’ pigeonholes are occupied by n + 1 or more pigeons, then at least one pigeonhole is
occupied by more than one pigeon.

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.

The Pigeonhole Principle is generalized as follows

Generalized Pigeonhole Principle: If n pigeonholes are occupied by kn + 1 or more pigeons,


where k is a positive integer, then at least one pigeonhole is occupied by k + 1 or more
pigeons.

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.

THE INCLUSION–EXCLUSION PRINCIPLE:


Let A and B be any finite sets. Recall Theorem 1.9 which tells us:

n(A ∪ B) = n(A) + n(B) − n(A ∩ B)

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:

MM, MEMM, MEMEM, MEMEE, MEE, EMM, EMEMM, EMEME, EMEE, EE

The path from the beginning (top) of the tree to the endpoint describes who won which
game in the tournament.

You might also like