-
Notifications
You must be signed in to change notification settings - Fork 1
/
set_union_intersection_venn_diagram.tex
402 lines (285 loc) · 14.1 KB
/
set_union_intersection_venn_diagram.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
\yourname
\activitytitle{Union, intersection, Venn diagram, complement, difference}{}
\overview{An introduction to set unions and intersections, Venn diagrams to represent sets, and set complements and differences.
Co-authored by Johanson Berlie.}
% ======================================================================
\definition{Disjoint sets}{
If two sets $A$ and $B$ have no elements in common, we say that they are \textbf{disjoint} sets.
}
\example{
The set consisting of all World War II veterans and the set of all millennials are disjoint sets.
}{0in}
\definition{Comparable sets}{
Two sets A and B are \textbf{comparable} if $A \subseteq B$ or $B \subseteq A$. If this is not the case, then they are said to be \textbf{not comparable}.
}
\example{
The sets A = \{General Motors, Toyota, Ford, Renault\} and B = \{Tesla, Fisker\} are not comparable.
If we define a set C = \{Ford, Toyota\}, then A and C are comparable, since $C \subseteq A$.
}{0in}
\exercise{
For the following questions, compare the sets in the context of the definitions above.
Are they equal?
Are they disjoint?
Are they comparable?
Is one a subset of the other?
In every case, explain why.
\balist{0.2in}
\item The set $A$ of US citizens and the set $B$ of people in the US right now.
\item Think of the set $A$ of US citizens and the set $J$ of citizens of Japan. Do they have any elements in common, or are they disjoint?
This might require an internet search.
\item The set $A = \{ \divideontimes, \boxtimes, \blacktriangleleft, \boxplus \} $ and the set $B = \{ \boxplus, \blacktriangleleft, \divideontimes, \boxtimes \} $
\item The set of humans that have been to more than one planet and the set of humans that have been to Pluto.
\item The set $G$ consisting of the members of the Green Bay Packers on the first play of a game and the set $M$ consisting of the members of the Manchester United soccer team in play during a game.
\item The set $J$ consisting of all employees of the Department of Justice and the set $F$ consisting of all federal employees.
\item Suppose you know that $A \subseteq B$ and also that $B \subseteq A$.
What more can you say about $A$ and $B$ now?
Why?
\item Is it possible for the universal set to be disjoint from any of its subsets? Explain why or why not.
\elist
}{0.1in}
%\definition{}{
%When the objects of a set are set themselves, we call them a \textbf{family of sets} or a \textbf{class of sets}
%}
%\definition{}{
%the \textbf{power set} of any set S is the set of all subsets of S, including the empty set and S itself. The power set of a set S is usually denoted by \textbf{P(S)},
%}
% ======================================================================
\definition{Union of sets}{
The \textbf{union} of sets A and B is a new set, consisting of all elements which belong to A or to B or to both. We denote this by $A \cup B$.
}
\definition{Intersection of sets}{
The \textbf{intersection} of sets A and B is a new set, consisting of all elements which belong to both A and B. We denote this by $A \cap B$.
}
\example{
Let $C$ be the set of Computer Science majors and $M$ be the set of Mathematics majors.
Then $C \cap M$ is the set of students double majoring in Computer Science and Mathematics (a powerful combination!) while $C \cup M$ is the set of students majoring in one, the other, or both majors.
}{0in}
\exercise{ Answer the following, expressing the answers as sets where possible.
\balist{0.2in}
\item If $P=\{red, blue, yellow\}$, $S=\{purple, green, orange\}$, $M=\{red, green, blue\},$ find:
\item $P \cup S$
\item $P \cap M$
\item $P \cup S \cup M$
\item $P \cap S \cap M$
\item What is $A \cap A$? What about $A \cup A$?
\item Is it always true that $A \cup B=B \cup A$? Explain.
\item If $A\subseteq B$ then what is $A \cup B$?
\item Is $A \cap B$ a subset of $A$? Is $A \cap B$ a subset of $B$? Explain.
\item What is $\varnothing \cap A$? Does it depend on the set $A$? Explain why or why not.
\item What is $\varnothing \cup A$? Does it depend on the set $A$? Explain why or why not.
\item If $A \cup B=\varnothing$, can we say anything about $A$ or $B$? Is there something special about them? Explain.
\item If $A$ and $B$ are disjoint, what can we say about $A \cap B$?
\item If $A\subseteq B$ and $B$ and $C$ are disjoint, then what about $A$ and $C$?
\item If $U$ denotes the universal set, is it true that $U \cap A=A \cap \varnothing$? Explain.
\elist
}{0.1in}
% =====================================================================
\definition{Universal set}{
If all of the sets under discussion are subsets of a fixed set, this set is called the \textbf{universal set} or \textbf{universe of discourse} and denoted by \textbf{U}.
Sometimes there is more than one possibility for $U$.
}
\example{
If we were studying the citizenship of people around the world, the universal set would consist of all the people on earth.
Citizens of the US would be one interesting set, citizens of Canada would be another.
Do these two sets have any elements in common? If so, how could that happen?
}{0in}
\example{
If we were studying binary stars, the universal set would be all the stars in the universe.
}{0in}
\exercise{~
\balist{0.2in}
\item When thinking of prime numbers, what is a good choice for the universal set?
\item When solving linear equations like $5x + 7 = 3$, what a good choice for the universal set?
\item When solving quadratic equations like $x^2 + 5x + 8 = 0$, what is the universal set?
\item Is it possible for the universal set to be empty? Explain why or why not.
\item If two sets $A$ and $B$ are subsets of a given universal set, $U$, is it possible that $A = U$ or $B = U$? Explain why or why not.
\elist
}{0.1in}
% ===================================================================
\definition{Venn diagram}{
A Venn diagram (also called \textbf{primary diagram}, \textbf{set diagram} or \textbf{logic diagram}) is a picture that shows all possible logical relations between a finite collection of sets. These diagrams depict elements as points in the plane, and sets as regions inside closed curves.
}
\remark{
This definition might seem complicated, but for our purposes we will think of Venn diagrams as circles that represent sets. The following examples will help make this clear.
}
\example{
To represent a single set using a Venn diagram, we draw a single circle (representing the set) inside a rectangle (representing the universal set).
We usually write the label for a given set inside the curve that represents it.
Note that the set $A$ could be empty but we still draw it with a circle; it may take a while to get used to that.
\begin{tikzpicture}[fill=gray]
% outline
\draw (0,0) circle (1) (0,0.9) node [text=black,below] {$A$}
(-2,-2) rectangle (3,2) (2.5,1.5) node [text=black,above] {$U$};
\end{tikzpicture}
}{0in}
\example{
The representation in the above example can be extended to any finite number of sets. If want to represent two disjoint sets, A and B, we can represent them as below.
\begin{tikzpicture}[fill=gray]
% outline
\draw (0,0) circle (1) (0,0.9) node [text=black,below] {$A$}
(2.5,0) circle (1) (2.5,0.9) node [text=black,below] {$B$}
%(5,0) circle (1) (5,1) node [text=black,above] {$C$}
(-2,-2) rectangle (4.5,2)
(4,1.5) node [text=black,above] {$U$};
\end{tikzpicture}
\noindent
The circles do not overlap, to indicate that the sets are disjoint.
Note that $A$ or $B$ or both could actually be empty sets, a bit like looking down into empty paper bags.
}{0in}
\remark{
The power of Venn diagrams is that they make it easy to understand set relations and operations.
Let's look at a few examples.
}
\example{
If B is a subset of A, that is, if $B \subseteq A$ we can represent this as below.
\begin{tikzpicture}[fill=gray]
% outline
\draw (0,0) circle (1.5) (0,1.3) node [text=black,below] {$A$}
(0.5,-0.3) circle (0.7) (0.5,0.3) node [text=black,below] {$B$}
(-2,-2) rectangle (3,2) (2.5,1.5) node [text=black,above] {$U$};
\end{tikzpicture}
\noindent
Note that it is possible that $B = A$; the blank areas in the diagram may or may not contain points; they may be empty.
}{0in}
\example{
If B is a proper subset of A, we can represent this with a dot outside B, but within A.
\begin{tikzpicture}[fill=gray]
% outline
\draw (0,0) circle (1.5) (0,1.3) node [text=black,below] {$A$}
(0.5,-0.3) circle (0.7) (0.5,0.3) node [text=black,below] {$B$}
(-0.5,0) node [text=black,above] {$\bullet$}
(-2,-2) rectangle (3,2) (2.5,1.5) node [text=black,above] {$U$};
\end{tikzpicture}
\noindent
Now it's clear that every element of $B$ is also an element of $A$, but that there is an element of $A$ that is not an element of $B$.
It could be that $B$ is empty.
}{0in}
\example{
The generic picture of two sets $A$ and $B$ shows them overlapping, but not completely:
\begin{tikzpicture}[fill=gray]
% outline
\draw (0,0) circle (1) (-0.3,0.8) node [text=black,below] {$A$}
(1,0) circle (1) (1.3,0.8) node [text=black,below] {$B$}
(-2,-2) rectangle (3,2) (2.5,1.5) node [text=black,above] {$U$};
\end{tikzpicture}
}{0in}
\example{
To indicate the intersection of $A$ and $B$, we shade $A \cap B$ as below, even if it is possible that the intersection is an empty set:
\begin{tikzpicture}[fill=gray]
\scope % A \cap B
\clip (0,0) circle (1);
\fill (1,0) circle (1);
\endscope
% outline
\draw (0,0) circle (1) (-0.3,0.8) node [text=black,below] {$A$}
(1,0) circle (1) (1.3,0.8) node [text=black,below] {$B$}
(-2,-2) rectangle (3,2) (2.5,1.5) node [text=black,above] {$U$};
\end{tikzpicture}
}{0in}
\example{
If we know that A and B, are not disjoint, we indicate this by a dot inside the region of their overlap.
\begin{tikzpicture}[fill=gray]
\scope % A \cap B
\clip (0,0) circle (1);
%\fill (1,0) circle (1);
\endscope
% outline
\draw (0,0) circle (1) (-0.3,0.8) node [text=black,below] {$A$}
(1,0) circle (1) (1.3,0.8) node [text=black,below] {$B$}
(0.5,-0.2) node [text=black,above] {$\bullet$}
(-2,-2) rectangle (3,2) (2.5,1.5) node [text=black,above] {$U$};
\end{tikzpicture}
}{0in}
\example{
For two sets A and B, we represent $A \cup B$ as below:
\begin{tikzpicture}[fill=gray]
\scope % A \cap B
\fill (1,0) circle (1);
\fill (0,0) circle (1);
\endscope
% outline
\draw (0,0) circle (1) (-0.3,0.8) node [text=black,below] {$A$}
(1,0) circle (1) (1.3,0.8) node [text=black,below] {$B$}
(-2,-2) rectangle (3,2) (2.5,1.5) node [text=black,above] {$U$};
\end{tikzpicture}
}{0in}
\example{
For three sets A, B and C, we draw them to allow for all possible intersections.
We represent $A \cap B \cap C$ as below, even though it may actually be an empty set:
\begin{tikzpicture}[fill=gray]
\scope % A \cap B
\clip (0,0) circle (1);
\clip (0.5,1) circle (1);
\fill (1,0) circle (1);
\endscope
% outline
\draw (0,0) circle (1) (-0.4,-0.4) node [text=black] {$A$}
(1,0) circle (1) (1.4,-0.4) node [text=black] {$B$}
(0.5,1) circle (1) (0.5,1.6) node [text=black] {$C$}
(-2,-2) rectangle (3,3) (2.5,2.5) node [text=black,above] {$U$};
\end{tikzpicture}
}{0in}
\exercise{
For the following questions, represent your answers as Venn diagrams, where possible. If a Venn diagram is not possible, explain why.
\balist{0.8in}
\item Make a Venn diagram for sets $A$ and $B$, showing that $A$ and $B$ are disjoint, and shade $A \cup B$.
\item Make a Venn diagram for sets $A$, $B$, and $C$, showing that $B$ and $C$ are disjoint.
Shade the set $(A\cap B)\cup C$.
\item Make a Venn diagram for sets $A$, $B$, and $C$, showing that $A \cap B \cap C$ is empty, and shading $(A \cap B) \cup (A \cap C) \cup (B \cap C)$.
\item Make a Venn diagram for sets $A$, $B$, and $C$, showing that $A$ and $B$ are not disjoint and that $C \subset B$ but $C$ is disjoint from $A$.
\item Make a Venn diagram for sets $A$, $B$, and $C$, showing that $A \cap B \subset C$, but $C \subset A \cup B$.
\vspace{8em}
\elist
}{0.4in}
% =====================================================================
\definition{Set complement}{
The \textbf{complement} of a set A is the set of elements that do not belong to A.
Therefore, it is every element of the universal set $U$ that is not an element of $A$.
We denote the complement of A as $A^c$ or $A'$.
Visually, we represent this as:
\begin{tikzpicture}[fill=gray]
\scope % A^c
\filldraw (-2,-2) rectangle (3,2) (2.5,1.5) node [text=black,above] {$U$};
\fill[white] (0,0) circle (1);
\endscope
% outline
\draw (0,0) circle (1) (0,0.4) node [text=black,above] {$A$}
(1.2,1) node [text=black,above] {$A^c$};
\end{tikzpicture}
}
\definition{Set difference}{
The \textbf{difference} of sets A and B is the set of elements which belong to A but not to B. We denote this as $A-B$ or $A \setminus B$. Visually, we represent this by drawing $A$ and $B$ and shading the elements in $A$ but not in $B$.
\begin{tikzpicture}[fill=gray]
% left hand
\scope
\clip (-2,-2) rectangle (2,2)
(1,0) circle (1);
\fill (0,0) circle (1);
\endscope
% right hand
%\scope
%\clip (-2,-2) rectangle (2,2)
%(0,0) circle (1);
%\fill (1,0) circle (1);
%\endscope
% outline
\draw (0,0) circle (1) (-0.3,0.8) node [text=black,below] {$A$}
(1,0) circle (1) (1.3,0.8) node [text=black,below] {$B$}
(-2,-2) rectangle (3,2) (2.5,1.5) node [text=black,above] {$U$};
\end{tikzpicture}
%TODO: explain difference of sets as relative complement
}
%TODO: add a remark explaining the concept of relative complement
%\definition{}{
%The \textbf{Cartesian product} of two sets A and B, denoted by A $\times$ B is the set of all ordered pairs $(a,b)$ where a $\in$ A and b $\in$ B. It can be specified using set-builder notation, i.e. $A \times B=\{(a,b) : a\in A$ and $b\in B\}$.
%}
\exercise{
For the following questions, start by drawing a Venn diagram for sets $A$ and $B$, then shade the desired set or sets.
For more than one set, use different shading for each one.
\balist{0.8in}
\item $(A \cap B)^c$, given that $A$ and $B$ are not disjoint.
\item $(A^c \cup B^c)$, given that $A$ and $B$ are not disjoint.
\item $A^c$ and $A^c \setminus B$.
\item Supposing that $B \subset A$, shade in $A \setminus B$.
\elist
}{0.0in}