Lecture 2.1: Sets and Set Operations CS 250, Discrete Structures, Fall 2014 Nitesh Saxena Adopted from previous lectures by Cinda Heeren.

Slides:



Advertisements
Similar presentations
Prof. Johnnie Baker Module Basic Structures: Sets
Advertisements

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.
2.1 Sets ‒Sets ‒Common Universal Sets ‒Subsets 2.2 Set Operations 2.3 Functions 2.4 Sequences and Summations 1.
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.
Lecture 2.3: Set Theory, and Functions* CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures by Cinda Heeren.
Analytical Methods in CS (CIS 505)
Sets Sections 2.1 and 2.2 of Rosen Fall 2008 CSCE 235 Introduction to Discrete Structures Course web-page: cse.unl.edu/~cse235 Questions:
Sets 1.
Sets 1.
Set Theory.
Survey of Mathematical Ideas Math 100 Chapter 2 John Rosson Thursday January 25, 2007.
2.1 – Symbols and Terminology Definitions: Set: A collection of objects. Elements: The objects that belong to the set. Set Designations (3 types): Word.
Discrete Mathematics Unit - I. Set Theory Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is very subjective)
Sets Set Operations Functions. 1. Sets 1.1 Introduction and Notation 1.2 Cardinality 1.3 Power Set 1.4 Cartesian Products.
2.1 – Sets. Examples: Set-Builder Notation Using Set-Builder Notation to Make Domains Explicit Examples.
9/8/2011Lecture Functions1 Lecture 2.4: Functions CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures by Cinda.
Set, Combinatorics, Probability & Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Set,
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Copyright  The McGraw-Hill Companies, Inc. Permission required for reproduction.
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.
Lecture 4.4: Equivalence Classes and Partially Ordered Sets CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures by Cinda.
CS201: Data Structures and Discrete Mathematics I
Chapter 2: Basic Structures: Sets, Functions, Sequences, and Sums (1)
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
Lecture 4.3: Closures and Equivalence Relations CS 250, Discrete Structures, Fall 2013 Nitesh Saxena Adopted from previous lectures by Cinda Heeren.
Section 2.1. Section Summary Definition of sets Describing Sets Roster Method Set-Builder Notation Some Important Sets in Mathematics Empty Set and Universal.
ELEMENTARY SET THEORY.
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.
Lecture 4.1: Relations Basics CS 250, Discrete Structures, Fall 2012 Nitesh Saxena Adopted from previous lectures by Cinda Heeren.
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.
Basic Definitions of Set Theory Lecture 23 Section 5.1 Wed, Mar 8, 2006.
Lecture 2.2: Set Theory CS 250, Discrete Structures, Fall 2015 Nitesh Saxena Adopted from previous lectures by Cinda Heeren.
Discrete Mathematics Set.
Lecture 4.4: Equivalence Classes and Partially Ordered Sets CS 250, Discrete Structures, Fall 2012 Nitesh Saxena Adopted from previous lectures by Cinda.
Basic Definitions of Set Theory Lecture 23 Section 5.1 Mon, Feb 21, 2005.
Module #3 - Sets 3/2/2016(c) , Michael P. Frank 2. Sets and Set Operations.
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.
Lecture 1.5: Proof Techniques CS 250, Discrete Structures, Fall 2012 Nitesh Saxena Adopted from previous lectures by Cinda Heeren 1.
Lecture 4.1: Relations Basics CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures by Cinda Heeren.
The Basic Concepts of Set Theory. Chapter 1 Set Operations and Cartesian Products.
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)
Lecture 1.5: Proof Techniques
Set Definition: A set is unordered collection of objects.
Discrete Mathematical The Set Theory
Sets Section 2.1.
Lecture 4.1: Relations Basics
Lecture 1.5: Proof Techniques
Lecture 4.3: Closures and Equivalence Relations
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
CSE 2353 – September 22nd 2003 Sets.
CS100: Discrete structures
        { } Sets and Venn Diagrams Prime Numbers Even Numbers
2.1 Sets Dr. Halimah Alshehri.
Lecture 4.1: Relations Basics
Discrete Mathematics CS 2610
Lecture 1.6: Proof Techniques (contd)
Lecture 2.1: Sets and Set Operations*
Lecture 4.1: Relations Basics
Lecture 1.6: Proof Techniques (contd)
2.1 – Symbols and Terminology
Lecture Sets 2.2 Set Operations.
Presentation transcript:

Lecture 2.1: Sets and Set Operations CS 250, Discrete Structures, Fall 2014 Nitesh Saxena Adopted from previous lectures by Cinda Heeren

12/12/2015 Lecture Sets and Set Operations Course Admin HW1 Due 11am 09/18/14 – this Thursday Please follow all instructions Recall: late submissions will not be accepted

12/12/2015 Lecture Sets and Set Operations Outline Set Definitions and Theory Set Operations

12/12/2015 Lecture Sets and Set Operations 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 null set, or the set containing no elements. U: is the set of all possible elements in the universe Note:   {  }

12/12/2015 Lecture Sets and Set Operations 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.” Venn Diagram or, “B contains A.” or, “every element of A is also in B.” or,  x ((x  A)  (x  B)). A B

12/12/2015 Lecture Sets and Set Operations 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

12/12/2015 Lecture Sets and Set Operations 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

12/12/2015 Lecture Sets and Set Operations 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}? Yes!  x (x   )  (x  {1,2,3}) holds, because (x   ) is false. Is   {1,2,3}? No Is   { ,1,2,3}?Yes Is   { ,1,2,3}?Yes

12/12/2015 Lecture Sets and Set Operations Set Theory - Definitions and notation Quiz time: Is {x}  {x}? Is {x}  {x,{x}}? Is {x}  {x,{x}}? Is {x}  {x}? Yes No

12/12/2015 Lecture Sets and Set Operations Set Theory - Ways to define sets 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) }. : and | are read “such that” or “where” Primes

12/12/2015 Lecture Sets and Set Operations Set Theory - Cardinality If S is finite, then the cardinality of S, |S|, is the number of distinct elements in S. If S = {1,2,3}, |S| = 3. If S = {3,3,3,3,3}, If S = , If S = { , {  }, { ,{  }} }, |S| = 1.|S| = 0. |S| = 3. If S = {0,1,2,3,…}, |S| is infinite.

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

12/12/2015 Set Theory - Cartesian Product The Cartesian Product of two sets A and B is: A x B = { : a  A  b  B} If A = {Charlie, Lucy, Linus}, and B = {Brown, VanPelt}, then A,B finite  |AxB| = ? A 1 x A 2 x … x A n = { : a 1  A 1, a 2  A 2, …, a n  A n } A x B = {,,,,, } We’ll use these special sets soon! a)AxB b)|A|+|B| c)|A+B| d)|A||B| Lecture Sets and Set Operations

12/12/2015 Lecture Sets and Set Operations 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

12/12/2015 Lecture Sets and Set Operations 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

12/12/2015 Lecture Sets and Set Operations 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} =  A B Sets whose intersection is empty are called disjoint sets

12/12/2015 Lecture Sets and Set Operations 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} A ==  = U and U =  U

12/12/2015 Lecture Sets and Set Operations Set Theory - Operators The set difference, A - B, is: A U B A - B = { x : x  A  x  B } A - B = A  B

12/12/2015 Lecture Sets and Set Operations Today’s Reading Rosen 2.1