Set. Outline Universal Set Venn Diagram Operations on Sets.

Slides:



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

Discrete Mathematics Lecture 5 Alexander Bukharovich New York University.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Instructor: Hayk Melikya
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Week 21 Basic Set Theory A set is a collection of elements. Use capital letters, A, B, C to denotes sets and small letters a 1, a 2, … to denote the elements.
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.
Denoting the beginning
Analytical Methods in CS (CIS 505)
Discrete Structures Chapter 3 Set Theory Nurul Amelina Nasharuddin Multimedia Department.
Sets 1.
Sets 1.
Set Theory.
Mathematics.
Discrete Maths Objective to re-introduce basic set ideas, set operations, set identities , Semester 2, Set Basics 1.
Survey of Mathematical Ideas Math 100 Chapter 2
Operations on Sets – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Operations on Sets Reading: Kolman, Section 1.2.
Chapter 2 The Basic Concepts of Set Theory © 2008 Pearson Addison-Wesley. All rights reserved.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
2.1 – Sets. Examples: Set-Builder Notation Using Set-Builder Notation to Make Domains Explicit Examples.
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)
1 ENM 503 Block 1 Algebraic Systems Lesson 2 – The Algebra of Sets The Essence of Sets What are they?
1.4 Sets Definition 1. A set is a group of objects . The objects in a set are called the elements, or members, of the set. Example 2 The set of positive.
CS201: Data Structures and Discrete Mathematics I
Chapter 2: Basic Structures: Sets, Functions, Sequences, and Sums (1)
CompSci 102 Discrete Math for Computer Science
Sets, Relations, and Lattices
Chapter 2 Section 3 - Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
Section 2.2 Subsets and Set Operations Math in Our World.
SECTION 2-3 Set Operations and Cartesian Products Slide
ELEMENTARY SET THEORY.
Chapter 2 With Question/Answer Animations. Section 2.1.
Introduction to Set theory. Ways of Describing Sets.
(CSC 102) Lecture 13 Discrete Structures. Previous Lectures Summary  Direct Proof  Indirect Proof  Proof by Contradiction  Proof by Contra positive.
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.
Set Theory Concepts Set – A collection of “elements” (objects, members) denoted by upper case letters A, B, etc. elements are lower case brackets are used.
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.
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.
Discrete Mathematics Lecture # 13 Applications of Venn Diagram.
CPCS 222 Discrete Structures I
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.
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.
Dr. Ameria Eldosoky Discrete mathematics
Applied Discrete Mathematics Week 1: Logic and Sets
The set of whole numbers less than 7 is {1, 2, 3, 4, 5, 6}
Sets Page 746.
Set Definition: A set is unordered collection of objects.
The Language of Sets If S is a set, then
Set Theory.
Set, Combinatorics, Probability & Number Theory
Sets Section 2.1.
Week 7 - Monday CS322.
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
… and now for something completely different…
Exercises Show that (P  Q)  (P)  (Q)
CS100: Discrete structures
Set Theory A B C.
Set Operations Section 2.2.
2.1 Sets Dr. Halimah Alshehri.
Sets. EXAMPLE 1 The set O of odd positive integers less than 10 can be expressed by O = { l, 3, 5, 7, 9}. * This way of describing a set is known as.
Discrete Mathematics R. Johnsonbaugh
… and now for something completely different…
Sets & Set Operations.
AND.
Presentation transcript:

Set

Outline Universal Set Venn Diagram Operations on Sets

Outline Partitions of Set Finite and Infinite Sets Set Cardinality Cartesian Product Set Identities

Universal Set The set of all elements under consideration is called the Universal Set. The Universal Set is usually denoted by U and is represented by a rectangle. U

Venn Diagram Venn diagrams are often used to indicate the relationships between sets. The Universal Set is represented by the interior of a rectangle, and the other sets are represented by circle within the rectangle.

Venn Diagram Draw a Venn Diagram that represents V, the set of vowels in the English Alphabet We draw a rectangle to indicate the universal set U, which is the set of the 26 letters of the English alphabet. Inside this rectangle we draw a circle to represent V. Inside this circle we indicate the elements of V with points V

Venn Diagram Example –A  B –Venn Diagram Showing that A is a Subset of B. A B

Venn Diagram Example –A  B –Venn Diagram Showing that A is a Subset of B. A=B

Venn Diagram –A  B –Venn Diagram Showing that A is not a Subset of B. B A AB

Venn Diagram –A  B –Venn Diagram Showing that A is not a Subset of B. AB

Operations on Sets Union –Let A and B be subsets of a universal set U. –The union of A and B, denoted A U B, is the set of all elements that are in at least one of A or B. –A U B = {x  U | x  A or x  B} –For any set S, S U  = S and S U U = U

Operations on Sets Example Let –U = {a, b, c, d, e, f, g} –A = {a, c, e, g} –B = {d, e, f, g} Then –A U B = {a, c, d, e, f, g} AB

Operations on Sets Intersection –Let A and B be subsets of a universal set U. –The intersection of A and B, denoted A ∩ B, is the set of all elements that are common to both A and B. –A ∩ B = {x  U | x  A and x  B} –For any set S, S ∩  =  and S ∩ U = S

Operations on Sets Example Let –U = {a, b, c, d, e, f, g} –A = {a, c, e, g} –B = {d, e, f, g} Then –A ∩ B = {e, g} AB

Operations on Sets Difference –Let A and B be subsets of a universal set U. –The difference of A minus B (or relative complement of A in B), denoted A − B, is the set of all elements that are in A and not B. –A – B = {x  U | x  A and x  B} –For any set S, S –  = S and S – U = 

Operations on Sets Example Let –U = {a, b, c, d, e, f, g} –A = {a, c, e, g} –B = {d, e, f, g} Then –A – B = {a, c} AB Take note that in set Difference, A – B is different from B – A.

Operations on Sets Example Let –U = {a, b, c, d, e, f, g} –A = {a, c, e, g} –B = {d, e, f, g} Then –B – A = {d, f} AB

Operations on Sets Symmetric Difference –Let A and B be subsets of a universal set U. –The symmetric difference of A and B, denoted A  B, is the set of all elements that are in either A or B but not both or the union of the difference of A and B and B and A. –A  B = {x  U | x  A and x  B} U {x  U | x  B and x  A} –A  B = (A-B) U (B-A)

Operations on Sets Example Let –U = {a, b, c, d, e, f, g} –A = {a, c, e, g} –B = {d, e, f, g} Then –A  B = {a, c, d, f} AB B

Operations on Sets Complement –Let A be a subset of a universal set U. –The complement of A, denoted A c, is the set of all elements in U that are not in A. –A c = {x  U | x  A} –Empty sets and universal set are related by  C =U and U c = 

Operations on Sets Example Let –U = {a, b, c, d, e, f, g} –A = {a, c, e, g} Then –A c = {b, d, f} A AcAc

Exercise Let A = {1, 3, 5, 7, 9}, B = {3, 6, 9}, and C = {2, 4, 6, 8}. Find each of the following and draw a Venn Diagram representing each operation. 1.B – A6. B  C 2.A U B7. A  B 3.A – B8. A U C 4.A ∩ B9. A U C U C 5.B U C10. A – C

Solution to Exercise Let –A = {1, 3, 5, 7, 9}, –B = {3, 6, 9} Then –B – A = {6} AB

Solution to Exercise Let –A = {1, 3, 5, 7, 9}, –B = {3, 6, 9} Then –A U B = {1, 3, 5, 7, 9} AB

Solution to Exercise Let –A = {1, 3, 5, 7, 9}, –B = {3, 6, 9} Then –A – B = {1, 5, 7} AB

Solution to Exercise Let –A = {1, 3, 5, 7, 9}, –B = {3, 6, 9} Then –A ∩ B = {3, 9} AB

Solution to Exercise Let –B = {3, 6, 9} –C = {2, 4, 6, 8} Then –B U C = {2, 3, 4, 6, 8, 9} BC

Solution to Exercise Let –B = {3, 6, 9} –C = {2, 4, 6, 8} Then –B  C = {2, 3, 4, 8} BB C

Solution to Exercise Let –A = {1, 3, 5, 7, 9} –B = {3, 6, 9} Then –A  B = {1, 5, 6, 7} AB B

Solution to Exercise Let –A = {1, 3, 5, 7, 9} –C = {2, 4, 6, 8} Then –A U C = {1, 2, 3, 4, 5, 6, 7, 8, 9} AC

Solution to Exercise Let –A = {1, 3, 5, 7, 9} –C = {2, 4, 6, 8} Then –A U C U C = {1, 2, 3, 4, 5, 6, 7, 8, 9} C A C

Solution to Exercise Let –A = {1, 3, 5, 7, 9}, –C = {2, 4, 6, 8} Then –A – C = {1, 3, 5, 7, 9} AC

Partitions of Set In many applications of set theory, sets are divided up into non-overlapping (or disjoint) pieces. Such a division is called a partition. Two sets are called disjoint if, and only if, they have no elements in common. A ∩ B = 

Partitions of Set Let –A = {1, 3, 5} –B = {2, 4, 6} Then –A ∩ B = {1, 3, 5} ∩ {2, 4, 6} –A ∩ B =  –A and B are disjoint since they have no elements in common.

Power Set There are various situations in which it is useful to consider the set of all subsets of a particular set. The power set axiom guarantees that this is a set. Given a set A, the power set of A, denoted by P(A), is the set of all subsets of A.

Power Set Example Let –A = {1, 2} then –P(A) = { , {1}, {2}, {1, 2}} If A has n elements then P(A) has 2 n elements.

Exercise Determine the power set of the following sets. 1.A={a, b, c, d} 2.B={1, 2, 3, 4,5} 3.C={5, 10, 15}

Solution to Exercise Determine the power set of the following sets. A={a, b, c, d} P(A) = { ∅, {a}, {b}, {c}, {d}, {a,b}, {a,c}, {a,d}, {b,c}, {b,d}, {c,d}, {a,b,c}, {a,b,d}, {a,c,d}, {b,c,d}, {a,b,c,d} }

Solution to Exercise Determine the power set of the following sets. B={1, 2, 3, 4, 5} P(B) = { ∅, { 1 }, { 2 }, { 3 }, { 4 }, { 5 }, { 1, 2 }, { 1, 3 }, { 1, 4 }, { 1, 5 }, { 2, 3 }, { 2, 4 }, { 2, 5 }, { 3, 4 }, { 3, 5 }, { 4, 5 }, { 1, 2, 3 }, { 1, 2, 4 }, { 1, 2, 5 }, { 1, 3, 4 }, { 1, 3, 5 }, { 1, 4, 5 }, { 2, 3, 4 }, { 2, 3, 5 }, { 2, 4, 5 }, { 3, 4, 5 }, { 1, 2, 3, 4 }, { 1, 2, 3, 5 }, { 1, 2, 4, 5 }, { 1, 3, 4, 5 }, { 2, 3, 4, 5 }, { 1, 2, 3, 4, 5 } }

Solution to Exercise Determine the power set of the following sets. C={5, 10, 15} P(C) = { ∅, {5}, {10}, {15}, {5,10}, {5,15}, {10,15}, {5,10,15}}

Finite and Infinite Sets A set is called finite if, and only if, it is the empty set or there is one-to-one correspondence from {1,2,3, …, n} to it, where n is a positive integer. A non empty set that cannot be put into one-to- one correspondence with {1,2,3,…,n}, for any positive integer n, is called infinite set.

Set Cardinality The number of elements in a finite set A is termed as the cardinality of set A, denoted by |A|. Thus, if A = {1, 2, 3} then |A| = 3. Let A and B be any sets. A has the same cardinality as B if, and only if, there is a one-to- one correspondence from A to B(Cardinality means “the total number of elements in a set”). When A and B have the same cardinality, we write |A| = |B|.

Exercise Determine the cardinality of the following sets. 1.A={1} 2.B={1, 3, 5, 7} 3.C={a,b,c,d,e,f,g} 4.D={a,b,c,d,…,z}

Solution to Exercise Determine the cardinality of the following sets. 1.A={1}|A|=1 2.B={1, 3, 5, 7}|B|=4 3.C={a,b,c,d,e,f,g}|C|=6 4.D={a,b,c,d,…,z}|D|=26

Cartesian Product The order of elements in a collection is often important. Because sets are unordered, a different structure is needed to represent ordered collections. This is provided by ordered n-tuples. The ordered n-tuple (a 1, a 2,..., a n ) is the ordered collection that has a 1 as its first element, a 2 as its second element,..., and a n as its nth element.

Cartesian Product Cartesian Product of Sets Given sets A 1, A 2,..., A n, the Cartesian product of A 1, A 2,..., A n denoted A 1 × A 2 ×... × A n, is the set of all ordered n-tuples (a 1, a 2,..., a n ) where a 1 ∈ A 1, a 2 ∈ A 2,..., a n ∈ A n. –A 1 × A 2 ×· · ·× A n = {(a 1, a 2,..., a n ) | a 1 ∈ A 1, a 2 ∈ A 2,..., a n ∈ A n }.

Cartesian Product Let A and B be sets. The Cartesian product of A and B, denoted A x B (read “A cross B”) is the set of all ordered pairs (a, b), where a is in A and b is in B. A x B = {(a, b)| a  A and b  B} If set A has m elements and set B has n elements then A x B has m x n elements.

Cartesian Product Example Let –A = {1, 2} –B = {a, b, c} Then –A x B = {(1,a), (1,b), (1,c), (2,a), (2, b), (2, c)} –B x A = {(a,1), (a,2), (b, 1), (b, 2), (c, 1), (c, 2)}

Cartesian Product A x B  B x A for non-empty and unequal sets A and B. A x  =  x A =  | A x B| = |A| x |B|

Exercise Let –A = {x, y} –B = {1, 2, 3} –C = {a, b} Find the Cartesian Product of the following: 1.A x B 2.A x B x C 3.A x C 4.B x A

Solution to Exercise Let –A = {x, y} –B = {1, 2, 3} –C = {a, b} 1.A x B={x1, x2, x3, y1, y2, y3} 2.A x B x C={x1a, x2a, x3a, x1b, x2b, x3b, y1a, y1b, y2a, y2b, y3a, y3b} 3.A x C={xa, xb, ya, yb} 4.B x A={1x, 1y, 2x, 2y, 3x, 3y}

Set Identities An identity is an equation that is universally true for all elements in some set. Example, –The equation a + b = b + a is an identity for real numbers because it is true for all real numbers a and b.

Set Difference Let A, B, and C be sets Idempotent Laws –A U A = A –A ∩ A = A Commutative Laws –A U B = B U A –A ∩ B = B ∩ A Associative Laws –(A U B) U C = A U (B U C) –(A ∩ B) ∩ C = A ∩ (B ∩ C) Distributive Laws –A ∩ (B U C) = (A ∩ B) U (A ∩ C) –A U (B ∩ C) = (A U B) ∩ (A U C) De Morgan’s –(A U B)’ = A‘ ∩ B’ –(A ∩ B)’ = A‘ U B’ Double Complement Law –(A’)’ = A Set Difference –A – B = A ∩ B’

Set Identities Example Prove that for all sets A, B, and C, –A − (B ∩ C) = (A − B) U (A − C) Solution 1.A − (B ∩ C) = A ∩ (B ∩ C)’Set Difference 2.A ∩ (B ∩ C) = A ∩ (B’ U C’)De Morgan’s 3.A ∩ (B’ U C’) = (A ∩ B’) U (A ∩ C’) Distributive 4.(A ∩ B’) U (A ∩ C’) = (A – B) U (A – C) set difference

Exercise Prove that for all sets A, B, and C, –(A U ( B ∩ C))’ = (C’ U B’) ∩ A’

Solution to Exercise Prove that for all sets A, B, and C, –(A U (B ∩ C))’ = (C’ U B’) ∩ A’ –(A U (B ∩ C))’ = A’ ∩ (B ∩ C)’ De Morgan’s Law –A’ ∩ (B’ ∩ C)’ = A’ ∩ (B’ U C’)De Morgan’s Law –A’ ∩ (B’ U C’) = (B’ U C’) ∩ A’ Commutative Law –(B’ U C’) ∩ A’ = (C’ U B’) ∩ A’Commutative Law

Summary The set of all elements under consideration is called the Universal Set. The Universal Set is usually denoted by U and is represented by a rectangle. Venn diagrams are often used to indicate the relationships between sets. The Universal Set is represented by the interior of a rectangle, and the other sets are represented by circle within the rectangle.

Summary The Operations on Sets are Union, Intersection, Difference, Set Difference, and Complement. Sets are divided up into non-overlapping (or disjoint) pieces. Two sets are called disjoint if, and only if, they have no elements in common. Power set is the set of all subsets of a particular set.

Summary A set is called finite if, and only if, it is the empty set or there is one-to-one correspondence from {1,2,3, …, n} to it, where n is a positive integer. A non empty set that cannot be put into one-to- one correspondence with {1,2,3,…,n}, for any positive integer n, is called infinite set. The number of elements in a finite set A is termed as the cardinality of set A, denoted by |A|.

Summary The Cartesian product of A and B, denoted A x B (read “A cross B”) is the set of all ordered pairs (a, b), where a is in A and b is in B. An identity is an equation that is universally true for all elements in some set. The basic set identities are Idempotent Laws, Commutative Laws. Associative Laws, Distributive Laws, De Morgan’s, Double Complement Law, and Set Difference.

QUESTION?