Presentation is loading. Please wait.

Presentation is loading. Please wait.

COT 3100, Spring 2001 Applications of Discrete Structures

Similar presentations


Presentation on theme: "COT 3100, Spring 2001 Applications of Discrete Structures"— Presentation transcript:

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 | xx }. Is SS? 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 nN, 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 AB  {(a, b) | aA  bB }. E.g. {a,b}{1,2} = {(a,1),(a,2),(b,1),(b,2)} Note that for finite A, B, |AB|=|A||B|. Note that the Cartesian product is not commutative: AB: AB=BA. 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 xS, ST, ST, S=T, ST, ST. (These form propositions.) Finite vs. infinite sets. Set operations |S|, P(S), ST. 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 AB is the set containing all elements that are either in A, or (“”) in B (or, of course, in both). Formally, A,B: AB{x | xA  xB}. Note that AB contains all the elements of A and it contains all the elements of B: A, B: (ABA)  (ABB) 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 AB is the set containing all elements that are simultaneously in A and (“”) in B. Formally, A,B: AB{x | xA  xB}. Note that AB is a subset of A and it is a subset of B: A, B: (ABA)  (ABB) 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. (AB=) 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 AB? |AB| = |A|  |B|  |AB| 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| = |IM| = |I|  |M|  |IM| 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 AB, is the set of all elements that are in A but not B. A  B  x  xA  xB  x   xA  xB   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 AB 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 AU, the complement of A, written , is the complement of A w.r.t. U, i.e., it is UA. 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 AU=A Domination: AU=U A=
Idempotent: AA = A = AA Double complement: Commutative: AB=BA AB=BA Associative: A(BC)=(AB)C A(BC)=(AB)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


Download ppt "COT 3100, Spring 2001 Applications of Discrete Structures"

Similar presentations


Ads by Google