Download presentation
Presentation is loading. Please wait.
Published byEgbert Sullivan Modified over 6 years ago
1
COT 3100, Spring 2001 Applications of Discrete Structures
Section #1089X - MWF 4th period Dr. Michael P. Frank Lecture #8 Fri., Jan. 26, 2001 1/26/01 Lecture #8
2
Administrivia Today: Returning graded HW#1 papers.
Quiz now on HW#2 material (§§ ). Lecture: finish §1.4, do §1.5, Set Operations in E121: Distinguished lecturer Christos Papadimitriou on “Algorithmic Problems Related to the Internet.” 1/26/01 Lecture #8
3
Review: Set Notations So Far
Variable objects x, y, z; sets S, T, U. Literal set {a, b, c} and set-builder {x|P(x)}. relational operator, and the empty set . Set relations =, , , , , , etc. Venn diagrams. Cardinality |S| and infinite sets N, Z, R. Power sets P(S). 1/26/01 Lecture #8
4
Naïve Set Theory is Inconsistent
Some naïve descriptions of sets lead to structures that are not well-defined. (That do not have consistent properties.) These “sets” mathematically cannot exist. E.g. let S = {x | xx }. Is SS? Consistent set theories must restrict the language that can be used to describe sets. For purposes of this class, don’t worry about it! 1/26/01 Lecture #8
5
Ordered n-tuples Like sets, but duplicates matter and the order makes a difference. For nN, an ordered n-tuple or a sequence of length n is written (a1, a2, …, an). The first element is a1, etc. Note (1, 2) (2, 1) (2, 1, 1). Empty sequence, singlets, pairs, triples, quadruples, quintuples, …, n-tuples. 1/26/01 Lecture #8
6
Cartesian Products of Sets
For sets A, B, their Cartesian product AB {(a, b) | aA bB }. E.g. {a,b}{1,2} = {(a,1),(a,2),(b,1),(b,2)} Note that for finite A, B, |AB|=|A||B|. Note that the Cartesian product is not commutative: AB: AB=BA. Extends to A1 A2 … An... 1/26/01 Lecture #8
7
End of §1.4 Sets S, T, U… Special sets N, Z, R.
Set notations {a,b,...}, {x|P(x)}… Set relation operators xS, ST, ST, S=T, ST, ST. (These form propositions.) Finite vs. infinite sets. Set operations |S|, P(S), ST. Next up: §1.5: More set ops: , , . 1/26/01 Lecture #8
8
Start §1.5: The Union Operator
For sets A, B, their nion AB is the set containing all elements that are either in A, or (“”) in B (or, of course, in both). Formally, A,B: AB{x | xA xB}. Note that AB contains all the elements of A and it contains all the elements of B: A, B: (ABA) (ABB) 1/26/01 Lecture #8
9
Union Examples Required Form 2 5 3 7 {a,b,c}{2,3} = {a,b,c,2,3}
{2,3,5}{3,5,7} = {2,3,5,3,5,7} ={2,3,5,7} Required Form Think “The United States of America includes every person who worked in any state last year.” (How the IRS sees it...) 2 3 5 7 1/26/01 Lecture #8
10
The Intersection Operator
For sets A, B, their intersection AB is the set containing all elements that are simultaneously in A and (“”) in B. Formally, A,B: AB{x | xA xB}. Note that AB is a subset of A and it is a subset of B: A, B: (ABA) (ABB) 1/26/01 Lecture #8
11
Intersection Examples
{a,b,c}{2,3} = ___ {2,4,6}{3,4,5} = ______ {4} 2 3 5 6 4 Think “The intersection of University and 13th St. is that portion of road surface that lies on both streets.” 1/26/01 Lecture #8
12
Help, I’ve been disjointed!
Disjointedness Help, I’ve been disjointed! Two sets A, B are called disjoint (i.e., unjoined) iff their intersection is empty. (AB=) Example: the set of even integers is disjoint with the set of odd integers. 1/26/01 Lecture #8
13
Inclusion-Exclusion Principle
How many elements are in AB? |AB| = |A| |B| |AB| Example: How many students are on our class list? Consider set E I M, I = {s | s turned in an information sheet} M = {s | s signed up through majordomo} Some students did both! |E| = |IM| = |I| |M| |IM| Subtract out items in intersection, to compensate for double-counting them! 1/26/01 Lecture #8
14
Set Difference For sets A, B, the difference of A and B, written AB, is the set of all elements that are in A but not B. A B x xA xB x xA xB Also called: The complement of B with respect to A. 1/26/01 Lecture #8
15
Set Difference Examples
{1,2,3,4,5,6} {2,3,5,7,9,11} = ___________ Z N {… , -1, 0, 1, 2, … } {0, 1, … } = {x | x is an integer but not a nat. #} = {x | x is a negative integer} = {… , -3, -2, -1} {1,4,6} 1/26/01 Lecture #8
16
Set Difference - Venn Diagram
A-B is what’s left after B “takes a bite out of A” Chomp! Set AB Set A Set B 1/26/01 Lecture #8
17
Set Complements The universe of discourse can itself be considered a set, call it U. When the context clearly defines U, we say that for any set AU, the complement of A, written , is the complement of A w.r.t. U, i.e., it is UA. E.g., If U=N, 1/26/01 Lecture #8
18
More on Set Complements
An equivalent definition, when U is clear: A U 1/26/01 Lecture #8
19
Set Identities Identity: A=A AU=A Domination: AU=U A=
Idempotent: AA = A = AA Double complement: Commutative: AB=BA AB=BA Associative: A(BC)=(AB)C A(BC)=(AB)C 1/26/01 Lecture #8
20
DeMorgan’s Law for Sets
Exactly analogous to (and derivable from) DeMorgan’s Law for propositions. 1/26/01 Lecture #8
21
No More Slides It is now 2:15 am and Dr. Frank is getting too sleepy to continue making slides tonight... 1/26/01 Lecture #8
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.