Week 7 - Monday CS322.

Slides:



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

Discrete Structures Chapter 6: Set Theory
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
Instructor: Hayk Melikya
(CSC 102) Discrete Structures Lecture 14.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
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.
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 Discussion #21 Discussion #21 Sets & Set Operations; Tuples & Relations.
Rosen 1.6. Approaches to Proofs Membership tables (similar to truth tables) Convert to a problem in propositional logic, prove, then convert back Use.
Set Theory. What is a set?  Sets are used to define the concepts of relations and functions. The study of geometry, sequences, probability, etc. requires.
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
Sets Defined A set is an object defined as a collection of other distinct objects, known as elements of the set The elements of a set can be anything:
Sets Define sets in 2 ways  Enumeration  Set comprehension (predicate on membership), e.g., {n | n  N   k  k  N  n = 10  k  0  n  50} the set.
Week 7 - Monday.  What did we talk about last time?  Sets.
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.
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.
Ch. 2 Basic Structures Section 1 Sets. Principles of Inclusion and Exclusion | A  B | = | A | + | B | – | A  B| | A  B  C | = | A | + | B | + | C.
Snick  snack Supplement: Worked Set Proofs Based on work by Meghan Allen.
Discrete Mathematics CS 2610 January 27, part 2.
2007 D iscrete The foundations C ounting theory N umber theory G raphs & trees structure s
Discrete Mathematics Set.
Copyright © Cengage Learning. All rights reserved. CHAPTER 8 RELATIONS.
CSE 311: Foundations of Computing Fall 2013 Lecture 8: Proofs and Set theory.
Week 4 - Friday.  What did we talk about last time?  Floor and ceiling  Proof by contradiction.
Module #3 - Sets 3/2/2016(c) , Michael P. Frank 2. Sets and Set Operations.
Set Operations Section 2.2.
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.
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
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.
Week 8 - Wednesday.  What did we talk about last time?  Relations  Properties of relations  Reflexive  Symmetric  Transitive.
Set. Outline Universal Set Venn Diagram Operations on Sets.
Relations Chapter 9 Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill.
The Relation Induced by a Partition
Lecture 6 Set Theory.
Applied Discrete Mathematics Week 1: Logic and Sets
Discrete Mathematics Lecture 3 (and 4)
The Language of Sets If S is a set, then
Set Operations CS 202, Spring 2008 Epp, chapter 5.
Copyright © Cengage Learning. All rights reserved.
Set Theory.
Set, Combinatorics, Probability & Number Theory
Sets Section 2.1.
CS 2210:0001 Discrete Structures Sets and Functions
What is Probability? Quantification of uncertainty.
Chapter 5, Set Theory 1.
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
Exercises Show that (P  Q)  (P)  (Q)
Set Operations Section 2.2.
Sets and Logic…. Chapter 3
CPSC 121: Models of Computation 2016W2
Discrete Mathematics CS 2610
Applied Discrete Mathematics Week 3: Sets
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
Foundations of Discrete Mathematics
Chapter 1 Probability Spaces
Presentation transcript:

Week 7 - Monday CS322

Last time What did we talk about last time? Sets

Questions?

Logical warmup A man offers you a bet He shows you three cards One is red on both sides One is green on both sides One is red on one side and green on the other He will put one of the cards, at random, on the table If you can guess the color on the other side, you win If you bet $100 You gain $25 on a win You lose your $100 on a loss Should you take the bet? Why or why not?

Set Theory

Set operations We usually discuss sets within some superset U called the universe of discourse Assume that A and B are subsets of U The union of A and B, written A  B is the set of all elements of U that are in either A or B The intersection of A and B, written A  B is the set of all elements of U that are in A and B The difference of B minus A, written B – A, is the set of all elements of U that are in B and not in A The complement of A, written Ac is the set of all elements of U that are not in A

The empty set There is a set with no elements in it called the empty set We can write the empty set { } or  It comes up very often For example, {1, 3, 5}  {2, 4, 6} =  The empty set is a subset of every other set (including the empty set)

Disjoint sets and partitions Two sets A and B are considered disjoint if A  B =  Sets A1, A2, … An are mutually disjoint (or nonoverlapping) if Ai  Aj =  for all i  j A collection of nonempty sets {A1, A2, … An} is a partition of set A iff: A = A1  A2  …  An A1, A2, … An are mutually disjoint

Power set Given a set A, the power set of A, written P(A) or 2A is the set of all subsets of A Example: B = {1, 3, 6} P(B) = {, {1}, {3}, {6}, {1,3}, {1,6}, {3,6}, {1,3,6}} Let n be the number of elements in A, called the cardinality of A Then, the cardinality of P(A) is 2n

Cartesian product An ordered n-tuple (x1, x2, … xn) is an ordered sequence of n elements, not necessarily from the same set The Cartesian product of sets A and B, written A x B is the set of all ordered 2-tuples of the form (a, b), a  A, b  B Thus, (x, y) points are elements of the Cartesian product R x R (sometimes written R2)

Subset Relations

Basic subset relations Inclusion of Intersection: For all sets A and B A  B  A A  B  B Inclusion in Union: A  A  B B  A  B Transitive Property of Subsets: If A  B and B  C, then A  C

Element argument The basic way to prove that X is a subset of Y Suppose that x is a particular but arbitrarily chosen element of X Show that x is an element of Y If every element in X must be in Y, by definition, X is a subset of Y

Procedural versions We want to leverage the techniques we've already used in logic and proofs The following definitions help with this goal: x  X  Y  x  X  x  Y x  X  Y  x  X  x  Y x  X – Y  x  X  x  Y x  Xc  x  X (x, y)  X  Y  x  X  y  Y

Example proof Theorem: For all sets A and B, A  B  A Proof: Let x be some element in A  B x  A  x  B x  A Thus, all elements in A  B are in A A  B  A QED Premise Definition of intersection Specialization By generalization Definition of subset

Laying down the law (again) Name Law Dual Commutative A  B = B  A A  B = B  A Associative (A  B)  C = A  (B  C) (A  B)  C = A  (B  C) Distributive A  (B  C) = (A  B)  (A  C) A  (B  C) = (A  B)  (A  C) Identity A   = A A  U = A Complement A  Ac = U A  Ac =  Double Complement (Ac)c = A Idempotent A  A = A A  A = A Universal Bound A  U = U A   =  De Morgan’s (A  B)c = Ac  Bc (A  B)c = Ac  Bc Absorption A  (A  B) = A A  (A  B) = A Complements of U and  Uc =  c = U Set Difference A – B = A  Bc

Proving set equivalence To prove that X = Y Prove that X  Y and Prove that Y  X

Example proof of equivalence Theorem: For all sets A,B, and C, A  (B  C) = (A  B)  (A  C) Proof: Let x be some element in A  (B  C) x  A  x  (B  C) Case 1: Let x  A x  A  x  B x  A  B x  A  x  C x  A  C x  A  B  x  A  C x  (A  B)  (A  C) Case 2: Let x  B  C x  B  x  C x  B x  A  x  B x  A  B x  C x  A  x  C x  A  C x  A  B  x  A  C x  (A  B)  (A  C) In all possible cases, x  (A  B)  (A  C), thus A  (B  C)  (A  B)  (A  C)

Proof of equivalence continued Let x be some element in (A  B)  (A  C) x  (A  B)  x  (A  C) Case 1: Let x  A x  A  x  B  C x  A  (B  C) Case 2: Let x  A x  A  B x  A  x  B x  B x  A  C x  A  x  C x  C x  B  x  C x  B  C x  A  x  B  C x  A  (B  C) In all possible cases, x  A  (B  C), thus (A  B)  (A  C)  A  (B  C) Since both A  (B  C)  (A  B)  (A  C) and (A  B)  (A  C)  A  (B  C), A  (B  C) = (A  B)  (A  C) QED

Proof example Prove that, for any set A, A   =  Hint: Use a proof by contradiction

Disproofs and Algebraic Proofs

Disproving a set property Like any disproof for a universal statement, you must find a counterexample to disprove a set property For set properties, the counterexample must be a specific examples of sets for each set in the claim

Counterexample example Claim: For all sets A, B, and C, (A – B)  (B – C) = A – C Find a counterexample

Algebraic set identities We can use the laws of set identities given before to prove a statement of set theory Be extremely careful (even more careful than with propositional logic) to use the law exactly as stated

Algebraic set identity example Theorem: A – (A  B) = A – B Proof: A – (A  B) = A  (A  B) c = A  (Ac  B c) = (A  Ac)  (A  B c) =   (A  B c) = A  B c = A – B QED

Prove or disprove For all sets A, B, and C, if A  B and B  C, then A  C

Prove or disprove For all sets A and B, ((Ac  Bc) – A)c = A

Upcoming

Next time… Russell's paradox Halting program Functions Composition of functions Cardinality

Reminders Homework 5 is due Friday Read Chapter 7