Intersection of sets lesson plan in computer science (2nd grade) on the topic


Intersection of many

Consider two sets: the set of John's friends and the set of Michael's friends.

John's friends = {Tom, Fred, Max, George }
Michael's friends = {Leo, Tom, Fred, Evan }

We see that Tom and Fred are both friends of John and Michael.

In the language of sets, the elements Tom and Fred belong to both the set of John's friends and the set of Michael's friends.

Let's define a new set called “Mutual friends of John and Michael” and add Tom and Fred to it as elements:

Mutual friends of John and Michael= { Tom, Fred }

In this case, the set “Mutual friends of John and Michael” is the intersection of the sets of friends of John and Michael.

The intersection of two (or several) original sets is a set that consists of elements belonging to each of the original sets.

In our case, the elements Tom and Fred belong to each of the original sets, namely, the set of John's friends and the set of Michael's friends.

Let's denote the set of John's friends by the letter A, the set of Michael's friends by the letter B, and the set of mutual friends of John and Michael by the letter C:

A = { Tom, Fred, Max, George }

B = { Leo, Tom, Fred, Evan }

C = { Tom, Fred }

Then the intersection of sets A and B will be set C and written as follows:

A ∩ B = C

The symbol means intersection.

When speaking about a set, we usually mean the elements belonging to this set. The intersection symbol ∩ is read as the conjunction AND . Then the expression A ∩ B = C can be read as follows:

“The elements belonging to the set A AND the set B are the elements belonging to the set C.”

Or even simpler:

“Friends that are both John AND Michael are mutual friends of John and Michael.”

Now imagine that John and Michael have no mutual friends. For convenience, as before, we denote the set of John's friends by the letter A, and the set of Michael's friends by the letter B

A = { Max, George }

B = { Leo, Evan }

In this case, they say that the original sets do not have common elements and the intersection of such sets is the empty set. The empty set is denoted by the symbol ∅

A ∩ B = ∅

Example 2 . Consider two sets: set A, consisting of the numbers 1, 2, 3, 5, 7 and set B, consisting of the numbers 1, 2, 3, 4, 6, 12, 18

A = { 1, 2, 3, 5, 7 }

B = { 1, 2, 3, 4, 6, 12, 18 }

Let's define a new set C and add elements to it that simultaneously belong to set A and set B

C = { 1, 2, 3 }

Set C is the intersection of sets A and B, since elements of set C simultaneously belong to set A and set B

Example 3 . Consider two sets: set A, consisting of the numbers 1, 5, 7, 9 and set B, consisting of the numbers 1, 4, 5, 7

A = { 1, 5, 7, 9 }

B = { 1, 4, 5, 7 }

Let's define a new set C and add elements to it that simultaneously belong to set A and set B

C = { 1, 5, 7 }

Set C is the intersection of sets A and B, since elements of set C simultaneously belong to set A and set B.

Example 4 . Find the intersection of the following sets:

A = { 1, 2, 3, 7, 9 }

B = {1, 3, 5, 7, 9}

C = {3, 4, 5, 8, 9}

The intersection of the sets A, B and C will be a set consisting of elements belonging to each of the sets A, B and C. These elements are the numbers 3 and 9.

Let's define a new set D and add elements 3 and 9 to it. Then, using the intersection symbol ∩, we write that the intersection of the sets A, B and C is the set D

D = {3, 9}

A ∩ B ∩ C = D

To find the intersection, it is not at all necessary to define sets using letters. If there are few elements, then the set can be defined by direct enumeration of the elements.

For example, let the first set consist of elements 1, 3, 5, and the second set of elements 2, 3, 5. The intersection in this case is the set consisting of elements 3 and 5. To write the intersection, you can use direct enumeration:

{ 1, 3, 5 } ∩ { 2, 3, 5 } = { 3, 5 }

The numerical intervals that we looked at in previous lessons are also sets. The elements of such sets are the numbers included in the numerical interval.

For example, the segment [2; 6] can be understood as the set of all numbers from 2 to 6. For clarity, we can list all the integers belonging to this segment:

2, 3, 4, 5, 6 ∈ [2; 6]

Please note that we have only listed integers. The segment [2; 6] also include other numbers that are not integers, for example, decimal fractions. Decimal fractions are located between whole numbers, but their number is so large that it is not possible to list them.

Another example. The interval (2; 6) can be understood as the set of all numbers from 2 to 6, except for the numbers 2 and 6. Earlier we said that an interval is a numerical interval whose boundaries do not belong to it. For clarity, we can list all the integers belonging to the interval (2; 6):

3, 4, 5 ∈ (2; 6)

Since numerical intervals are sets, we can find intersections between different numerical intervals. Let's look at a few examples.

Example 5 . Two numerical intervals are given: [2; 6] and [4; 8]. Find their intersection.

Both spaces are surrounded by square brackets, which means their boundaries belong to them.

For clarity, we list all the integers belonging to the intervals [2; 6] and [4; 8]:

2, 3, 4, 5, 6 ∈ [2; 6]

4, 5, 6, 7, 8 ∈ [4; 8]

It can be seen that the numbers 4, 5, 6 belong to both the first interval [2; 6], and the second [4; 8].

Then the intersection of numerical intervals [2; 6] and [4; 8] will be the numerical interval [4; 6]

[2; 6] ∩ [4; 8] = [4; 6]

Let us depict the intervals [2; 6] and [4; 8] on the coordinate line. On the upper area we mark the numerical interval [2; 6], on the bottom there is a gap [4; 8]

It can be seen that the numbers belonging to the interval [4; 6], belong both to the interval [2; 6], and the interval [4; 8]. You can also notice that the strokes included in the spaces [2; 6] and [4; 8] intersect in the interval [4; 6]. In such a situation, when there is a coordinate line before your eyes, the concept of intersection of sets can be understood in the literal sense, which is very convenient.

Example 6 . Find the intersection of the numerical intervals [−2; 3] and [4; 7]

Both spaces are surrounded by square brackets, which means their boundaries belong to them.

For clarity, we list all the integers belonging to the intervals [−2; 3] and [4; 7]:

−2, −1, 0, 1, 2, 3 ∈ [−2; 3]

4, 5, 6, 7 ∈ [4; 7]

It can be seen that the numerical intervals [−2; 3] and [4; 7] do not have common numbers. Therefore, their intersection will be the empty set:

[−2; 3] ∩ [4; 7] = Ø

If we depict numerical intervals [−2; 3] and [4; 7] on the coordinate line, you can see that they do not intersect anywhere:

Example 7 . Given a set of one element { 2 }. Find its intersection with the interval (−3; 4)

A set consisting of one element { 2 } is depicted on the coordinate line as a filled circle, and the numerical interval (−3; 4) is an interval whose boundaries do not belong to it. This means that the boundaries −3 and 4 will be depicted as empty circles:

The intersection of the set { 2 } and the numerical interval (−3; 4) will be a set consisting of one element { 2 }, since element 2 belongs to both the set { 2 } and the numerical interval (−3; 4)

{ 2 } ∩ (−3; 4) = { 2 }

In fact, we have already dealt with the intersection of numerical intervals when we solved systems of linear inequalities. Remember how we solved them. First, we found many solutions to the first inequality, then many solutions to the second. Then we found many solutions that satisfy both inequalities.

Essentially, the set of solutions satisfying both inequalities is the intersection of the sets of solutions to the first and second inequalities. The role of these sets is taken by numerical intervals.

For example, to solve a system of inequalities, we must first find the sets of solutions to each inequality, then find the intersection of these sets.

In this example, the solution to the first inequality x ≥ 3 is the set of all numbers that are greater than 3 (including the number 3 itself). In other words, the solution to the inequality is the numerical interval [3; +∞)

The solution to the second inequality x ≤ 6 is the set of all numbers that are less than 6 (including the number 6 itself). In other words, the solution to the inequality is the numerical interval (−∞; 6]

And the general solution of the system will be the intersection of the sets of solutions to the first and second inequalities, that is, the intersection of numerical intervals [3; +∞) and (−∞; 6]

If we depict the set of solutions of the system on the coordinate line, we will see that these solutions belong to the interval [3; 6], which in turn is the intersection of the intervals [3; +∞) and (−∞; 6]

[3; +∞) ∩ (−∞; 6] = [3; 6]

Therefore, as an answer, we indicated that the values ​​of the variable x belong to the numerical interval [3; 6], that is, the intersection of the sets of solutions to the first and second inequalities

x ∈ [3; 6]

Example 2 . Solve inequality

All inequalities included in the system have already been resolved. It is only necessary to indicate those solutions that are common to all inequalities.

The solution to the first inequality is the numerical interval (−∞; −1).

The solution to the second inequality is the numerical interval (−∞; −5).

The solution to the third inequality is the numerical interval (−∞; 4).

The solution to the system will be the intersection of the numerical intervals (−∞; −1), (−∞; −5) and (−∞; 4). In this case, this intersection is the interval (−∞; −5).

(−∞; −1) ∩ (−∞; −5) ∩ (−∞; 4) = (−∞; −5)

-5 -1 i 4 on checkpoint

The figure shows numerical intervals and the inequalities by which these numerical intervals are defined. It can be seen that numbers belonging to the interval (−∞; −5) simultaneously belong to all original intervals.

Let's write the answer to the system using a numerical interval:

x ∈ (−∞;−5)

Example 3 . Solve inequality

The solution to the first inequality y > 7 is the numerical interval (7; +∞).

The solution to the second inequality y < 4 is the numerical interval (−∞; 4).

The solution to the system will be the intersection of the numerical intervals (7; +∞) and (−∞; 4).

In this case, the intersection of the numerical intervals (7; +∞) and (−∞; 4) is an empty set, since these numerical intervals do not have common elements:

(7; +∞) ∩ (−∞; 4) = ∅

If you depict the numerical intervals (7; +∞) and (−∞; 4) on the coordinate line, you can see that they do not intersect anywhere:

Set Operations

In addition to union and intersection, there are other operations:

For two sets A and B, their difference can be defined as the set of elements included in A and not contained in B:

(A\B)

Considering a certain set as containing all the others, we can come to the concept of “complement”, as the collection of all elements not included in A:

Thanks to this operation, the properties of union and intersection can be extended/

De Morgan's Law:

Union of sets

The union of two (or several) original sets is a set that consists of elements belonging to at least one of the original sets.

In practice, the union of sets consists of all elements belonging to the original sets. That is why they say that the elements of such a set belong to at least one of the original sets.

Consider a set A with elements 1, 2, 3 and a set B with elements 4, 5, 6.

A = { 1, 2, 3 }

B = { 4, 5, 6 }

Let's define a new set C and add to it all the elements of set A and all the elements of set B

C = { 1, 2, 3, 4, 5, 6 }

In this case, the union of sets A and B is set C and is denoted as follows:

A ∪ B = C

The symbol ∪ means union and replaces the conjunction OR . Then the expression A ∪ B = C can be read as follows:

Elements belonging to set A OR set B are elements belonging to set C.

The definition of a union states that the elements of such a set belong to at least one of the original sets. This phrase can be understood in its literal sense.

Let's return to the set C we created, which includes all the elements of sets A and B. Let's take element 5 from this set as an example. What can we say about it?

If 5 is an element of set C, and set C is the union of sets A and B, then we can confidently say that element 5 belongs to at least one of the sets A and B. This is true:

A = { 1, 2, 3 }

B = { 4, 5, 6 }

C = { 1, 2, 3, 4, 5, 6 }

Let's take another element from set C, for example, element 2. What can we say about it?

If 2 is an element of set C, and set C is the union of sets A and B, then we can confidently say that element 2 belongs to at least one of the sets A and B. This is true:

A = {1, 2, 3}

B = {4, 5, 6}

C = { 1, 2, 3, 4, 5, 6 }

If we want to combine two or more sets and suddenly discover that one or more elements belong to each of these sets, then the repeated elements will be included in the union only once.

For example, consider a set A with elements 1, 2, 3, 4 and a set B with elements 2, 4, 5, 6.

A = {1, 2, 3, 4}

B = {2, 4, 5, 6}

We see that elements 2 and 4 simultaneously belong to both set A and set B. If we want to combine sets A and B, then the new set C will contain elements 2 and 4 only once. It will look like this:

C = { 1, 2, 3, 4, 5, 6 }

In order to avoid mistakes when merging, they usually do this: first, add all the elements of the first set to the new set, then add elements of the second set that do not belong to the first set. Let's try to make such a union with sets A and B.

So, we have the following initial sets:

A = { 1, 2, 3, 4 }

B = { 2, 4, 5, 6 }

Let's define a new set C and add to it all the elements of set A

C = { 1, 2, 3, 4,

Now let's add elements from set B that do not belong to set A. Set A does not belong to elements 5 and 6. Let's add them to set C

C = { 1, 2, 3, 4, 5, 6 }

Example 2 . John's friends are Tom, Fred, Max and George. And Michael's friends are Leo, Tom, Fred and Evan. Find the union of sets of friends of John and Michael.

First, let's define two sets: the set of John's friends and the set of Michael's friends.

John's friends = {Tom, Fred, Max, George }
Michael's friends = {Leo, Tom, Fred, Evan }

Let's create a new set called “All the friends of John and Michael” and add all the friends of John and Michael to it.

Note that Tom and Fred are both friends of John and Michael, so we will add them to the new set only once, since there cannot be two Toms and two Freds at once.

All John and Michael's friends= { Tom, Fred, Max, George, Leo, Evan }

In this case, the set of all friends of John and Michael is the union of the sets of friends of John and Michael.

John's Friends ∪ Michael's Friends = All John and Michael's Friends

Example 3 . Given two numerical intervals: [−7; 0] and [−3; 5]. Find their union.

Both spaces are surrounded by square brackets, which means their boundaries belong to them.

For clarity, we list all the integers belonging to these intervals:

−7, −6, −5, −4, −3,−2, −1, 0 ∈ [−7; 0]

−3,−2, −1, 0, 1, 2, 3, 4, 5 ∈ [−3; 5]

By combining numerical intervals [−7; 0] and [−3; 5] will be the numerical interval [−7; 5], which contains all the numbers in the interval [−7; 0] and [−3; 5] without repeating some of the numbers

−7, −6, −5, −4, −3,−2, −1, 0, 1, 2, 3, 4, 5 ∈ [−7; 5]

Please note that the numbers −3, −2, −1 belonged to both the first interval and the second. But since such elements can only be included in a union once, we included them once.

This means that by combining the numerical intervals [−7; 0] and [−3; 5] will be the numerical interval [−7; 5]

[−7; 0] ∪ [−3; 5] = [−7; 5]

Let us represent the intervals [−7; 0] and [−3; 5]. On the upper area we mark the numerical interval [−7; 0], on the bottom - the interval [−3; 5]

Previously, we found out that the interval [−7; 5] is the union of the intervals [−7; 0] and [−3; 5]. Here it is useful to recall the definition of a union of sets, which was given at the very beginning. A union is interpreted as a set consisting of all elements belonging to at least one of the original sets.

Indeed, if we take any number from the interval [−7; 5], then it turns out that it belongs to at least one of the intervals: either the interval [−7; 0] or the interval [−3; 5].

Let's take from the interval [−7; 5] any number, for example the number 2. Since the interval [−7; 5] is the union of the intervals [−7; 0] and [−3; 5], then the number 2 will belong to at least one of these intervals. In this case, the number 2 belongs to the interval [−3; 5]

Let's take another number. For example, the number −4. This number will belong to at least one of the intervals: [−7; 0] or [−3; 5]. In this case it belongs to the interval [−7; 0]

Let's take another number. For example, the number −2. It belongs to both the interval [−7; 0], and the interval [−3; 5]. But on the coordinate line it is indicated only once, since there are no two numbers −2 at the same point.

Not every union of number intervals is a number interval. For example, let's try to find the union of numerical intervals [−2; −1] and [4; 7].

The idea remains the same - combining the numerical intervals [−2;−1] and [4; 7] will be a set consisting of elements belonging to at least one of the intervals: [−2; −1] or [4; 7]. But this set will not be a numerical interval. For clarity, we list all the integers belonging to this union:

[−2; −1] ∪ [4; 7] = { −2, −1, 4, 5, 6, 7 }

We got the set { −2, −1, 4, 5, 6, 7 }. This set is not a numerical interval due to the fact that the numbers located between −1 and 4 are not included in the resulting set

The numeric span must contain all numbers from the left border to the right. If one of the numbers is missing, then the numerical interval becomes meaningless. Let's say there is a ruler 15 cm long

This ruler is the numeric interval [0; 15], since it contains all numbers in the range from 0 to 15 inclusive. Now imagine that on the ruler, after the number 9, the number 12 immediately follows.

This ruler is not a 15cm ruler and is not advisable to use for measuring. Also, it cannot be called the numerical interval [0; 15] because it does not contain all the numbers it should contain.

Set notations. Signs for union and intersection of sets

A special symbol system is used to denote sets. The simplest way to describe a set is to use curly braces, inside which the elements are listed separated by commas:

$A = \{0, -1, 2, 5, 8, 77\}$

The disadvantage of this notation is that it can be used to define a set only if it contains a finite and not too large number of elements. Therefore, a universal method of defining sets is more often used - using a characteristic property, i.e. one that is inherent in all its elements of the set, and which is not possessed by objects outside the set:

Finished works on a similar topic

  • Coursework Intersection and union of sets 430 rub.
  • Abstract Intersection and union of sets 250 rub.
  • Test work Intersection and union of sets 230 rub.

Receive completed work or specialist advice on your educational project Find out the cost

$A = \{x \vee P(x)\}$,

where $P(x)$ is a characteristic property.

In this form, the union is written as

$A \cup B = \{x | x \in A \vee x \in B\}$,

and the intersection is like

$A \cap B = \{x | x \in A \wedge x \in B\}$

The signs $\vee$ and $\wedge$ denote “or” and “and”, respectively. The $|$ sign is read as “such that.”

To denote sets as numerical intervals, parentheses and square brackets are used. For example, the notation $[4, 24)$ means the range of numbers from $4$ to $24$, and the number $4$ is included in this set, but $24$ is not, although any number less than $24$ belongs to this set.

To graphically express the operations of intersection and union, the signs of intersection and union of sets are used:

  • $A \cup B$ is the union of the sets $A$ and $B$$;;
  • $A \cap B$ is the intersection of the sets $A$ and $B$$..

To remember these symbols as a mnemonic, you can think of the association symbol $\cup$ as being like a container with an open top into which you can put things. The intersection sign $\cap$, on the contrary, is like an inverted glass, preventing inappropriate elements from entering inside.

Too lazy to read?

Ask a question to the experts and get an answer within 15 minutes!

Ask a Question

Solving inequalities containing the sign ≠

Some inequalities contain an (not equal) sign. For example, 2x ≠ 8. To solve this inequality, you need to find the set of values ​​of the variable x for which the left side is not equal to the right side.

Let's solve the inequality 2x ≠ 8. Divide both sides of this inequality by 2, then we get:

We have obtained an equivalent inequality x ≠ 4. The solution to this inequality is the set of all numbers not equal to 4. That is, if we substitute into the inequality x ≠ 4 any number that is not equal to 4, we will obtain a true inequality.

Let's substitute, for example, the number 5

5 ≠ 4 is a true inequality because 5 is not equal to 4

Let's substitute 7

7 ≠ 4 is a true inequality because 7 is not equal to 4

And since the inequality x ≠ 4 is equivalent to the original inequality 2x ≠ 8, then the solutions to the inequality x ≠ 4 will also apply to the inequality 2x ≠ 8. Let us substitute the same test values ​​5 and 7 into the inequality 2x ≠ 8.

2 × 5 ≠ 8

2 × 7 ≠ 8

Let us depict the set of solutions to the inequality x ≠ 4 on the coordinate line. To do this, we will cut out point 4 on the coordinate line, and highlight the entire remaining area on both sides with strokes:

Now let's write the answer in the form of a numerical interval. To do this, we will use the union of sets. Any number that is a solution to the inequality 2x ≠ 8 will belong either to the interval (−∞; 4) or to the interval (4; +∞). So we write that the values ​​of the variable x belong to (−∞; 4) or (4; +∞). Recall that for the word “or” the symbol ∪ is used

x ∈ (−∞; 4) ∪ (4; +∞)

This expression says that the values ​​​​taken by the variable x belong to the interval (−∞; 4) or the interval (4; +∞).

Inequalities containing the sign can also be solved like ordinary equations. To do this, the is replaced with the = . Then you get the usual equation. At the end of the solution, the found value of the variable x must be excluded from the set of solutions.

Let's solve the previous inequality 2x ≠ 8 as an ordinary equation. Replace the ≠ sign with the equal sign =, we get the equation 2x = 8. Divide both sides of this equation by 2, we get x = 4.

We see that when x equals 4, the equation turns into a true numerical equality. For other values, equality will not be observed. These other meanings are what interests us. And to do this, it is enough to exclude the found four from the set of solutions.

Example 2 . Solve the inequality 3x − 5 ≠ 1 − 2x

Let's move −2x from the right side to the left side, changing the sign, and move −5 from the left side to the right side, again changing the sign:

Let us present similar terms in both parts:

Divide both sides of the resulting inequality by 5

The solution to the inequality x ≠ 1.2 is the set of all numbers not equal to 1.2.

Let us depict the set of solutions to the inequality x ≠ 1.2 on the coordinate line and write the answer in the form of a numerical interval:

x ∈ (−∞; 1,2) ∪ (1,2; +∞)

This expression says that the values ​​​​taken by the variable x belong to the interval (−∞; 1,2) or the interval (1,2; +∞)

Rating
( 1 rating, average 5 out of 5 )
Did you like the article? Share with friends: