The Language of Sets If S is a set, then

Slides:



Advertisements
Similar presentations
Introduction to Set Theory
Advertisements

Discrete Structures Chapter 6: Set Theory
COUNTING AND PROBABILITY
Discrete Mathematics I Lectures Chapter 6
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Instructor: Hayk Melikya
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Sets DISCRETE STRUCTURE ABDUL BASIT TAHIR, KAMRAN ALI, FAIZAN ILLAHI, NOMAN AHMAD, ARSALAN MUBASHIR.
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.
Discrete Structures Chapter 3 Set Theory Nurul Amelina Nasharuddin Multimedia Department.
Chapter 2 The Basic Concepts of Set Theory
Sets 1.
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.
Mathematics.
Set Notation.
This section will discuss the symbolism and concepts of set theory
Set theory Sets: Powerful tool in computer science to solve real world problems. A set is a collection of distinct objects called elements. Traditionally,
Definition and Representation A set is a well-defined collection of objects; The objects are called elements or members of the set; A set can be represented.
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)
Chapter 7 Logic, Sets, and Counting Section 2 Sets.
1 ENM 503 Block 1 Algebraic Systems Lesson 2 – The Algebra of Sets The Essence of Sets What are they?
CS201: Data Structures and Discrete Mathematics I
Copyright © Cengage Learning. All rights reserved.
Section 2.2 Subsets and Set Operations Math in Our World.
Naïve Set Theory. Basic Definitions Naïve set theory is the non-axiomatic treatment of set theory. In the axiomatic treatment, which we will only allude.
Chapter SETS DEFINITION OF SET METHODS FOR SPECIFYING SET SUBSETS VENN DIAGRAM SET IDENTITIES SET OPERATIONS.
Chapter 2 With Question/Answer Animations. Section 2.1.
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.
Sets.
Copyright © Cengage Learning. All rights reserved. CHAPTER 8 RELATIONS.
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.
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)
CPCS 222 Discrete Structures I
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.
Set. Outline Universal Set Venn Diagram Operations on Sets.
The Relation Induced by a Partition
CSE15 Discrete Mathematics 02/13/17
Sets Finite 7-1.
Chapter 2 Sets and Functions.
Set Definition: A set is unordered collection of objects.
CHAPTER 3 SETS, BOOLEAN ALGEBRA & LOGIC CIRCUITS
Copyright © Cengage Learning. All rights reserved.
Set Theory.
Relations and Functions
Direct Proof and Counterexample III: Divisibility
Set, Combinatorics, Probability & Number Theory
Sets Section 2.1.
Reflexivity, Symmetry, and Transitivity
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.
Discrete Structure II: Introduction
Direct Proof and Counterexample V: Floor and Ceiling
Set Theory A B C.
2.1 Sets Dr. Halimah Alshehri.
Copyright © Cengage Learning. All rights reserved.
Copyright © Cengage Learning. All rights reserved.
COUNTING AND PROBABILITY
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 CS 2610
The aim of education is to teach students how to think rather than what to think. Sets The set is the fundamental discrete structure on which all other.
Chapter 7 Logic, Sets, and Counting
Copyright © Cengage Learning. All rights reserved.
Lecture Sets 2.2 Set Operations.
Sets & Set Operations.
Foundations of Discrete Mathematics
Presentation transcript:

The Language of Sets If S is a set, then Intuitively, a set is simply a collection of elements. unordered, no duplicate If S is a set, then “x  S” means x is an element of S “x  S” means x is not an element of S Set-roster notation: S = {1, 2, 3} S = {1, 2, …, 100} S = {1, 2, …} Set-builder notation: { x  S | P(x) } where the “|” is read “such that”. S = {x  S | x≥1 } S = {x  S | 1 ≤ x ≤100}

Subsets: Proof and Disproof We begin by rewriting what it means for a set A to be a subset of a set B as a formal universal conditional statement: The negation is, therefore, existential:

Subsets: Proof and Disproof A proper subset of a set is a subset that is not equal to its containing set. Thus

Let A = {1} , B = {1,2}, C = {1, 2, {1}}. Is A  B? Is A  C? Example Let A = {1} , B = {1,2}, C = {1, 2, {1}}. Is A  B? Is A  C? Is B  C? Is 1  C? Is A  C? Is B  C?

Subsets: Proof and Disproof

Example 2 – Proving and Disproving Subset Relations Define sets A and B as follows: Prove that A  B. Proof: Suppose x is a particular but arbitrarily chosen element of A. [We must show that xB, i.e., that x = 3s for some integer s.]

Example 2 – Solution cont’d By definition of A, there is an integer r such that x = 6r + 12. Let s = 2r + 4. Then s is an integer because products and sums of integers are integers. Also, 3s = 6r + 12 = x and so x  B.

Example 2 – Solution Disprove that B  A. cont’d Disprove that B  A. To disprove a statement means to show that it is false, and to show it is false that B  A, you must find an element of B that is not an element of A. By the definitions of A and B, this means that you must find an integer x of the form 3  (some integer) that cannot be written in the form 6  (some integer) + 12.

Example 2 – Solution For instance, consider x = 3. Then x  B because 3 = 3  1, but x  A because there is no integer r such that 3 = 6r + 12. For if there were such an integer, then but 3/2 is not an integer. Thus 3  B but 3  A, and so B ⊈ A.

Set Equality We have known that by the axiom of extension, sets A and B are equal if, and only if, they have exactly the same elements. We restate this as a definition that uses the language of subsets.

Example 3 – Set Equality Define sets A and B as follows: Is A = B? Solution: Yes. To prove this, both subset relations A  B and B  A must be proved.

Example 3 – Solution Part 1, Proof That A  B: cont’d Part 1, Proof That A  B: Suppose x is a particular but arbitrarily chosen element of A. By definition of A, there is an integer a such that x = 2a. Let b = a + 1. Then b is an integer because it is a sum of integers. Also 2b – 2 = 2(a + 1) – 2 = 2a + 2 – 2 = 2a = x, Thus, by definition of B, x is an element of B. Part 2, Proof That B ⊆ A: Similarly we can prove that B ⊆ A. Hence A = B.

Venn Diagrams If sets A and B are represented as regions in the plane, relationships between A and B can be represented by pictures, called Venn diagrams, that were introduced by the British mathematician John Venn in 1881. For instance, the relationship A  B can be pictured in one of two ways, as shown below. A ⊆ B

Venn Diagrams The relationship A B can be represented in three different ways with Venn diagrams, as shown below. A B

Example 4 – Relations among Sets of Numbers Since Z, Q, and R denote the sets of integers, rational numbers, and real numbers, respectively, Z is a subset of Q because every integer is rational (any integer n can be written in the form ). Q is a subset of R because every rational number is real (any rational number can be represented as a length on the number line). Z is a proper subset of Q because there are rational numbers that are not integers (for example, ).

Example 4 – Relations among Sets of Numbers cont’d Q is a proper subset of R because there are real numbers that are not rational (for example, ). This is shown diagrammatically below.

Operations on Sets Most mathematical discussions are carried on within some context. For example, in a certain situation all sets being considered might be sets of real numbers. In such a situation, the set of real numbers would be called a universal set or a universe of discourse for the discussion.

Operations on Sets

Operations on Sets Venn diagram representations for union, intersection, difference, and complement are shown below. Shaded region represents A  B. Shaded region represents A  B. Shaded region represents B – A. Shaded region represents Ac.

Example 5 – Unions, Intersections, Differences, and Complements Let the universal set be the set U = {a, b, c, d, e, f, g} and let A = {a, c, e, g} and B = {d, e, f, g}. Find A  B, A  B, B – A, and Ac. Solution:

Operations on Sets There is a convenient notation for subsets of real numbers that are intervals. Observe that the notation for the interval (a, b) is identical to the notation for the ordered pair (a, b). However, context makes it unlikely that the two will be confused.

Example 6 – An Example with Intervals Let the universal set be the set R of all real numbers and let These sets are shown on the number lines below. Find A  B, A  B, B – A, and Ac.

Example 6 – Solution

Example 6 – Solution cont’d

Operations on Sets The definitions of unions and intersections for more than two sets are very similar to the definitions for two sets.

Operations on Sets An alternative notation for and an

Example 7 – Finding Unions and Intersections of More than Two Sets For each positive integer i, let Find A1  A2  A3.

Example 7 – Finding Unions and Intersections of More than Two Sets For each positive integer i, let Find A1  A2  A3.

Example 7 – Finding Unions and Intersections of More than Two Sets For each positive integer i, let Find 𝑖=1 ∞ 𝐴 𝑖 .

Example 7 – Finding Unions and Intersections of More than Two Sets For each positive integer i, let Find 𝑖=1 ∞ 𝐴 𝑖 .

The Empty Set We have stated that a set is defined by the elements that compose it. This being so, can there be a set that has no elements? It turns out that it is convenient to allow such a set. Because it is unique, we can give it a special name. We call it the empty set (or null set) and denote it by the symbol Ø. Thus {1, 3}  {2, 4} = Ø and {x  R| x2 = –1} = Ø.

Partitions of Sets In many applications of set theory, sets are divided up into nonoverlapping (or disjoint) pieces. Such a division is called a partition.

Example 9 – Disjoint Sets Let A = {1, 3, 5} and B = {2, 4, 6}. Are A and B disjoint? Solution: Yes. By inspection A and B have no elements in common, or, in other words, {1, 3, 5}  {2, 4, 6} = Ø.

Partitions of Sets

Example 10 – Mutually Disjoint Sets Let A1 = {3, 5}, A2 = {1, 4, 6}, and A3 = {2}. Are A1, A2, and A3 mutually disjoint? Yes. A1 and A2 have no elements in common, A1 and A3 have no elements in common, and A2 and A3 have no elements in common. Let B1 = {2, 4, 6}, B2 = {3, 7}, and B3 = {4, 5}. Are B1, B2, and B3 mutually disjoint? No. B1 and B3 both contain 4.

Partitions of Sets Suppose A, A1, A2, A3, and A4 are the sets of points represented by the regions shown below. Then A1, A2, A3, and A4 are subsets of A, and A = A1 U A2 U A3 U A4. A Partition of a Set

Partitions of Sets Suppose further that boundaries are assigned to the regions representing A1, A2, A3, and A4 in such a way that these sets are mutually disjoint. Then A is called a union of mutually disjoint subsets, and the collection of sets {A1, A2, A3, A4} is said to be a partition of A.

Example 11 – Partitions of Sets Let A = {1, 2, 3, 4, 5, 6}, A1 = {1, 2}, A2 = {3, 4}, and A3 = {5, 6}. Is {A1, A2, A3} a partition of A? Yes. By inspection, A = A1  A2  A3 and the sets A1, A2, and A3 are mutually disjoint.

Example 11 – Solution Let Z be the set of all integers and let Is {T0, T1, T2} a partition of Z? Yes. By the quotient-remainder theorem, every integer n can be represented in exactly one of the three forms for some integer k.

Power Sets 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.

Example 12 – Power Set of a Set Find the power set of the set {x, y}. That is, find ({x, y}). Solution: ({x, y}) is the set of all subsets of {x, y}. We know that Ø is a subset of every set, and so Ø  ({x, y}). Also any set is a subset of itself, so {x, y}  ({x, y}). The only other subsets of {x, y} are {x} and {y}, so

Tuples ordered, duplicates are allowed.

Example 13 – Ordered n-tuples No. By definition of equality of ordered 4-tuples, But 3  4, and so the ordered 4-tuples are not equal. Yes. By definition of equality of ordered triples,

Cartesian Products

Example 14 – Cartesian Products Let A1 = {x, y}, A2 = {1, 2, 3}, and A3 = {a, b}. Find A1 × A2. A1  A2 = {(x, 1), (x, 2), (x, 3), (y, 1), (y, 2), (y, 3)}

Example 14 – Cartesian Products Let A1 = {x, y}, A2 = {1, 2, 3}, and A3 = {a, b}. Find (A1 × A2) × A3. The Cartesian product of A1 and A2 is a set, so it may be used as one of the sets making up another Cartesian product. This is the case for (A1  A2)  A3.

Example 14 – Cartesian Products Let A1 = {x, y}, A2 = {1, 2, 3}, and A3 = {a, b}. Find A1 × A2 × A3. By definition of Cartesian product,