Discrete Mathematical The Set Theory

Slides:



Advertisements
Similar presentations
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.
Advertisements

Prof. Johnnie Baker Module Basic Structures: Sets
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Discrete Structures & Algorithms Basics of Set Theory EECE 320 — UBC.
CS 173: Discrete Mathematical Structures Cinda Heeren Rm 2213 Siebel Center Office Hours: M 12:30-2:30p.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Section 1.6: Sets Sets are the most basic of discrete structures and also the most general. Several of the discrete structures we will study are built.
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.
Sets Definition of a Set: NAME = {list of elements or description of elements} i.e. B = {1,2,3} or C = {x  Z + | -4 < x < 4} Axiom of Extension: A set.
SET.   A set is a collection of elements.   Sets are usually denoted by capital letters A, B, Ω, etc.   Elements are usually denoted by lower case.
Discrete Structures Chapter 3 Set Theory Nurul Amelina Nasharuddin Multimedia Department.
Sets 1.
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.
Survey of Mathematical Ideas Math 100 Chapter 2 John Rosson Thursday January 25, 2007.
Sets Set Operations Functions. 1. Sets 1.1 Introduction and Notation 1.2 Cardinality 1.3 Power Set 1.4 Cartesian Products.
Set, Combinatorics, Probability & Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Set,
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:
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
Discrete Structure Sets. 2 Set Theory Set: Collection of objects (“elements”) a  A “a is an element of A” “a is a member of A” a  A “a is not an element.
Lecture 2.2: Set Theory* CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures by Cinda Heeren.
CS201: Data Structures and Discrete Mathematics I
1. Set Theory Set: Collection of objects (“elements”) a  A “a is an element of A” “a is a member of A” a  A “a is not an element of A” A = {a 1, a 2,
CompSci 102 Discrete Math for Computer Science
ELEMENTARY SET THEORY.
Lecture 2.1: Sets and Set Operations CS 250, Discrete Structures, Fall 2014 Nitesh Saxena Adopted from previous lectures by Cinda Heeren.
Chapter 2 With Question/Answer Animations. Section 2.1.
Rosen 1.6, 1.7. Basic Definitions Set - Collection of objects, usually denoted by capital letter Member, element - Object in a set, usually denoted by.
Discrete Mathematics SETS. What is a set? ^A set is a unordered collection of “objects”  People in a class: {A yşe, B arış, C anan }  Cities in Turkey.
Sets Definition: A set is an unordered collection of objects, called elements or members of the set. A set is said to contain its elements. We write a.
Discrete Mathematics. Set Theory - Definitions and notation A set is an unordered collection of elements. Some examples: {1, 2, 3} is the set containing.
Lecture 2.2: Set Theory CS 250, Discrete Structures, Fall 2015 Nitesh Saxena Adopted from previous lectures by Cinda Heeren.
Discrete Mathematics CS 2610 January 27, part 2.
Discrete Mathematics Set.
Module #3 - Sets 3/2/2016(c) , Michael P. Frank 2. Sets and Set Operations.
Set Operations Section 2.2.
Fr: Discrete Mathematics by Washburn, Marlowe, and Ryan.
Discrete Mathematics CS 2610 August 31, Agenda Set Theory Set Builder Notation Universal Set Power Set and Cardinality Set Operations Set Identities.
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.
Introduction to Set Theory (§1.6) A set is a new type of structure, representing an unordered collection (group, plurality) of zero or more distinct (different)
Sets, Permutations, and Combinations. Lecture 4-1: Sets Sets: Powerful tool in computer science to solve real world problems. A set is a collection of.
Applied Discrete Mathematics Week 1: Logic and Sets
Set Definition: A set is unordered collection of objects.
The Language of Sets If S is a set, then
Discrete Structures – CNS 2300
CSNB 143 Discrete Mathematical Structures
Set, Combinatorics, Probability & Number Theory
Sets Section 2.1.
Chapter 1 Logic and Proofs Homework 2 Given the statement “A valid password is necessary for you to log on to the campus server.” Express the statement.
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
Introduction to Set Theory
… and now for something completely different…
Exercises Show that (P  Q)  (P)  (Q)
CS100: Discrete structures
Set Theory Rosen 6th ed., §
Set Operations Section 2.2.
Unit I: Part I Set Theory
Applied Discrete Mathematics Week 2: Proofs
Week #2 – 4/6 September 2002 Prof. Marie desJardins
Discrete Mathematics CS 2610
Lecture 2.1: Sets and Set Operations*
CS 250, Discrete Structures, Fall 2013
L5 Set Operations.
Math/CSE 1019N: Discrete Mathematics for Computer Science Winter 2007
… and now for something completely different…
Lecture Sets 2.2 Set Operations.
Sets & Set Operations.
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:

Discrete Mathematical The Set Theory

Set Theory - Definitions and notation A set is an unordered collection of elements. Some examples: {1, 2, 3} is the set containing “1” and “2” and “3.” {1, 1, 2, 3, 3} = {1, 2, 3} since repetition is irrelevant. {1, 2, 3} = {3, 2, 1} since sets are unordered. {1, 2, 3, …} is a way we denote an infinite set (in this case, the natural numbers).  = {} is the empty set, or the set containing no elements. Note:   {}

Set Theory - Definitions and notation x  S means “x is an element of set S.” x  S means “x is not an element of set S.” A  B means “A is a subset of B.” or, “B contains A.” or, “every element of A is also in B.” or, x ((x  A)  (x  B)). A B Venn Diagram

Set Theory - Definitions and notation A  B means “A is a subset of B.” A  B means “A is a superset of B.” A = B if and only if A and B have exactly the same elements. iff, A  B and B  A iff, A  B and A  B iff, x ((x  A)  (x  B)). So to show equality of sets A and B, show: A  B B  A

Set Theory - Definitions and notation A  B means “A is a proper subset of B.” A  B, and A  B. x ((x  A)  (x  B))  x ((x  B)  (x  A)) x ((x  A)  (x  B))  x ((x  B) v (x  A)) x ((x  A)  (x  B))  x ((x  B)  (x  A)) x ((x  A)  (x  B))  x ((x  B)  (x  A)) A B

Set Theory - Definitions and notation Quick examples: {1,2,3}  {1,2,3,4,5} {1,2,3}  {1,2,3,4,5} Is   {1,2,3}? No! Is   {,1,2,3}? Yes! Is   {,1,2,3}? Yes!

Set Theory - Definitions and notation Quiz time: Is {x}  {x}? Yes Is {x}  {x,{x}}? Yes Is {x}  {x,{x}}? Yes Is {x}  {x}? No

Set Theory - Ways to define sets : and | are read “such that” or “where” Explicitly: {John, Paul, George, Ringo} Implicitly: {1,2,3,…}, or {2,3,5,7,11,13,17,…} Set builder: { x : x is prime }, { x | x is odd }. In general { x : P(x) is true }, where P(x) is some description of the set. Ex. Let D(x,y) denote “x is divisible by y.” Give another name for { x : y ((y > 1)  (y < x))  D(x,y) }. Primes

Set Theory - Cardinality If S is finite, then the cardinality of S, |S|, is the number of distinct elements in S. |S| = 3. If S = {1,2,3}, |S| = 1. If S = {3,3,3,3,3}, |S| = 0. If S = , |S| = 3. If S = { , {}, {,{}} }, If S = {0,1,2,3,…}, |S| is infinite. (more on this later)

We say, “P(S) is the set of all subsets of S.” Set Theory - Power sets If S is a set, then the power set of S is 2S = { x : x  S }. aka P(S) We say, “P(S) is the set of all subsets of S.” 2S = {, {a}}. If S = {a}, 2S = {, {a}, {b}, {a,b}}. If S = {a,b}, 2S = {}. If S = , 2S = {, {}, {{}}, {,{}}}. If S = {,{}}, Fact: if S is finite, |2S| = 2|S|. (if |S| = n, |2S| = 2n) aka = also known as

Set Theory - Cartesian Product The Cartesian Product of two sets A and B is: A x B = { <a,b> : a  A  b  B} If A = {Charlie, Lucy, Linus}, and B = {Brown, VanPelt}, then A x B = {<Charlie, Brown>, <Lucy, Brown>, <Linus, Brown>, <Charlie, VanPelt>, <Lucy, VanPelt>, <Linus, VanPelt>} A1 x A2 x … x An = {<a1, a2,…, an>: a1  A1, a2  A2, …, an  An} A,B finite  |AxB| = ?

Set Theory - Operators The union of two sets A and B is: A  B = { x : x  A v x  B} If A = {Charlie, Lucy, Linus}, and B = {Lucy, Desi}, then A  B = {Charlie, Lucy, Linus, Desi} A B

Set Theory - Operators The intersection of two sets A and B is: A  B = { x : x  A  x  B} If A = {Charlie, Lucy, Linus}, and B = {Lucy, Desi}, then A  B = {Lucy} A B

Set Theory - Operators The intersection of two sets A and B is: A  B = { x : x  A  x  B} If A = {x : x is a US president}, and B = {x : x is deceased}, then A  B = {x : x is a deceased US president} B A

Sets whose intersection is empty are called disjoint sets Set Theory - Operators The intersection of two sets A and B is: A  B = { x : x  A  x  B} If A = {x : x is a US president}, and B = {x : x is in this room}, then A  B = {x : x is a US president in this room} =  Sets whose intersection is empty are called disjoint sets A B

Set Theory - Operators The complement of a set A is: A = { x : x  A} If A = {x : x is bored}, then A = {x : x is not bored} =  U A = U and U = 

Set Theory - Operators The set difference, A - B, is: U A B A - B = { x : x  A  x  B } A - B = A  B

A  B = { x : (x  A  x  B) v (x  B  x  A)} Set Theory - Operators like “exclusive or” The symmetric difference, A  B, is: A  B = { x : (x  A  x  B) v (x  B  x  A)} = (A - B) U (B - A) A U B

Set Theory - Operators A  B = { x : (x  A  x  B) v (x  B  x  A)} = (A - B) U (B - A) Proof: { x : (x  A  x  B) v (x  B  x  A)} = { x : (x  A - B) v (x  B - A)} = { x : x  ((A - B) U (B - A))} = (A - B) U (B - A)

Set Theory - Famous Identities Identity Domination Idempotent A  U = A A U  = A (Lazy) A U U = U A   = A A U A = A A  A = A

Set Theory - Famous Identities Excluded Middle Uniqueness Double complement A U A = U A  A =  A = A

Set Theory - Famous Identities Commutativity Associativity Distributivity A U B = B U A B  A A  B = (A U B) U C = A U (B U C) A  (B  C) (A  B)  C = A U (B  C) = A  (B U C) = (A U B)  (A U C) (A  B) U (A  C)

Set Theory - Famous Identities DeMorgan’s I DeMorgan’s II (A U B) = A  B (A  B) = A U B Hand waving is good for intuition, but we aim for a more formal proof. p q

Set Theory - 4 Ways to prove identities New & important Show that A  B and that A  B. Use a membership table. Use previously proven identities. Use logical equivalences to prove equivalent set definitions. Like truth tables Like  Not hard, a little tedious

Set Theory - 4 Ways to prove identities Prove that () (x  A U B)  (x  A U B)  (x  A and x  B)  (x  A  B) 2. () (x  A  B)  (x  A and x  B)  (x  A U B)  (x  A U B) (A U B) = A  B

Set Theory - 4 Ways to prove identities Prove that using a membership table. 0 : x is not in the specified set 1 : otherwise (A U B) = A  B A B A  B A U B 1

Set Theory - 4 Ways to prove identities Prove that using identities. (A U B) = A  B (A U B) = A U B = A  B = A  B