Discrete Mathematics. Set Theory - Definitions and notation A set is an unordered collection of elements. Some examples: {1, 2, 3} is the set containing.

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
2.1 Sets. DEFINITION 1 A set is an unordered collection of objects. DEFINITION 2 The objects in a set are called the elements, or members, of the set.
Discrete Structures & Algorithms More about sets EECE 320 — UBC.
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.
1 Set Theory Rosen 6 th ed., § Introduction to Set Theory A set is a structure, representing an unordered collection (group, plurality) of zero.
Discrete Structures Chapter 3 Set Theory Nurul Amelina Nasharuddin Multimedia Department.
CS 2210 (22C:019) Discrete Structures Sets and Functions Spring 2015 Sukumar Ghosh.
1 Discussion #21 Discussion #21 Sets & Set Operations; Tuples & Relations.
Survey of Mathematical Ideas Math 100 Chapter 2 John Rosson Thursday January 25, 2007.
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.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Sets.
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 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.
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,
Sets Math 123 September 15.
CompSci 102 Discrete Math for Computer Science
Thinking Mathematically Chapter 2 Set Theory 2.1 Basic Set Concepts.
Week 6 - Friday.  What did we talk about last time?  Solving recurrence relations.
ELEMENTARY SET THEORY.
Probability: Terminology  Sample Space  Set of all possible outcomes of a random experiment.  Random Experiment  Any activity resulting in uncertain.
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.
Introduction to Set theory. Ways of Describing Sets.
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.
Based on slides by Patrice Belleville and Steve Wolfman CPSC 121: Models of Computation Unit 11: Sets.
Discrete Mathematics CS 2610 January 27, part 2.
Discrete Mathematics Set.
Welcome to Form 4 Mathematics Topic for the day SETS.
1 Section 1.2 Sets A set is a collection of things. If S is a set and x is a member or element of S we write x  S. Othewise we write x  S. The set with.
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.
Thinking Mathematically Venn Diagrams and Subsets.
Discrete Mathematics CS 2610 August 31, Agenda Set Theory Set Builder Notation Universal Set Power Set and Cardinality Set Operations Set Identities.
Thinking Mathematically Venn Diagrams and Set Operations.
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)
Discrete Structures – CNS 2300
Discrete Mathematical The Set Theory
CSNB 143 Discrete Mathematical Structures
Set, Combinatorics, Probability & Number Theory
COT 3100, Spring 2001 Applications of Discrete Structures
Sets Section 2.1.
CS 2210:0001 Discrete Structures Sets and Functions
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
CS100: Discrete structures
Set Operations Section 2.2.
2.1 Sets Dr. Halimah Alshehri.
Discrete Mathematics CS 2610
Discrete Mathematics R. Johnsonbaugh
Lecture 2.1: Sets and Set Operations*
Math/CSE 1019N: Discrete Mathematics for Computer Science Winter 2007
Lecture Sets 2.2 Set Operations.
Sets & Set Operations.
Presentation transcript:

Discrete Mathematics

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  = {} 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.” Venn Diagram or, “B contains A.” or, “every element of A is also in B.” or,  x ((x  A)  (x  B)). A B

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)). A  B means “A is a proper subset of B.” A  B, and 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}? Yes! 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}? Is {x}  {x,{x}}? Is {x}  {x,{x}}? Is {x}  {x}? Yes No

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 }.

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.

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 = { , {  }, {{  }}, { ,{  }}}.

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 x B = {,,,,, }

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 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

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

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

Set Theory - Famous Identities Identity Domination Idempotent A  U = A A U  = A 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 = (A U B) U C = A  B = B U A B  A (A  B)  C = A U (B U 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

Set Theory - Inclusion/Exclusion Example: How many people are wearing a watch? How many people are wearing sneakers? How many people are wearing a watch OR sneakers? A B |A  B| = |A| + |B| - |A  B|

Set Theory - Inclusion/Exclusion Example: There are 217 cs majors. 157 are taking cs are taking cs are taking both. How many are taking neither? ( ) =

Set Theory - Generalized Inclusion/Exclusion Suppose we have: And I want to know |A U B U C| A B C |A U B U C| = |A| + |B| + |C| + |A  B  C| - |A  B| - |A  C| - |B  C|