Mathematics for Master Students
Which tasks gave you trouble? Bring them up now: we take the time to go through them before we move on to today’s topic.
Question
Negate: “Every customer pays by card or in cash.”
“Some customer pays neither by card nor in cash”: \(\forall\) becomes \(\exists\), and Session 1's De Morgan turns “or” into “neither … nor”.
Common Mistake
“Some customer does not pay by card or does not pay in cash” keeps the “or”: by De Morgan it must become “and”.
The roastery has to decide who gets a phone call, and how many bags it can plan per week. Today: describe each group as a set, then combine sets with “and”, “or” and “not”.
The roastery from Session 1 sells to eight café customers:
| Customer | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|---|---|---|
| premium contract | ✓ | ✓ | ✓ | ✓ | ||||
| lost this year | ✓ | ✓ | ✓ | ✓ | ||||
| reads the newsletter | ✓ | ✓ | ✓ | ✓ |
Question
Which customers are premium, lost, and not reached by the newsletter? They get a phone call.
Only customer \(3\). By the end of today, this search fits in one line.
To find customer \(3\) you only needed who is on each list: not the order, not how often.
A set is an unordered collection of distinct objects, called its elements.
Membership is the most basic set statement:
Every “is it in or not?” question has a clear yes/no answer: that is what makes a set well-defined.
Question
The roastery roasts whole bags, at most \(500\) a week. How do you write down every possible weekly quantity?
Set-builder notation is a filter: keep the elements of a base set that pass a condition, as a database query does.
The same filter pattern appears throughout your courses:
Every filter has the same three parts: a base set, a colon, and a condition. Change the condition, and you have a new filter.
Question
How many elements does \(\{x \in \mathbb{Z} : x^2 \leq 4\}\) have? Shout the number.
Five: the set is \(\{-2, -1, 0, 1, 2\}\).
Common Mistake
Answering \(3\) (only \(0, 1, 2\)) forgets that the base set is \(\mathbb{Z}\): negative integers square to positive numbers, so \(-1\) and \(-2\) pass the filter too.
Set-builder comes in two shapes:
Question
A pallet holds \(40\) bags. Which set is \(\{40k : k \in \{1, 2, 3\}\}\)? Shout the elements.
\(\{40, 80, 120\}\): the bag counts for one, two or three pallets. Before the colon, \(x \in A\) means filter, an expression like \(40k\) means collect.
The empty set \(\emptyset = \{\}\) contains no elements at all.
Common Mistake
\(\emptyset \neq \{0\}\): the set containing zero has one element. The empty set has none.
\(A \subseteq B\): every element of \(A\) is also in \(B\) (“\(A\) is a subset of \(B\)”).
\(\subseteq\) works like \(\leq\) and \(\subset\) like \(<\): the extra line allows equality.
Let \(F = \{x \in \mathbb{N} : x \text{ is divisible by } 4\}\) and \(E = \{x \in \mathbb{N} : x \text{ is even}\}\).
To prove \(A \subseteq B\), argue for an arbitrary element. To disprove it, one counterexample suffices: Session 1's \(\forall\) versus \(\exists\) again.
The classic confusion: \(\in\) relates an element to a set, \(\subseteq\) relates two sets.
Let \(A = \{1, 2, 3\}\):
| Statement | True? | Why |
|---|---|---|
| \(2 \in A\) | ✓ | \(2\) is an element of \(A\) |
| \(\{2\} \subseteq A\) | ✓ | every element of \(\{2\}\) is in \(A\) |
| \(\{2\} \in A\) | ✗ | the set \(\{2\}\) is not one of the three elements |
Common Mistake
Writing \(2 \subseteq A\): a number is not a set, so \(\subseteq\) does not apply. Ask first: element or set?
Question
Let \(B = \{5, 10, 15\}\). Which statements are true: \(\quad 10 \in B, \quad \{5, 15\} \subseteq B, \quad \{10\} \in B, \quad \emptyset \subseteq B\)?
The cardinality \(|A|\) is the number of elements in \(A\):
Common Mistake
Same bars, different meaning: \(|-5| = 5\) is an absolute value (of a number), \(|\{-5\}| = 1\) is a cardinality (of a set). What is inside the bars decides: a number or a set.
Question
What is \(|\{1, 2, 2, 3, \{4, 5\}\}|\)?
| (a) \(3\) | (b) \(4\) |
| (c) \(5\) | (d) \(6\) |
(b): the elements are \(1\), \(2\), \(3\) and the set \(\{4, 5\}\). The repeated \(2\) counts once, and \(\{4, 5\}\) is one element: a set sitting inside a set.
The eight café customers, one dot each: \(P\) = premium, \(L\) = lost.
Dots are elements (\(3 \in P\)), regions are sets (\(\{3, 4\} \subseteq P\)), and the box is the universal set \(U\): every customer on the list.
Question
A mailing goes to every customer who is premium or lost. Which dots get a mail?
\(P \cup L = \{x \in U : x \in P \text{ or } x \in L\}\): Session 1's inclusive “or”. Customers \(3\) and \(4\) get one mail, not two.
Question
Premium and lost: who goes on the win-back list?
\(P \cap L = \{x \in U : x \in P \text{ and } x \in L\}\): two filters at once.
Question
Premium but not lost? And lost but not premium?
\(P \setminus L = \{x \in U : x \in P \text{ and } x \notin L\}\) is \(\{1, 2\}\), but \(L \setminus P = \{5, 6\}\): order matters.
Question
Who is not premium? Not premium… out of whom?
\(P^c = \{x \in U : x \notin P\} = \{5, 6, 7, 8\}\): only the box decides what “everything else” means, so \(U\) is a modelling choice: state it. Books also write \(\overline{P}\) or \(P'\): same idea.
Let \(U = \{1, 2, \dots, 8\}\), \(P = \{1, 2, 3, 4\}\) and \(L = \{3, 4, 5, 6\}\):
| Expression | Result | Reading |
|---|---|---|
| \(P \cup L\) | \(\{1, 2, 3, 4, 5, 6\}\) | premium or lost |
| \(P \cap L\) | \(\{3, 4\}\) | premium and lost: the win-back list |
| \(P \setminus L\) | \(\{1, 2\}\) | premium, not lost |
| \(L \setminus P\) | \(\{5, 6\}\) | lost, not premium |
| \(P^c\) | \(\{5, 6, 7, 8\}\) | not premium: the upsell targets |
Question
Let \(U = \{1, 2, \dots, 10\}\), \(A = \{2, 4, 6, 8, 10\}\) and \(B = \{1, 2, 3, 4, 5\}\). Shout: \(A \cap B, \quad A \setminus B, \quad B^c\), and the number \(|A \cup B|\).
\(A\) and \(B\) are disjoint if \(A \cap B = \emptyset\), no shared elements:
Disjoint sets model clean segmentations: no customer sits in two segments at once.
Question
\(P = \{1, 2, 3, 4\}\), \(L = \{3, 4, 5, 6\}\), \(N = \{2, 4, 6, 8\}\). A voucher goes to customers who are “premium and lost or newsletter readers”. Shout \(|(P \cap L) \cup N|\) and \(|P \cap (L \cup N)|\).
Common Mistake
“\(P \cap L \cup N\)” names neither set: when \(\cup\) and \(\cap\) mix, the brackets decide who gets the voucher. Always write them.
Question
Four customers are premium, four are lost. How many are premium or lost? Shout.
\[\begin{aligned} |P \cup L| &= |P| + |L| - |P \cap L| \\ &= 4 + 4 - 2 = 6 \end{aligned}\]
Customers \(3\) and \(4\) were counted twice: subtract them once. This is the inclusion-exclusion rule.
Question
Your guess from last week? Of \(200\) customers, \(120\) ordered online, \(90\) ordered in store, and \(40\) did both. How many customers ordered nothing this year? Shout the number.
\[|\text{online} \cup \text{store}| = 120 + 90 - 40 = 170\]
so \(200 - 170 = 30\) ordered nothing.
Common Mistake
\(120 + 90 = 210 > 200\) is not a contradiction: the \(40\) two-channel customers were counted twice. Subtract the intersection before taking the complement.
A partition splits \(U\) into disjoint pieces that together cover everything:
Segments that share customers (premium and lost) need inclusion-exclusion; a partition is exactly the case where the correction term vanishes.
You have met all four already in Session 1: \(x \in A \cup B\) means \(x \in A \vee x \in B\):
| Logic (Session 1) | Sets (today) |
|---|---|
| \(p \vee q\) (or) | \(A \cup B\) (union) |
| \(p \wedge q\) (and) | \(A \cap B\) (intersection) |
| \(\neg p\) (not) | \(A^c\) (complement) |
| \(p \Rightarrow q\) (implies) | \(A \subseteq B\) (subset) |
\(A \subseteq B\) means \(x \in A \Rightarrow x \in B\).
If you remember the logic rule, you get the set rule for free, and the other way around.
Question
\(\mathbb{N} \subseteq \mathbb{Z}\) inside \(U = \mathbb{R}\). Which holds: (a) \(\mathbb{N}^c \subseteq \mathbb{Z}^c\) or (b) \(\mathbb{Z}^c \subseteq \mathbb{N}^c\)?
(b): \(-3 \in \mathbb{N}^c\) but \(-3 \notin \mathbb{Z}^c\). The smaller set has the bigger complement: Session 1's contrapositive, \(x \in A \Rightarrow x \in B\) becomes \(x \notin B \Rightarrow x \notin A\).
Question
A welcome offer goes to customers who are neither premium nor lost. Where do “not premium” and “not lost” meet?
\[\begin{gathered}(P \cup L)^c = P^c \cap L^c = \{7, 8\} \\ (P \cap L)^c = P^c \cup L^c = \{1, 2, 5, 6, 7, 8\}\end{gathered}\]
Question
Let \(A\) = shipments on time, \(B\) = shipments complete. Which set is “shipments that are late or incomplete”?
| (a) \(A^c \cup B^c\) | (b) \(A^c \cap B^c\) |
| (c) \((A \cup B)^c\) | (d) \(A \cap B\) |
(a): late is \(A^c\), incomplete is \(B^c\), and “or” is \(\cup\). By De Morgan this equals \((A \cap B)^c\), Session 1's negation of “on time and complete”.
Common Mistake
(b) and (c) are the same set: shipments that are late and incomplete, a much smaller group. Every “or” of complaints is a \(\cup\).
How to read \((P \cap L) \setminus N\)? Work inside out:
Every data filter you will ever build is a set operation: SQL’s AND/OR/NOT are \(\cap\), \(\cup\), \(^c\).
Question
\(P\) = premium, \(L\) = lost, \(N\) = newsletter subscribers. Which expression describes “active (not lost) premium customers who subscribe to the newsletter”?
| (a) \(P \cap L^c \cap N\) | (b) \(P \cup L^c \cup N\) |
| (c) \((P \cap L) \setminus N\) | (d) \(P \setminus (L \cap N)\) |
(a): premium and not lost and subscribed, three filters at once, so three intersections. On the customer table: customer \(2\).
Common Mistake
(d) removes only customers who are lost and subscribed: a lost premium customer without the newsletter, customer \(3\), stays on the list. Negate the whole condition, not half of it.
Question
Is the trip (Hamburg, Munich) the same job as (Munich, Hamburg)? A set cannot tell them apart: \(\{\text{H}, \text{M}\} = \{\text{M}, \text{H}\}\).
An ordered pair \((a, b)\) is not a set. Here, order does matter:
Curly braces \(\{\,\}\) = unordered set, round parentheses \((\,)\) = ordered pair. The bracket type carries the meaning.
The roastery tests three prices, \(A = \{20, 30, 40\}\) (€ per bag), and weekly demand could land at \(B = \{400, 500, 600, 800\}\) bags. Each dot is one pair: price first, bags second. How many (price, bags) scenarios are there?
Twelve: three columns of four dots. The first entry runs across, the second up, as with \((x, y)\) in the plane.
\(A \times B = \{(a, b) : a \in A, b \in B\}\): all ordered pairs with the first entry from \(A\), the second from \(B\): every dot of the grid.
Let \(W = \{1, 2\}\) be warehouses and \(C = \{1, 2, 3\}\) be customers:
Question
A carrier runs \(4\) depots \(D\) and serves \(5\) customers \(C\). How many depot-customer routes exist? And if each route can be driven by one of \(2\) vehicle types \(V\), how many route-vehicle combinations? Shout both numbers.
Question
A carrier may serve any subset of the regions \(\{\text{North}, \text{East}, \text{South}\}\). How many different service portfolios are possible?
\(8\) portfolios:
\[\emptyset, \{\text{N}\}, \{\text{E}\}, \{\text{S}\}, \{\text{N,E}\}, \{\text{N,S}\}, \{\text{E,S}\}, \{\text{N,E,S}\}\]
Note that \(\emptyset\) counts: “serve no region at all” is a valid (if unambitious) portfolio.
This list of all subsets has a name: the power set.
The power set \(\mathcal{P}(A)\) is the set of all subsets of \(A\), including \(\emptyset\) and \(A\) itself.
The \(8\) portfolios you just listed are \(\mathcal{P}(\{\text{North}, \text{East}, \text{South}\})\).
Common Mistake
The elements of \(\mathcal{P}(A)\) are themselves sets: \(\{\text{North}\} \in \mathcal{P}(\{\text{North}, \text{East}, \text{South}\})\), but \(\text{North} \notin \mathcal{P}(\{\text{North}, \text{East}, \text{South}\})\).
Question
Let \(A = \{a, b\}\). Which statement is false?
| (a) \(\emptyset \in \mathcal{P}(A)\) | (b) \(\{a\} \in \mathcal{P}(A)\) |
| (c) \(a \in \mathcal{P}(A)\) | (d) \(A \in \mathcal{P}(A)\) |
(c): \(a\) is an element of \(A\), not a subset of \(A\). Only sets live in \(\mathcal{P}(A)\), and \(\{a\}\) is the set that does.
(a) and (d) are true for every set: \(\emptyset\) and \(A\) itself are always subsets of \(A\).
\[|\mathcal{P}(A)| = 2^{|A|}\]
At most \(500\) bags a week: can the roastery plan \(600\)? \(300\)? \(-10\)?
Question
A supermarket chain offers the roastery a contract, but only for at least \(600\) bags a week: \(q \in [600, \infty)\). What is the feasible set now?
\[[0, 500] \cap [600, \infty) = \emptyset\]
That’s it for today.
Any Questions?
Draw a Venn diagram whenever a set expression looks confusing: two circles resolve most doubts faster than staring at symbols.
See you there, and bring your questions!
Session 02 - Sets | Dr. Tobias Vlćek | Home