Professional Documents
Culture Documents
Inclusion Exclusion
principle
Getenet Dessie
2014
ACKNOWLEDGEMENT
CONTENTS
Title
Page
CHAPTER ONE:
Introduction:..5
Basic counting principle:5
The product rule:.5
The sum rule:.6
CHAPTER TWO:
2. The inclusion and exclusion:7
2.1 Number of elements for two non disjoint sets:8
2.2 Proof for the number of elements in the union of three sets:.12
2.3 Theorem (the inclusion and exclusion principle):..14
2.4 Proof of the inclusion and exclusion principle:.15
CHAPTER ONE
INTRODUCTION
Combinatorics is the branch of discrete mathematics that explores
counting, combining and arranging the elements of sets. Enumeration may be
thought of as counting but in a broader sense it is often included with
combination and permutation as one aspect of Combinatorics, with graph
theory being the other aspect. In Combinatorics counting may be a simple
process of adding the number of elements of two disjoint sets, or it may be a
more complex process, as we will see in the principle of Inclusion and
Exclusion.
Combinations are collections of new sets at elements. Permutations are the
arrangement of elements within sets. The field of Combinatorics has practical
applications in computer science, probability
.
We will present two basic counting principles, the product rule and the sum
rule. Then we will show how they can be used to solve many different
counting problems problems.
The product rule applies when a procedure is made up of separate tasks.
The product rule
Suppose that a procedure can be broken down in to a sequence of two tasks. If
there are ways to do the first task and for each of these ways of doing the
first task, there are
ways to do the second task, then there are
ways to
do the procedure.
Example: A new company with just two employees, Sanchez and Patel rents a
floor of a building with 12 offices. How many ways are there to assign
different offices to these two employees?
Solution: the procedure of assigning offices to these two employees consists
of assigning an office to Sanchez, which can be done in 12 ways, then assigning
an office to Patel different from the office assigned to Sanchez, which can be
5
done in 11 ways. By the product rule, there are 12.11=132 ways to assign
offices to these two employees.
Example: the chairs of an auditorium are to be labeled with a letter and a
positive integer not exceeding 100. What is the largest number of chairs that
can be labeled differently?
Solution: the procedure of labeling a chair consists of two tasks, namely,
assigning one of the 26 letters and then assigning one of the 100 possible
integers to the seat. The product rule shows that there are 26.100=2600
different ways that a chair can be labeled.Therefor; the largest number of
chairs that can be labeled differently is 2600.
CHAPTER TWO
THE INCLUSION AND EXCLUSION PRINCIPLE
Suppose that a task can be done in or in ways but that some the set of
ways to do the task are the same as some of the other ways to do the
task. In this situation, we cannot use the sum rule to count the number of ways
to do the task. Adding the number of ways to do the tasks in these two ways
leads to an over count, because the ways to do the task in the ways that are
common are counted twice. To correctly count the number of ways to do the
two tasks, we add the number of ways to do it in one way and the number of
ways to do it the other way, and then subtract the number of easy to do the
task in a way that is both among the set of ways and the set of ways.This
technique is called the inclusion and exclusion principle.
The principle of inclusion and exclusion is a way of thinking about combining
sets with overlapping elements. First let as consider two sets, the set of girls in
a class room and the set of boys in a class room .These are disjoint sets. They
share no elements in common; a student could not be a member of both sets.
The Addition principle states that if two sets are disjoint, the size of the union
of both sets equals the number of elements in the second set. This can be
stated as
A =A+B .
In our class room example we will assume that A contains 10 girls and the set
B contains 12 boys.
So,
= 10 + 12 = 22
Now let us consider two different class room sets. The set of challenge
students and the set of band students. Let A be the set of band students; there
are 8 students in this set. Let B be the set of challenge students ,and there
are 6 students in this set. Can we combine the two sets and use the Addition
principle to count 14 students in the set of in the of ? In this example
7
,the sets are not disjoint . It is quite possible for a challenge student to also be
a band student .We cannot use the Addition principle , but the principle of
Inclusions and Exclusion gives us a strategy .Let us follow a visual
representation to our solution.
It will count all the members of
set A and combine that with all
the members of set B.In
combining these two sets,we are
obviously over counting the total
,since two students belonge to
both sets.To compensate ,we will
subtract the number of students
who are in both set A and set B.We starting by including all elements ,then
exclude elements common to both sets .Putting numbers to the word we have
8+6-2=12 band and challenge students.
Conceptually we have that the number of elements in the union of the two sets
A and B is the sum of the numbers of elements in the sets minus the number of
elements in their intersection.That is
The formula for the number of elements in the union of two sets is useful in
counting problems.
Example: In a discrete mathematics class every student is a major in computer
science or mathematics or both.The number of students having computer
science as a major (possibly along with mathematics ) is 25.The number of
students having mathematics as a major (possibly along with computer
science)is 13 ;and the number of students majoring in both computer science
and mathematics is 8.How many students are in this class?
Solution: let A be the set of students in the class majoring in computer
science and B be the set of students in the class majoring in mathematics.
Then is the set of students in the class who are joint mathematics and
computer science majors. Because every student in the class is majoring in
either computer science or mathematics(or both)it follows that the number of
students in the class is .
8
There for,
25+13-8=30
Therefor,there are 30 students in the class.This computation is illustrated in
figure 1:
=25+13-8=30
AB
| |=25
|A B| =8
| |=1
exceeding 1000 that are divisible by both 7 and11.It follows that there are
=
+
=142+90-1
=220
Positive integers not exceeding 1000 that are divisible by either 7 or 11.This
computation is illustrated in figure 2.
=142+90-12
=220
| | = 142
| | = 12
| | = 90
FIGURE2: The set of positive integers not exceeding 1000 that are divisible by
either 7 or 11.
Example3:shows how to find the number of elements in a finite universal set
that are out side the union of sets.
10
Example3:suppose that there are 1807 freshmen at your school .Of these 453
are taking a course in computer science, 567are taking a course in
mathematics, and 299 are taking a course in both computer science and
mathematics. How many are not taking a course either in computer science or
in mathematics?
Solution: To find the number of freshmen who are not taking a course in
either mathematics or computer science , subtract the number that are taking
a course in either of these subjects from the total number of freshmen.
Let A be the set of all freshmen taking a course in computer science and let B
be the set of all freshmen taking a course in mathematics.
It follows that |A|=453,|B|=567,| |=299.
The number of freshmen taking a course in either computer science or
mathematics is :
| | = |A|+|B|+| |
=453+567-299
=721
Consequently, there are 1807-721=1086 freshmen who are not taking a
course in computer science or mathematics.
We will now begin our development of a formula for the number of elements
in the union of a finite number of sets. The formula we will develop is called
the principle of inclusion and exclusion .For concreteness, before we consider
union of n sets, where n is any positive integer ,we will derive a formula for
the number of elements in the union of three sets, A ,B ,and C.
To construct this formula we note that |A|+|B|+|C| counts each element that is
in exactly one of the three sets once,elements that are in exactly two of the
sets twice ,and elements in all three sets three times. This is illustrated in the
first panel in figure 3.
11
a)count of elements
By |A|+|B|+|C|
b)count of elements
c)count of elements by
By |A|+|B|+|C|-|
|-| |-| |
To remove the over count of elements in more than one of the sets we
subtract the number of elements in the intersections of all pairs of the three
sets .We obtain
+
This expression still counts elements that occur in exactly one of the sets once.
An element that occur in exactly two of the sets is also counted exactly once
,because this element will occur in one of the three intersections of sets taken
two at a time. However, those elements that occur in all three sets will be
counted zero times by this expression, because they occur in all three
intersections of sets taken two at a time. This is illustrated in second panel in
figure 3.
To remedy this under count, we add the number of elements in the
intersections of all three sets. This final expression counts each element once,
whether it is in one, two, or thereof the sets .Thus,
+
12
Let A be the set of band students, B be the set of challenge students and C
is the set of strings students.
We can start by adding the members of all
the three sets.
+
= 8 + 6 + 5 = 19
Example :A total of 1232 students have taken a course in Spanish, 879 have
taken a course in French, and 114 have taken a course in Russian.
Further,103 have taken a course in both Spanish and French ,23 have taken a
course in both Spanish and Russian ,and 14 have taken a course in both
French and Russian. If 2092 students have taken at least one of Spanish ,and
Russian ,how many
students have taken a course in all three languages?
Solution: let S be the set of students who have taken a course in Spanish, F the
set of students who have taken a course in French and R the set of students
who have taken a course in Russia. Then
S=1232, F=879, R =114
13
|F| = 879
| | = 103
| | = 1232
|
| | = 114
|=23
| | = 114
| = 2092
| =?
fig 4:- The set of students who have taken courses in Spanish , French ,
Russian
2092=1232+879+114-23-103-14+SFR
we now solve for SFR. We ind that SFR=7. Therefore, there are 7
students who have taken courses in Spanish, French and Russian.
we will now state and prove the inclusion and exclusion principle which
tells us how many elements are there in the union of finite number of finite
sets.
Theorem (The Inclusion-Exclusion principle) :-Given n = the number of finite
sets Ai where 1 n ,we can generally state the principle of Inclusion and
Exclusion
as
14
. +(1)
( , )
( , ) = (1 1) = 0
The binomial theorem showing that both sides of the equation are the same.
This confirms we are adding X appropriately when using the principle of
Inclusion and Exclusion.
Let's apply the principle of Inclusion and Exclusion in same typical
situation
15
=A+B+C+D-
16
-
+
We will use the process noted above to determine the size of the sets .For the
size of the set intersections, we will consider that an integer is divisible by
both a and b when and only when it is divisible by the LCM (least common
multiple) of a and b.
=500
=142
=71
=28
=14
=
=333,
=
=200
=166
=100
=66
=47
=
=
=33
=23
=9
=4
= 500 + 333 + 200 + 142 166 100 71 66 47 28
+ 33 + 23 + 14 + 9 4 = 772
So, 772 integers from the set N are divisible by a single digit prime
numbers.
Our next example uses the principle of inclusion and exclusion in a similar
way.
Consider a trio of golden summer evenings at the college world series.The
often dance gate for the three championship college world series game was
75,012.Aurvey showed that 60,834 individuals attend at least one
championship game and 2,578 attend all three. How many fans attend exactly
two games of the championship?
Let A be the set of people who attend game 1.
Let B be the set of people who attend game 2.
Let C be the set of people who attend game 3.
17
The principle of inclusion and exclusion states the union of these three sets ,
that is the number of people who attend at least one game of the series is
equivalent to the sum of A,B,Cless the sum of the individuals who
attend two games plus the people who attend all three games . So
=A+B+C- - +
So, although we can not say which two games they attended, we do know that
16,756 people attended at least two college world championship games. Of
these 16,756 people who attended at least two games ,2578 attended all
three.So,14,178 fans attended exactly two games.
Example:-how many elements are there in the union of four sets if the sets
have 50,60,70, and 80 elements respectively, each pair of the sets has 5
elements in common ,each triple of the sets has 1,common elements ,and no
element is in all four sets ?
Solution Let A be the first set
Let B be the second set
Let C be the third set
Let D be the fourth set
A=50 , B=60 , C=70, D=80
A =A =A =B =B =C =5
A
=A
=A
=0
=1
=A+B+C+ D-
A -A -A -B -B -C +
A
+A
+A
=50+60+70+80-5-5-5-5-5-5+1+1+1+1-0
=234
There fore , there are 234 elements in the union of four sets
19
Reference
1.Discrete mathematics with application ,Rosen,2007
2.Discrete mathematics with example,Simpison,2002
3.The principle of inclusion and exclusion,brilliant
20