Вашата кошница е празна
Order of sets, inclusion-exclusion principle
The notation of the order (or cardinal number) of set \latex{A: | A|}.
For example:
- = {two-digit square numbers}, \latex{| A| =6};
- = {the chess figures on the board at the start of the game}, \latex{| B| =32}
Example 1
In a class of \latex{ 30 }, fifteen pupils learn how to play the piano, six pupils learn how to play the violin and two pupils learn how to play both the piano and the violin. How many pupils of the class do not learn how to play either the piano or the violin?
Solution 1
Let us draw a Venn diagram and put the number of pupils belonging to each group into the corresponding parts. (Figure 30)
We put \latex{ 2 } into the intersection of the piano and violin players. As out of the \latex{ 15 } piano players \latex{ 2 } also play the violin, \latex{ 15 – 2 = 13 } pupils play the piano but do not play the violin. Out of the \latex{ 6 } violin players \latex{ 2 } also play the piano, so \latex{ 6 – 2 = 4 } pupils play the violin but do not play the piano. The number of those pupils who do not play the piano and do not play the violin either is: \latex{ 30 – [(15 – 2) + (6 – 2) + 2] = 30 – 19 = 11. }
Solution 2
If we add the number of piano players and violin players, we counted twice those pupils who learn how to play both instruments, so we have to take away their number once. Thus the number of those pupils who play the piano or play the violin is: \latex{ 15 + 6 – 2 = 19 }, therefore
\latex{ 30 – 19 = 11 } pupils of the class do not play either the piano or the violin.
\latex{ 30 – 19 = 11 } pupils of the class do not play either the piano or the violin.
Let us introduce the following notations: let the set of the pupils of the class be: \latex{U}; the set of the piano players be: \latex{A}; the set of the violin players be: \latex{B}. (Figure 31)
Using these notations the above solution is as follows:
\latex{|A\cup B| =| A| +| B| -| A\cap B|} and \latex{| \overline{A\cup B }| =| U| -| A\cup B|}.
Example 2
In the course of a survey \latex{ 100 } people are being asked what source they get the news from. The following results were obtained:
TV: \latex{ 65 }; radio: \latex{ 38 }; newspaper: \latex{ 39 }; TV and radio: \latex{ 27 }; TV and newspaper: \latex{ 20 }; radio and newspaper: \latex{ 9 }; TV, radio and newspaper: \latex{ 6 }.
How many of the people being asked do not get the news from any of the mentioned sources? How many of the people being asked get the news from only one source of the mentioned three sources?
Solution 1
Let us draw a Venn diagram and put the number of people belonging to each group into the corresponding parts. (Figure 32)
- Step 1: Firstly we put \latex{ 6 } into the intersection of the three sets.
- Step 2: Then we put in those who get the news from the TV and the radio but not from the newspapers; their number is \latex{ 27 – 6 = 21. } Then we put in those who get the news from the TV and the newspapers but not from the radio; their number is \latex{ 20 – 6 = 14. } Then we put in those who get the news from the radio and the newspapers but not from the TV; their number is \latex{ 9 – 6 = 3. }
- Step 3: Now we can calculate the number of people who get the news
only from the TV: \latex{ 65 – 21 – 6 – 14 = 24 },
only from the newspapers: \latex{ 39 – 14 – 6 – 3 = 16 },
only from the radio: \latex{ 38 – 21 – 6 – 3 = 8 }.
Therefore \latex{ 24 + 16 + 8 = 48 } of the people being asked get the news from only one source.
- Step 4: \latex{ 24 + 8 + 16 + 14 + + 21 + 3 + 6 = 92 } people being asked get the news from at least one of the three sources, thus the number of people who do not get the news from any of the mentioned sources is: \latex{ 100 – 92 = 8 }.
Solution 2
Let \latex{U} denote the set of people being asked, let \latex{A} denote the set of people who get the news from the TV, \latex{B} the set of those who get the news from the radio, \latex{C} the set of those who get the news from the newspapers. (Figure 33)
Firstly we calculate the number of people who get the news from at least one of the three sources: If we add the number of people getting the news from the TV, from the radio and from the newspapers (\latex{ 65 + 38 + 39 }), then we counted twice those who get the news from both the TV and the radio, from both the TV and the newspapers, from both the radio and the newspapers, so their number should be taken away: \latex{ 65 + 38 + 39 – 27 – 20 – 9 }. But the number of those who get the news from all three sources was added three times, then it was subtracted three times, thus we have to add it once; so the number of people who get the news from at least one of the three sources is: \latex{ 65 + 38 + 39 – 27 – 20 – 9 + 6 = 92. }
This train of thought using set notation is as follows:
\latex{|A\cup B\cup C|=| A| +| B| +| C| -| A\cap B| -| A\cap C|-| B\cap C| +| A\cap B\cap C|}
People who do not get the news from any of the mentioned sources: \latex{ 100 – 92 = 8 }, by using sets:
\latex{|\overline{A\cup B\cup C} |=|U| -| A\cup B\cup C|= }
\latex{=| U|-|A| -|B| -|C| +|A\cap B| +| A\cap C| +|B\cap C| -| A\cap B\cap C|}
\latex{=| U|-|A| -|B| -|C| +|A\cap B| +| A\cap C| +|B\cap C| -| A\cap B\cap C|}
Now we look for the number of people who get the news only from the TV. All together \latex{ 65 } people get the news from the TV, but the number of people who get the news from both the TV and the newspapers and the number of people who get the news from both the TV and the radio should be taken away: \latex{ 65 – 20 – 27 }. In this case we subtracted the number of people who get the news from all three sources twice, thus their number should be added once; so the number of people who get the news only from the TV is \latex{ 65 – 20 – 27 + 6 = 24 }.
Written using the notation of sets:
\latex{|A\cap \overline{B} \cap \overline{C}| =| A|-|A\cap B| -|A\cap C| +| A\cap B\cap C|}.
Similarly the number of people who get the news only from the radio is: :
\latex{38 \,– 27\, – 9 + 6 = 8},
\latex{38 \,– 27\, – 9 + 6 = 8},
\latex{|\overline{A}\cap B\cap \overline{C}| =|B| -|A\cap B| -| B\cap C| +|A\cap B\cap C|}.
And the number of people who get the news only from the newspapers is:
\latex{ 39 – 20 – 9 + 6 = 16 },
\latex{ 39 – 20 – 9 + 6 = 16 },
\latex{|\overline{A}\cap \overline{B}\cap C| =|C| -|A\cap C| -|B\cap C| +|A\cap B\cap C|}.
Therefore \latex{ 24 + 16 + 8 = 48 } of the people being asked get the news from only one source.
The relations denoted by equations (1) and (2) are called the inclusion-exclusion principle.

\latex{| A\cup B|=| A| +|B| -|A\cap B|} and \latex{| \overline{A\cup B}| =|U| -| A\cup B|}
\latex{| A\cup B\cup C| =| A| +| B| +| C| -| A\cap B| -| A\cap C| -| B\cap C|+| A\cap B\cap C| }
(1)
(2)

Exercises
{{exercise_number}}. A pizza seller jotted down \latex{ 100 } orders in a row. \latex{ 60 } customers wanted both cheese and pepperoni, \latex{ 80 } customers wanted cheese and \latex{ 72 } customers wanted pepperoni on their pizza.
- How many people ordered pizza with cheese without pepperoni?
- How many people ordered pizza with pepperoni without cheese?
- How many people did not want either cheese or pepperoni on their pizza?
{{exercise_number}}. In one round of the basketball championship it was counted how many players scored points by \latex{ 2 } point field goals, by \latex{ 3 } point field goals and by penalty throw. \latex{ 70 } players threw \latex{ 2 } point field goals, \latex{ 44 } players threw \latex{ 3 } point field goals and \latex{ 32 } players scored points by penalty throw. \latex{ 19 } players threw both \latex{ 2 } point and \latex{ 3 } point field goals, \latex{ 16 } players threw \latex{ 2 } point field goals and scored points by penalty throw too. \latex{ 21 } players threw \latex{ 3 } point field goals and scored points by penalty throw, and \latex{ 6 } players scored points in all three ways.
- How many players threw only \latex{ 2 } point field goals?
- How many players scored points by \latex{ 2 } or \latex{ 3 } point field goals, but did not score points by penalty throws?
- How many players scored points by \latex{ 2 } or \latex{ 3 } point field goals?
- How many players did not score points by penalty throws?
{{exercise_number}}. A flight of stairs made up of \latex{ 102 } steps lead up to a tower. Dolly climbs \latex{ 1 }, Gladys \latex{ 2 } and Sue \latex{ 3 } steps at a time. How many steps are there on which exactly two of them step before they reach the top?
{{exercise_number}}.
- How many positive integers not greater than \latex{ 100 } are there which are not divisible by either \latex{ 2 } or \latex{ 3? }
- How many positive integers not greater than \latex{ 100 } are there which are not divisible by either \latex{ 2 } or \latex{ 3 } or \latex{ 5? }
- How many positive integers not greater than \latex{ 100 } are there which are not divisible by either \latex{ 2 } or \latex{ 3 } or \latex{ 5 } or \latex{ 7? }
- Count how many prime numbers there are which are not greater than \latex{ 100 }.
{{exercise_number}}. At the school \latex{ 80 }% of the pupils who attend the Maths club play basketball, and \latex{ 30 }% of the basketball players attend the Maths club. If there are a total of \latex{ 15 } pupils in the Maths club, then how many pupils play basketball?
{{exercise_number}}. \latex{ 100 } pupils took part in a Mathematical Olympiad and there were \latex{ 4 } exercises to solve. The first problem was solved by exactly \latex{ 90 } pupils, the second by exactly \latex{ 80 }, the third by exactly \latex{ 70 } and the fourth by exactly \latex{ 60 }. None of the participants solved all four problems. Those who could solve the third and the fourth problem won a prize. How many pupils won a prize?
{{exercise_number}}. Out of the \latex{ 20 } pupils in our class \latex{ 14 } have brown eyes, \latex{ 15 } have dark hair, \latex{ 17 } are heavier than \latex{ 50 } \latex{ kg }, and \latex{ 18 } are taller than \latex{ 160 } \latex{ cm }. Show that at least \latex{ 4 } pupils bear all four characteristics.
{{exercise_number}}. The class has a new teacher. One of the pupils introduced the class in the following way: There are \latex{ 45 } pupils in the class, \latex{ 25 } of them are boys. The number of the excellent pupils is \latex{ 30 }, \latex{ 16 } of them are boys. \latex{ 28 } pupils do sport, \latex{ 18 } of them are boys and \latex{ 17 } of them are excellent students. There are \latex{ 15 } boys who are excellent pupils and also do sport. The teacher told the reporting pupil that there was an error in the report. How could the teacher know it if the teacher had not met anyone from the class before?
{{exercise_number}}. In a group of \latex{ 1,000 } married couples \latex{\frac{2}{3} } of the husbands taller than their wives are also heavier than their wives. \latex{\frac{3}{4} } of the husbands heavier than their wives are taller than their wives. If there are \latex{ 120 } wives who are taller and also heavier than their husbands, then how many husbands are taller and heavier than their wives?
{{exercise_number}}. Out of four sets any two has an element in common; the intersection of any three sets is the empty set. Give sets which correspond to the conditions. Give sets with an order of three which correspond to the conditions. Is it possible to give five sets which correspond to the conditions? Is it possible to give five sets with an order of three which correspond to the conditions?
{{exercise_number}}. Give three subsets of the set of natural numbers for which it is true that the intersection of any two sets has infinitely many elements but the intersection of the three sets is empty.
Puzzle
We cover a square with congruent square-shaped paper sheets, the result can be seen in the figure.
In which order did we put the paper sheets down?

H
A
B
C
D
G
I
F
E






