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.

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

1. Number of Elements in A 2. Inclusion-Exclusion Principle 3. Venn Diagram 4. De Morgan's Laws 1.
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.
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.
Analytical Methods in CS (CIS 505)
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.
Chapter 2 The Basic Concepts of Set Theory
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.
Chapter 2 The Basic Concepts of Set Theory © 2008 Pearson Addison-Wesley. All rights reserved.
Lecture 3 Operations on Sets CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
SETS A set B is a collection of objects such that for every object X in the universe the statement: “X is a member of B” Is a proposition.
Mathematics.
Discrete Maths Objective to re-introduce basic set ideas, set operations, set identities , Semester 2, Set Basics 1.
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.
This section will discuss the symbolism and concepts of set theory
2.1 – Sets. Examples: Set-Builder Notation Using Set-Builder Notation to Make Domains Explicit Examples.
Chapter 3 – Set Theory  .
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
CS201: Data Structures and Discrete Mathematics I
CompSci 102 Discrete Math for Computer Science
SECTION 2-3 Set Operations and Cartesian Products Slide
ELEMENTARY SET THEORY.
Discrete Mathematical Structures 4 th Edition Kolman, Busby, Ross © 2000 by Prentice-Hall, Inc. ISBN
Chapter SETS DEFINITION OF SET METHODS FOR SPECIFYING SET SUBSETS VENN DIAGRAM SET IDENTITIES SET OPERATIONS.
Sets 2/10/121. What is a Set? Informally, a collection of objects, determined by its members, treated as a single mathematical object Not a real definition:
CSNB143 – Discrete Structure Topic 1 - Set. Topic 1 - Sets Learning Outcomes – Student should be able to identify sets and its important components. –
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.
Discrete Mathematics. Set Theory - Definitions and notation A set is an unordered collection of elements. Some examples: {1, 2, 3} is the set containing.
ITD1111 Discrete Mathematics & Statistics STDTLP
Discrete Mathematics Set.
College Algebra: Section 8.1 Sets and Counting Objectives of this Section Find All the Subsets of a Set Find All the Subsets of a Set Find the Intersection.
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.
Notions & Notations (2) - 1ICOM 4075 (Spring 2010) UPRM Department of Electrical and Computer Engineering University of Puerto Rico at Mayagüez Spring.
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.
Thinking Mathematically Venn Diagrams and Set Operations.
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.
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.
Dr. Ameria Eldosoky Discrete mathematics
CSNB 143 Discrete Mathematical Structures
Lecture 04 Set Theory Profs. Koike and Yukita
Sets Section 2.1.
The Basic Concepts of Set Theory
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 and Set Operations Grab a sheet from front.
Set Operations Section 2.2.
        { } Sets and Venn Diagrams Prime Numbers Even Numbers
Algebra 1 Section 1.1.
The Basic Concepts of Set Theory
Session – 2 SETS & Operations of SETS
CHAPTER 1 - Sets and Intervals
CHAPTER 1 - Sets and Intervals
دوره‏ی ضمن خدمت کشوری ریاضی پایه‏ی نهم مرداد 1394.
Discrete Mathematics CS 2610
Discrete Mathematics R. Johnsonbaugh
Lecture Sets 2.2 Set Operations.
Introduction A set is a collection of objects.
Sets, Unions, Intersections, and Complements
Presentation transcript:

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 elements x 1, …, x n is denoted {x 1, …, x n }. The empty set with no elements is denoted { } or . A set with one element is called a singleton. e.g., {a} is a singleton. The set of integers is denoted by Z, the natural numbers {0, 1, …} by N, the rational numbers by Q, and the real numbers by R. Equal Sets Two sets A and B are equal, denoted A = B if they have the same elements. e.g., {a, b, c} = {c, b, a}(no ordering). e.g., {a, a, b, c} = {a, b, c}(no repetitions) Sets can be described by properties that the elements satisfy. If P is a property, then the expression {x | P} denotes the set of all x that satisfy P. e.g., The set of odd natural numbers can be represented by the following equal sets. {x | x = 2k + 1 for some k  N} = {1, 3, 5, …}. Subsets The set A is a subset of B, denoted A  B, means every element of A is an element of B. e.g., N  Z  Q  R. e.g., S  S for any set S. e.g.,   S for any set S.

2 The power set of a set S, denoted power(S) is the set of all subsets of S. e.g., power({a, b}) = { , {a}, {b}, {a, b}}. Example(Comparing sets). Let A = {2k + 7 | k  Z} and B = {4k + 3 | k  Z}. Quiz. Is A  B? Answer: No. For example, 9  A but 9  B. Quiz. Is B  A? Answer: Yes. Let x  B. Then x = 4k + 3 for some k  Z. But we can write x = 4k + 3 = 4k – = 2(2k – 2) + 7. Since 2k – 2  Z, it follows that x  A. Therefore B  A. QED. Equality in terms of subsets: A = B iff A  B and B  A. Example. Let A = {2k + 5 | k  Z} and B = {2k + 3 | k  Z}. Show that A = B. Proof: First show A  B. Let x  A. Then x = 2k + 5 for some k  Z. So we have x = 2k + 5 = 2k = 2(k + 1) + 3. Since k + 1  Z, it follows that x  B. Therefore A  B. Now show the other direction B  A. …….Class fill in the proof (2 minute quiz). Since A  B and B  A it follows that A = B. QED.

3 Operations on Sets Union: A  B = {x | x  A or x  B}. Intersection: A  B = {x | x  A and x  B}. Difference: A – B = {x | x  A and x  B}. Symmetric Difference: A  B = {x | x  A or x  B but not both} Note: A  B = (A – B)  (B – A) = (A  B) – (A  B ). Universal Complement: Given a universe U and A  U, we write A' = U – A. Example. For each n  N let D n = {x  N | x divides n}. So D n is the set of positive divisors of n. Here are some expressions involving these sets. D 0 = {1, 2, 3, … } = N – {0}, D 5 = {1, 5}, D 6 = {1, 2, 3, 6}, and D 9 = {1, 3, 9}. D 5  D 6 = {1, 2, 3, 5, 6} D 5  D 6 = {1} D 9 – D 6 = {9} D 5  D 6 = {2, 3, 5, 6} Let N be the universe. Then D 0 ' = N – D 0 = {0}, and {0}' = D 0. Quiz (2 minutes). Draw a Venn diagram for three sets A, B, C with some areas shaded. Then find an expression to represent the shaded area.

4 Properties of Set Operations Union and intersection are commutative, associative, and distribute over each other. There are many other properties too. For example, Absorption: A  (A  B) = A and A  (A  B) = A. De Morgan’s Laws: (A  B)' = A'  B' and (A  B)' = A'  B'. Counting Sets The cardinality of a set S is denoted by | S |. Two useful rules for counting finite sets are: Inclusion-Exclusion or Union Rule: | A  B | = | A | + | B | – | A  B |. Difference Rule: | A – B | = | A | – | A  B |. Quiz (2 minutes). Find a rule for the union of three sets: | A  B  C | = ? Quiz (3 minutes). Three programs use a collection of processors in the following way, where A, B, and C represent the sets of processors used by the three programs: | A | = 20, | B | = 40, | C | = 60, | A  B | = 10, | A  C | = 8, | B  C | = 6. If there are 100 processors available, what could | A  B  C | be? Answer: 100 ≥ | A  B  C | = – 10 – 8 – 6 + | A  B  C |. So | A  B  C | ≤ 4. Bags (Multisets) are like sets but can contain repeated elements. e.g., [t, o, o, t] = [o, t, t, o]. Union and intersection can be defined by taking the maximum and minimum occurrences of each element, respectively. Quiz (2 minutes). Let A = [m, i, s, s, i, s, s, i, p, p, i] and B = [s, i, p, p, i, n, g]. What are A  B and A  B? Answer: A  B = [m, i, s, s, i, s, s, i, p, p, i, n, g] and A  B = [s, i, p, p, i].