The Inclusion and Exclusion Principle in View of Number Theory
The Inclusion and Exclusion Principle in View of Number Theory
net/publication/338834055
CITATION READS
1 1,680
1 author:
Viliam Ďuriš
University of Constantinus the Philosopher in Nitra - Univerzita Konstant’na Filozofa v Nitre
32 PUBLICATIONS 24 CITATIONS
SEE PROFILE
All content following this page was uploaded by Viliam Ďuriš on 27 January 2020.
Viliam Ďuriš*
Tomáš Lengyelfalusy †
Abstract
The inclusion and exclusion (connection and disconnection) principle is
mainly known from combinatorics in solving the combinatorial problem
of calculating all permutations of a finite set or other combinatorial
problems. Finite sets and Venn diagrams are the standard methods of
teaching this principle. The paper presents an alternative approach to
teaching the inclusion and exclusion principle from the number theory
point of view, while presenting several selected application tasks and
possible principle implementation into the Matlab computing
environment.
*
Department of Mathematics, Faculty of Natural Sciences Constantine the Philosopher
University in Nitra, Tr. A. Hlinku 1, 949 74 Nitra, Slovakia; [email protected].
†
Department of Didactics, Technology and Educational Technologies, DTI University
Sládkovičova 533/20, 018 41 Dubnica nad Váhom, Slovakia; [email protected].
‡
Received on May 2nd, 2019. Accepted on June 3rd, 2019. Published on June 30th, 2019. doi:
10.23755/rm.v36i1.465. ISSN: 1592-7415. eISSN: 2282-8214. ©Ďuriš, Lengyelfalusy.
This paper is published under the CC-BY licence agreement.
43
V. Ďuriš, T. Lengyelfalusy
1 Introduction
In traditional secondary school mathematics (in combinatorics, number theory
or even in probability theory), the notion of factorial and combinatorial numbers
is introduced [1]. If n and k are two natural numbers with 𝑛 ≥ 𝑘, then we call a
combinatorial number the following notation
𝑛 𝑛! 𝑛(𝑛 − 1) … (𝑛 − 𝑘 + 1)
( )= =
𝑘 (𝑛 − 𝑘)! 𝑘! 1 ∙ 2 ∙ …∙ 𝑘
𝑛 𝑛 0 𝑛 𝑛 𝑛 𝑛 𝑛+1
( )=𝑛 ( )=1 ( )=1 ( )=( ) ( )+( )=( )
1 0 0 𝑘 𝑛 − 𝑘 𝑘 𝑘+1 𝑘+1
𝑛 𝑛 𝑛+1
The relation ( ) + ( )=( ) is the basis for placing combinatorial
𝑘 𝑘+1 𝑘+1
numbers in the plane in the shape of a triangle (a so-called Pascal’s triangle)
[2], in which combinatorial numbers can be gradually calculated using the fact
𝑛 𝑛
that ( ) = ( ) = 1 for each n.
0 𝑛
0
( )
0
1 1
( ) ( )
0 1
2 2 2
( ) ( ) ( )
0 1 2
3 3 3 3
( ) ( ) ( ) ( )
0 1 2 3
⋯
44
The Inclusion and Exclusion Principle in View of Number Theory
a) if 𝑎 = 1, 𝑏 = −1:
𝑛 𝑛
1 − ( ) + ⋯ + (−1)𝑛−1 ( ) + (−1)𝑛 = 0
1 𝑛−1
b) if 𝑎 = 1, 𝑏 = 1:
𝑛 𝑛 𝑛 𝑛
(1 + 1)𝑛 = ( ) + ( ) + ⋯ + ( ) + ( ) = 2𝑛
0 1 𝑛−1 𝑛
which is a special case of the binomial theorem. Thus, the total contribution of
such an object to both sides is zero and the right side is actually equal to the
number of objects that do not have any of the given properties.
45
V. Ďuriš, T. Lengyelfalusy
Solution. Let us denote the coats 1,2, ⋯ , 𝑁. Then the distribution of the coats on
the chess players can be made 𝑁!, since these are the permutations of the set
{1,2, ⋯ , 𝑁}. First, we determine the number 𝑁(0) of permutations, for which
there is no coat on the right player. The number of permutations that do not leave
46
The Inclusion and Exclusion Principle in View of Number Theory
in place the k-element set of coats is (𝑁 − 𝑘)! The number of k-sets can be
𝑁
chosen in ( ) ways.
𝑘
𝑁 𝑁 𝑁
𝑁(0) = 𝑁 − ( ) (𝑁 − 1)! + ( ) (𝑁 − 2)! − ⋯ + (−1)𝑁 ( ) (𝑁 − 𝑁)!
1 2 𝑁
𝑁
𝑁
𝑁(0) = ∑(−1)𝑘 ( ) (𝑁 − 𝑘)!
𝑘
𝑘=0
Next, we get
𝑁 𝑁
𝑁! 𝑘
(−1)𝑘
𝑁(0) = ∑(−1) (𝑁 − 𝑘)! = 𝑁! ∑
𝑘! (𝑁 − 𝑘)! 𝑘!
𝑘=0 𝑘=0
All permutations of N elements is N!, hence the likelihood that no chess player
is wearing his coat when leaving the tournament is
(−1)𝑘 𝑁
𝑁! ∑𝑁 𝑘
𝑘=0 𝑘! = ∑ (−1)
𝑁! 𝑘!
𝑘=0
Example 2.2. A tennis centre has a certain number of players and 4 groups A,
B, C, D. Each player trains in at least one group, while some players train in
multiple groups at once according to the table.
Solution. Let us denote 𝑀1 as the set of all players in group A, 𝑀2 as the set of
all players in group B, 𝑀3 as the set of all players in group C and 𝑀4 as the set
of all players in group D. Then, set 𝑁 = 𝑀1 ∪ 𝑀2 ∪ 𝑀3 ∪ 𝑀4 is a set of all
players in the centre.
47
V. Ďuriš, T. Lengyelfalusy
Example 2.3. Let 𝑛 > 1 be a natural number. In number theory, the symbol
𝜑(𝑛) denotes the number of natural numbers smaller than n and relatively prime
𝛼 𝛼
s n, where 𝜑(𝑛) is called Euler’s function [3]. Let 𝑛 = 𝑝1 1 … 𝑝𝑘 𝑘 be a canonical
decomposition of the number n. We will show that the following relation
applies:
1 1 1
𝜑(𝑛) = 𝑛 (1 − ) (1 − ) … (1 − )
𝑝1 𝑝2 𝑝𝑘
Solution. Once more, we will use the inclusion and exclusion principle. Let 𝑛 =
𝛼 𝛼 𝛼
𝑝1 1 𝑝2 2 … 𝑝𝑘 𝑘 is a canonical decomposition of the number n. The natural
numbers that are relatively prime with the number n are those that are not
divisible by either of the prime numbers 𝑝1 , 𝑝2 , … , 𝑝𝑘 . So, let 𝑎𝑖 mean the
property that “the number m is divisible by the prime number 𝑝𝑖 , 𝑖 = 1, … , 𝑘“.
The number of numbers that are smaller or equal to the number n and
𝑛
are divisible by the number 𝑝𝑖 is 𝑁(𝑎𝑖 ) = 𝑝 . It is an integer since 𝑝𝑖 ⃓𝑛. Next,
𝑖
𝑛
we get 𝑁(𝑎𝑖 𝑎𝑗 ) = 𝑝 𝑝 and other members of the notation.
𝑖 𝑗
Then:
𝑛 𝑛 𝑛 𝑛
𝜑(𝑛) = 𝑛 − ∑ +∑ −∑ + ⋯ + (−1)𝑘
𝑝𝑖 𝑝𝑖 𝑝𝑗 𝑝𝑖 𝑝𝑗 𝑝𝑠 𝑝1 𝑝2 … 𝑝𝑘
1 1 1
𝜑(𝑛) = 𝑛 (1 − ) (1 − ) … (1 − )
𝑝1 𝑝2 𝑝𝑘
Several other interesting tasks and applications of the inclusion and exclusion
principle can be found e.g. in the resources [6], [7].
48
The Inclusion and Exclusion Principle in View of Number Theory
Example 3.1. We will show how many numbers there are up to 1000 that are
not divisible by three, five, or seven.
Solution. Before proceeding to the solution of the task, we will use divisibility
relations to determine the number of all natural numbers smaller than 1000, each
of which can be divided simultaneously by three, five, and seven.
First, we will generally show that if 3|𝑎, 5|𝑎, then 3 ∙ 5 = 15|𝑎, being valid if
3|𝑎, so 𝑎 = 3𝑏, if 5|𝑎, so 𝑎 = 5𝑐. The left sides are equal, so the right sides
must be equal, too. Then
3𝑏 = 5𝑐
Now, we will show that if 15|𝑎, 7|𝑎, then 15 ∙ 7 = 105|𝑎 is valid if 15|𝑎, so
𝑎 = 15𝑒, if 7|𝑎, so 𝑎 = 7𝑓. Since 𝑎 = 𝑎, it holds true that
15𝑒 = 7𝑓
Let us get back to our basic task. There, we have 𝑁 = 1000. Let 𝑎1 be the
property that “the number n is divisible by three“, property 𝑎2 stand for “the
number n is divisible by five“, property 𝑎3 stand for “the number n is divisible
by seven“. At the same time, 𝑁(0) is the number of searched numbers not
divisible by any of the numbers 3, 5, 7.
Every third natural number is divisible by three since 1000 = 3 ∙ 333 + 1. We
have the number 𝑁(𝑎1 ) = 333, that is 333 numbers up to 1000 are divisible by
three. By similar consideration, we determine 𝑁(𝑎2 ) = 200, 𝑁(𝑎3 ) = 142.
49
V. Ďuriš, T. Lengyelfalusy
Now we implement the given task into the Matlab computing environment to
verify the result. First we create the function “count_the_divisors”,
which is the application of the inclusion and exclusion principle:
>> N = 1000;
>> count_the_divisors(N, 3, 5, 7)
50
The Inclusion and Exclusion Principle in View of Number Theory
ans =
457
4 Conclusion
The principle of inclusion and exclusion is a “set problem“ that falls within the
field of discrete mathematics with different applications in combinatorics.
However, this principle also plays a significant role in number theory when
defining the so-called Euler’s function or Fermat’s theorem, or in clarifying and
exploring the fundamental problems of number theory, such as expressing the
distribution of prime numbers among natural numbers on the numerical axis and
many other questions still open today.
The paper offered something different than just a set view of the inclusion and
exclusion principle and its definition using number theory knowledge and the
properties of combinatorial numbers. Our work is a guideline for solving
selected practical tasks in which the involvement of the principle might not be
expected at first sight. We also showed the possible application of ICT and the
Matlab computing environment in solving computational problems in the field
of number theory, which can be concurrently involved in mathematics teaching.
In conclusion, the inclusion and exclusion principle has much more application
than we allege in our short contribution and can be used to solve more difficult
tasks, e.g. in algebra to solve specific systems of equations or to solve various
problems in combination with the Dirichlet principle. Some research shows that
the ability to solve problems also depends on the substitution thinking, which
makes possible to use mathematical knowledge effectively in various areas of
number theory [9].
51
V. Ďuriš, T. Lengyelfalusy
References
[1] J. Sedláček. Faktoriály a kombinační čísla. Praha, Mladá fronta, 1964.
[7] M.J. Erickson. Introduction to Combinatorics. John Wiley & Sons, New
York, ISBN: 0-471-15408-3, 1996.
[9] D. Gonda: The Elements of Substitution Thinking and Its Impact On the
Level of Mathematical Thinking. In: IEJME — MATHEMATICS
EDUCATION, vol. 11, no. 7, p. 2402-2417, Look Academic Publishers,
2016.
52