(CSC 102) Discrete Structures Lecture 14.

Slides:



Advertisements
Similar presentations
Lecture Outline Introduction to sets and set notation (5.1, 5.3)
Advertisements

Set Operations. When sets are equal A equals B iff for all x, x is in A iff x is in B or … and this is what we do to prove sets equal.
Union Definition: The union of sets A and B, denoted by A B, contains those elements that are in A or B or both: Example: { 1, 2, 3} {3, 4, 5} = { 1,
Relations Relations on a Set. Properties of Relations.
Copyright © Cengage Learning. All rights reserved.
(CSC 102) Lecture 12 Discrete Structures. Previous Lecture Summary Floor and Ceiling Functions Definition of Proof Methods of Proof Direct Proof Disproving.
Prof. Johnnie Baker Module Basic Structures: Sets
Sets Lecture 11: Oct 24 AB C. This Lecture We will first introduce some basic set theory before we do counting. Basic Definitions Operations on Sets Set.
Discrete Mathematics Lecture 5 Alexander Bukharovich New York University.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Discrete Structures & Algorithms Basics of Set Theory EECE 320 — UBC.
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 1: (Part 2): The Foundations: Logic and Proofs.
Instructor: Hayk Melikya
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Denoting the beginning
1 Section 1.7 Set Operations. 2 Union The union of 2 sets A and B is the set containing elements found either in A, or in B, or in both The denotation.
Discrete Mathematics Lecture 4 Harper Langston New York University.
Discrete Structures Chapter 3 Set Theory Nurul Amelina Nasharuddin Multimedia Department.
Discrete Mathematics Lecture 5
Sets 1.
Sets 1.
Boolean Algebra cont’ The digital abstraction מבנה המחשב + מבוא למחשבים ספרתיים תרגול 2#
EE1J2 – Discrete Maths Lecture 5 Analysis of arguments (continued) More example proofs Formalisation of arguments in natural language Proof by contradiction.
1 Set Theory. 2 Set Properties Commutative Laws: Associative Laws: Distributive Laws:
1 Set Theory. Notation S={a, b, c} refers to the set whose elements are a, b and c. a  S means “a is an element of set S”. d  S means “d is not an element.
1 Set Theory. Notation S={a, b, c} refers to the set whose elements are a, b and c. a  S means “a is an element of set S”. d  S means “d is not an element.
Rosen 1.6. Approaches to Proofs Membership tables (similar to truth tables) Convert to a problem in propositional logic, prove, then convert back Use.
Operations on Sets – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Operations on Sets Reading: Kolman, Section 1.2.
Set Theory A B C.
Copyright © Cengage Learning. All rights reserved. CHAPTER 4 ELEMENTARY NUMBER THEORY AND METHODS OF PROOF ELEMENTARY NUMBER THEORY AND METHODS OF PROOF.
Set, Combinatorics, Probability & Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Set,
CS201: Data Structures and Discrete Mathematics I
CompSci 102 Discrete Math for Computer Science
Copyright © Cengage Learning. All rights reserved.
Week 6 - Friday.  What did we talk about last time?  Solving recurrence relations.
Naïve Set Theory. Basic Definitions Naïve set theory is the non-axiomatic treatment of set theory. In the axiomatic treatment, which we will only allude.
1 Introduction to Abstract Mathematics Sets Section 2.1 Basic Notions of Sets Section 2.2 Operations with sets Section 2.3 Indexed Sets Instructor: Hayk.
Boolean Algebras Lecture 27 Section 5.3 Wed, Mar 7, 2007.
CSE 311 Foundations of Computing I Lecture 9 Proofs and Set Theory Autumn 2012 CSE
Chapter 2 With Question/Answer Animations. Section 2.1.
Introduction to Set theory. Ways of Describing Sets.
Lecture # 12 Set Identities
Snick  snack Supplement: Worked Set Proofs Based on work by Meghan Allen.
Properties of Sets Lecture 26 Section 5.2 Tue, Mar 6, 2007.
Based on slides by Patrice Belleville and Steve Wolfman CPSC 121: Models of Computation Unit 11: Sets.
Review 2 Basic Definitions Set - Collection of objects, usually denoted by capital letter Member, element - Object in a set, usually denoted by lower.
Discrete Mathematics CS 2610 January 27, part 2.
Discrete Mathematics Set.
Based on slides by Patrice Belleville and Steve Wolfman CPSC 121: Models of Computation Unit 11: Sets.
Copyright © Cengage Learning. All rights reserved. CHAPTER 8 RELATIONS.
CSE 311: Foundations of Computing Fall 2013 Lecture 8: Proofs and Set theory.
1 Set Theory Second Part. 2 Disjoint Set let A and B be a set. the two sets are called disjoint if their intersection is an empty set. Intersection of.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Thinking Mathematically Venn Diagrams and Set Operations.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
Section 6.1 Set and Set Operations. Set: A set is a collection of objects/elements. Ex. A = {w, a, r, d} Sets are often named with capital letters. Order.
Lecture 6 Set Theory.
Copyright © Cengage Learning. All rights reserved.
Set Theory.
Set, Combinatorics, Probability & Number Theory
Sets Section 2.1.
Week 7 - Monday CS322.
Set Topology MTH 251 Lecture # 8.
Set Theory A B C.
Set Operations Section 2.2.
Propositional Equivalences
CHAPTER 2 Set Theory.
CHAPTER 2 Set Theory.
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
CSC102 - Discrete Structures (Discrete Mathematics) Set Operations
Presentation transcript:

(CSC 102) Discrete Structures Lecture 14

Previous Lectures Summary Why study set Theory Sets Operations on sets Memberships Notations Venn diagrams

Introductions to Set Theory II

Today's Lecture Procedural Versions Properties of Sets Empty Set Properties Difference Properties Set Identities Boolean Algebra and Set theory Puzzles

Procedural Versions of Set Definitions Let X and Y be subsets of a universal set U and suppose x and y are elements of U. 1. x ∈ X ∪ Y ⇔ x ∈ X or x ∈ Y 2. x ∈ X ∩ Y ⇔ x ∈ X and x ∈ Y 3. x ∈ X − Y ⇔ x ∈ X and x ∉ Y 4. x ∈ X ⇔ x ∉ X’ 5. (x, y) ∈ X × Y ⇔ x ∈ X and y ∈ Y

Properties of Sets Theorem: 1. Inclusion of Intersection: For all sets A and B, A ∩ B ⊆ A and (b) A ∩ B ⊆ B. 2. Inclusion in Union: For all sets A and B, A ⊆ A ∪ B and (b) B ⊆ A ∪ B. 3. Transitive Property of Subsets: For all sets A, B, and C, if A ⊆ B and B ⊆ C, then A ⊆ C.

Proof (For all sets A and B), A ∩ B ⊆ A. Suppose x is an element in A ∩ B and then you show that x is in A. To say that x is in A ∩ B means that x is in A and x is in B. This allows you to complete the proof by deducing that, in particular, x is in A, as was to be shown. Note that this deduction is just a special case of the valid argument form p ∧ q ∴ p. Similarly we will done with others…..

Set Identities Let all sets referred to below be subsets of a universal set U. 1. Commutative Laws: For all sets A and B, (a) A ∪ B = B ∪ A and (b) A ∩ B = B ∩ A. 2. Associative Laws: For all sets A, B, and C, (a) (A ∪ B) ∪ C = A ∪ (B ∪ C) and (b) (A ∩ B) ∩ C = A ∩ (B ∩ C). 3. Distributive Laws: For all sets, A, B, and C, (a) A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C) and

Cont…. (b) A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C). 4. Identity Laws: For all sets A, A ∪ ∅ = A, (b) A ∩ U = A. 5. Complement Laws: (a) A ∪ A′ = U, (b) A ∩ A′ = ∅. 6. Double Complement Law: For all sets A, (A′)′ = A. 7. Idempotent Laws: For all sets A, (a) A ∪ A = A, (b) A ∩ A = A. 8. Universal Bound Laws: For all sets A, A ∪ U = U, (b) A ∩ ∅ = ∅.

Cont…. 9. De Morgan’s Laws: For all sets A and B, (A ∪ B)′ = A′ ∩ B′ 10. Absorption Laws: For all sets A and B, A ∪ (A ∩ B) = A, (b) A ∩ (A ∪ B) = A. 11. Complements of U and ∅: U′ = ∅ (b) ∅′ = U. 12. Set Difference Law: For all sets A and B, A − B = A ∩ B′.

A Distributive Law for Sets For all sets A, B, and C, A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C). Proof: Suppose A and B are sets. We have to show A ∪ (B ∩ C) ⊆ (A ∪ B) ∩ (A ∪ C). Suppose x ∈ A ∪ (B ∩ C). By definition of union, x ∈ A or x ∈ B ∩ C. Case 1 (x ∈ A): Since x ∈ A, then x ∈ A ∪ B by definition of union and also x ∈ A ∪ C by definition of union. Hence x ∈ (A ∪ B) ∩ (A ∪ C) by definition of intersection. Case 2 (x ∈ B ∩ C): Since x ∈ B ∩ C, then x ∈ B and x ∈ C by definition of intersection. Since x ∈ B, x ∈ A ∪ B and since x ∈ C, x ∈ A ∪ C, both by definition of union. Hence x ∈ (A ∪ B) ∩ (A ∪ C) by definition of intersection. In both cases, x ∈ (A ∪ B) ∩ (A ∪ C). Hence A ∪ (B ∩ C) ⊆ (A ∪ B) ∩ (A ∪ C) ………… (1)

Cont…. Now we have to show (A ∪ B) ∩ (A ∪ C) ⊆ A ∪ (B ∩ C) Suppose x ∈ (A ∪ B) ∩ (A ∪ C). By definition of intersection, x ∈ A ∪ B and x ∈ A ∪ C. Consider the two cases x ∈ A and x ∉ A. Case 1 (x ∈ A): Since x ∈ A, we can immediately conclude that x ∈ A ∪ (B ∩ C) by definition of union. Case 2 (x ∉ A): Since x ∈ A ∪ B, x is in at least one of A or B. But x is not in A; hence x is in B. Similarly, since x ∈ A ∪ C, x is in at least one of A or C. But x is not in A; hence x is in C. We have shown that both x ∈ B and x ∈ C, and so by definition of intersection, x ∈ B ∩ C. It follows by definition of union that x ∈ A ∪ (B ∩ C). In both cases x ∈ A ∪ (B ∩ C). Therefore, (A ∪ B) ∩ (A ∪ C) ⊆ A ∪ (B ∩ C) ……….(2) Hence A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C).

Proof of De Morgan’s Law for Sets Prove that for all sets A and B, (A∪B)′ = A′ ∩ B′. Proof: Suppose x ∈ (A ∪ B)′. That is x ∉ A ∪ B. But to say that x ∉ A ∪ B means that it is false that (x is in A or x is in B). By De Morgan’s laws of logic, this implies that x is not in A and x is not in B, which can be written x ∉ A and x ∉ B. Hence x ∈ A′ and x ∈ B′ by definition of complement. It follows, by definition of intersection, that x ∈ A′ ∩ B′. So (A ∪ B) ′ ⊆ A′ ∩ B′ by definition of subset.

Cont… Suppose x ∈ A′ ∩ B′. intersection, x ∈ A′ and x ∈ B′, and by definition of complement, x ∉ A and x ∉ B. In other words, x is not in A and x is not in B. By De Morgan’s laws of logic this implies that it is false that (x is in A or x is in B),which can be written x ∉ A ∪ B by definition of union. Hence, by definition of complement, x ∈ (A ∪ B)′ .It follows that A′ ∩ B′ ⊆ (A ∪ B)′ by definition of subset.

The Empty Set Theorem: If E is a set with no elements and A is any set, then E ⊆ A. Proof: Suppose not. Suppose there exists a set E with no elements and a set A such that E A. Then there would be an element of E that is not an element of A But there can be no such element since E has no elements. This is a contradiction. [Hence the supposition that there are sets E and A, where E has no elements and E A, is false, and so the theorem is true.]

Uniqueness of the Empty Set There is only one set with no elements. Proof: Suppose E1 and E2 are both sets with no elements. E1 ⊆ E2. since E1 has no elements. Also E2 ⊆ E1 since E2 has no elements. Thus E1 = E2 by definition of set equality. A Set with No Elements Is a Subset of Every Set. Proof: If E is a set with no elements and A is any set, then E ⊆ A. Suppose there exists a set E with no elements and a set A such that E  A. Then there would be an element of E that is not an element of A .But there can be no such element since E has no elements. This is a contradiction.

A Proof for a Conditional Statement Prove that for all sets A, B, and C, if A ⊆ B and B ⊆ C′, then A ∩ C = ∅. Proof: Suppose A, B, and C are any sets such that A ⊆ B and B ⊆ C′. We must show that A ∩ C = ∅. Suppose not. That is, suppose there is an element x in A ∩ C. By definition of intersection, x ∈ A and x ∈ C. Then, since A ⊆ B, x ∈ B by definition of subset. Also, since B ⊆ C′, then x ∈ C′ by definition of subset again. It follows by definition of complement that x ∉ C. Thus x ∈ C and x ∉ C, which is a contradiction. So the supposition that there is an element x in A ∩ C is false, and thus A ∩ C = ∅ [as was to be shown].

Finding a Counterexample for identities For all sets A, B, and C, (A − B) ∪ (B − C) = A − C. Counterexample 1: Let A = {1, 2, 4, 5}, B = {2, 3, 5, 6}, and C = {4, 5, 6, 7}. Then A − B = {1, 4}, B − C = {2, 3}, and A − C = {1, 2}. Hence (A − B) ∪ (B − C) = {1, 4} ∪ {2, 3} = {1, 2, 3, 4}, whereas A − C = {1, 2}. Since {1, 2, 3, 4} ≠ {1, 2}, we have that (A − B) ∪ (B − C) ≠ A − C. Counterexample 2: Let A = ∅, B = {3}, and C = ∅. Then A − B = ∅, B − C = {3}, and A − C = ∅. Hence (A − B) ∪ (B − C) = ∅∪{3} = {3}, whereas A − C = ∅. Since {3} ≠ ∅, we have that (A − B) ∪ (B − C) ≠ A − C.

Deriving a Set Difference Property Construct an algebraic proof that for all sets A, B, and C, (A ∪ B) − C = (A − C) ∪ (B − C). Proof: Let A, B, and C be any sets. Then (A ∪ B) − C = (A ∪ B) ∩ C′ by the set difference law = C′ ∩ (A ∪ B) by the commutative law for ∩ = (C′ ∩ A) ∪ (C′ ∩ B) by the distributive law = (A ∩ C′) ∪ (B ∩ C′) by the commutative law for ∩ = (A − C) ∪ (B − C) by the set difference law.

Cont… Construct an algebraic proof that for all sets A and B, A − (A ∩ B) = A − B. Proof: Suppose A and B are any sets. Then A − (A ∩ B) = A ∩ (A ∩ B)′ by the set difference law = A ∩ (A’ ∪ B′) by De Morgan’s laws = (A ∩ A′) ∪ (A ∩ B′) by the distributive law = ∅∪(A ∩ B′) by the complement law = (A ∩ B′) ∪ ∅ by the commutative law for ∪ = A ∩ B′ by the identity law for ∪ = A − B by the set difference law.

Boolean Algebra and Set Theory

Cont….

Question: Does the barber shave himself? Barber puzzle In a certain town there is a male barber who shaves all those men, and only those men, who do not shave themselves. Question: Does the barber shave himself? Solution: Neither yes nor no. If the barber shaves himself, he is a member of the class of men who shave themselves. But no member of this class is shaved by the barber, and so the barber does not shave himself. On the other hand, if the barber does not shave himself, he belongs to the class of men who do not shave themselves. But the barber shaves every man in this class, so the barber does shave himself.

Lecture Summary Procedural Versions Properties of Sets Empty Set Properties Difference Properties Set Identities Boolean Algebra and Set theory Paradoxes