------------------------------------- 1. Specifying Sets and Set Operations ------------------------------------- \N, \R, \Z, \Q What set is this? Many ways to specify sets: P = {n: n is a prime number} Let P be the set of prime numbers. P = {n \in N : i | n -> i \in {-n,-1,1,n}} P = {2,3,5,7,11,...} No good: No number divides it. P = {primes} Operations (Book, 1.4) = \ne \in \not\in \subset \subseteq \supset \supseteq union intersection complement *always relative to some universe U* xor set difference exclusive or A\B \cup B\A define DISJOINT: Sets A and B are *disjoint* if \neg \exists a\in A\cap B define when a set is FINITE exists a function define when a set is INFINITE Draw some VENN DIAGRAMS A \cup (B\cap C) "Laws of the algebra of sets:(section 1.5) MOre below than done in class. A u A = A A\cap A = A A u (B u C) = (A u B) u C A\cap (B \cap C) = (A\cap B)\cap C A u B = B u A A\cap B = B\cap A A u (B\cap C) = A u C \cap B u C A \cap (B u C) = A\cap B u A\cap C A u \emptyset = A A \cap \emptyset = \emptyset A u U = U A \cap U = A (A^c)^c = A A u A^c = U A \cap A^c = \emptyset U^c = \emptyset \emptyset^c = U (A u B)^c = A^c \cap B^c (A\cap B)^c = A^c u B^c <-- DeMorgan's laws Prove one, say the first. a \in (A\cup B)^c iff a \not\in A\cup B a \not\in A and a \not\in B a \in A^c and a \in B^c a \in A^c \cap a\in B^c |S| = the number of element in S if S is finite, \infinity otherwise A= {{a},b,\emptyset}. |A| = 3 A = {emptyset, {emptyset}, {{emptyset}}} |A|=3. AVOID TYPE ERRORS!!! ... in a proof, x and y are real numbers. "Suppose x\subseteq y" .... and many other such problems. CROSS PRODUCT A x B = {(a,b): A\in A, B\in B} UNORDERED PRODUCT A & B = {{a,b}: A\in A, B\in B} // when I learned graph theory -- never saw it since! \R^2 points in the plane ----------------------- 3. Elements of counting (Section 1.6) ----------------------- If A and B are disjoint finite sets, then |A\cup B| = |A| \cup |B| More generally, |A\cup B| = |A| + |B| - |A\cap B| for any finite sets A, B "inclusion-exclusion principle" If ecs20 has 70 students and ecs30 has 100 students and 10 students are taking both classes, how many are taking ecs20 or ecs30? 70 + 100 - 10 = 160