Sets.

Slides:



Advertisements
Similar presentations
Lecture 2 Introduction To Sets CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Advertisements

Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
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.
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.
Sets DISCRETE STRUCTURE ABDUL BASIT TAHIR, KAMRAN ALI, FAIZAN ILLAHI, NOMAN AHMAD, ARSALAN MUBASHIR.
EE1J2 – Discrete Maths Lecture 7
Sets Section 2.1. Introduction Sets are one of the basic building blocks for the types of objects considered in discrete mathematics. Important for counting.
Chapter 2 The Basic Concepts of Set Theory
Sets 1.
CSE115/ENGR160 Discrete Mathematics 02/10/11 Ming-Hsuan Yang UC Merced 1.
Sets 1.
Sets. Copyright © Peter Cappello Definition Visualize a dictionary as a directed graph. Nodes represent words If word w is defined in terms of word.
Chapter 2 The Basic Concepts of Set Theory © 2008 Pearson Addison-Wesley. All rights reserved.
Discrete Math 6A Max Welling. Recap 1. Proposition: statement that is true or false. 2. Logical operators: NOT, AND, OR, XOR, ,  3. Compound proposition:
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 John Rosson Thursday January 25, 2007.
CSCI 1900 Discrete Structures
MATHEMATICS XI SETS.
This section will discuss the symbolism and concepts of set theory
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
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.
Mathematical Proofs. Chapter 1 Sets 1.1 Describing a Set 1.2 Subsets 1.3 Set Operations 1.4 Indexed Collections of Sets 1.5 Partitions of Sets.
Chapter 2: Basic Structures: Sets, Functions, Sequences, and Sums (1)
1 Section 1.6 Sets. 2 Set Fundamental discrete structure on which all other discrete structures are built Can be loosely defined as a collection of elements.
CompSci 102 Discrete Math for Computer Science
Chapter 2 Section 1 - Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
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 SETS DEFINITION OF SET METHODS FOR SPECIFYING SET SUBSETS VENN DIAGRAM SET IDENTITIES SET OPERATIONS.
Definition of a Set DM is study of discrete structures. Fundamental discrete structure upon which most of other discrete structures are built is the sets.
Sets Goal: Introduce the basic terminology of set theory.
Chapter 2 With Question/Answer Animations. Chapter Summary Sets The Language of Sets Set Operations Set Identities Functions Types of Functions Operations.
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.
Basic Structures: Sets, Functions, Sequences, and Sums.
Discrete Mathematics SETS. What is a set? ^A set is a unordered collection of “objects”  People in a class: {A yşe, B arış, C anan }  Cities in Turkey.
1 Chapter Two Basic Concepts of Set Theory –Symbols and Terminology –Venn Diagrams and Subsets.
(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.
Chapter 2 With Question/Answer Animations. Section 2.1.
Module #3 - Sets 3/2/2016(c) , Michael P. Frank 2. Sets and Set Operations.
Chapter 7 Sets and Probability Section 7.1 Sets What is a Set? A set is a well-defined collection of objects in which it is possible to determine whether.
Discrete Mathematics CS 2610 August 31, Agenda Set Theory Set Builder Notation Universal Set Power Set and Cardinality Set Operations Set Identities.
Section 2.1. Sets A set is an unordered collection of objects. the students in this class the chairs in this room The objects in a set are called the.
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications Kenneth H. Rosen (5 th Edition) Chapter 1 The Foundations: Logic, Sets,
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.
“It is impossible to define every concept.” For example a “set” can not be defined. But Here are a list of things we shall simply assume about sets. A.
Chapter 2 With Question/Answer Animations. Chapter Summary Sets The Language of Sets Set Operations Set Identities Functions Types of Functions Operations.
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 CS 202, Spring 2007 Epp, chapter 5.
CSE15 Discrete Mathematics 02/13/17
Sets.
Set Definition: A set is unordered collection of objects.
CHAPTER 3 SETS, BOOLEAN ALGEBRA & LOGIC CIRCUITS
Set, Combinatorics, Probability & Number Theory
The Basic Concepts of Set Theory
Sets Section 2.1.
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.
CS100: Discrete structures
The Basic Concepts of Set Theory
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 CS 2610
Lecture Sets 2.2 Set Operations.
Presentation transcript:

Sets

Sets A set is an unordered collection of objects. the students in this class the positive integers The objects in a set are called the elements, or members of the set. A set is said to contain its elements. The notation a ∈ A denotes that a is an element of the set A. If a is not a member of A, write a ∉ A

Describing a Set: Roster Method S = {a,b,c,d} Order not important S = {a,b,c,d} = {b,c,a,d} Each distinct object is either a member or not; listing more than once does not change the set. S = {a,b,c,d} = {a,b,c,b,c,d} Ellipses (…) may be used to describe a set without listing all of the members when the pattern is clear. S = {a,b,c,d,…,z }

Roster Method Examples: Set of all vowels in the English alphabet: V = {a,e,i,o,u} Set of all odd positive integers less than 10: O = {1,3,5,7,9} Set of all positive integers less than 100: S = {1,2,3,…,99} Set of all integers less than 0: S = {…,-3,-2,-1} = {-1,-2,-3,…}

Set-Builder Notation Specify the properties that all members must satisfy Examples: S = {x | x is a positive integer less than 100} O = {x | x is an odd positive integer less than 10} A predicate may be used: S = {x | P(x)} Example: S = {x | Prime(x)}

Some Important Sets Some sets, e.g. all real numbers, cannot be listed (even using ellipses) Use special notation: R Other infinite sets can be expressed using other sets Example: Positive rational numbers: Q+ = {x ∈ R | x = p/q, for some positive integers p, q} We predefine some important sets to reduce the notation Z = integers = {…,-3,-2,-1,0,1,2,3,…} Z⁺ = positive integers = {1,2,3,…} = {x ∈ Z | x > 0} N = natural numbers = {0,1,2,3,…} = {x ∈ Z | x ≥ 0} R = real numbers R+ = positive real numbers = {x ∈ R | x > 0} Q = rational numbers = {p/q | p ∈ Z, q ∈ Z, and q≠0} C = complex numbers

Interval Notation Ranges of real numbers can be expressed as intervals: [a,b] = {x | a ≤ x ≤ b} [a,b) = {x | a ≤ x < b} (a,b] = {x | a < x ≤ b} (a,b) = {x | a < x < b} closed interval [a,b] open interval (a,b)

Venn Diagrams U V o u Used to represents sets graphically John Venn (1834-1923) Cambridge, UK Venn Diagrams Used to represents sets graphically The universal set U is the set containing all elements of the domain Sets are shown as circles or other closed shapes Example: U = set of all letters V = set of vowels a e i o u U V

Other important concepts The empty set is the set with no elements. Notation: {} or ∅ Important to note: ∅ ≠ { ∅ } Sets can be elements of sets: {{1,2,3}, a, {b,c}} {N,Z,Q,R}

Set Equality Definition: Two sets are equal iff they have the same elements. Formally: if A and B are sets, then A = B iff Examples: {1, 3, 5} = {3, 5, 1} {1, 5, 5, 5, 3, 3, 1} = {1, 3, 5}

Subsets Definition: The set A is a subset of B, iff every element of A is also an element of B. Formally: Notation: A ⊆ B Examples: N ⊆ Z ⊆ R Z ⊈ R⁺ Theorem: For every set S: ∅ ⊆ S S ⊆ S Venn Diagram U B A

Subsets Showing that A is a subset of B: To show that A ⊆ B, show that if x belongs to A, then x also belongs to B. Showing that A is not a subset of B: To show that A ⊈ B, find an element x ∈ A with x ∉ B Such an x is a counterexample to the claim that x ∈ A implies x ∈ B

Another look at Equality of Sets Recall that A = B, iff Using logical equivalences, A = B iff This is equivalent to A ⊆ B and B ⊆ A Thus to show A = B we can show that each set is a subset of the other

Proper Subsets Definition: If A ⊆ B, but A≠B, then A is a proper subset of B Notation: A ⊂ B Formally: A ⊂ B iff U B A

Set Cardinality Definition: If there are exactly n distinct elements in S where n is a nonnegative integer, then S is finite. Otherwise it is infinite. Definition: The cardinality of a finite set A, denoted by |A|, is the number of (distinct) elements of A. Examples: Let S be the letters of the English alphabet. Then |S|=26 |{1,2,3}| = 3 |ø| = 0 |{ø}| = 1 The set of integers is infinite

Power Sets Definition: The set of all subsets of a set A, denoted by P(A), is called the power set of A. Examples: A = {a,b}, P(A) = {ø, {a},{b},{a,b}} A = {3}, P(A) = {ø, {3}} A = ø, P(A) = {ø} A = {ø}, P(A) = {ø, {ø}}

Tuples The ordered n-tuple (a1,a2,…..,an) is the ordered collection that has a1 as its first element and a2 as its second element and so on until an as its last element. Two n-tuples are equal if and only if their corresponding elements are equal. 2-tuples are called ordered pairs. The ordered pairs (a,b) and (c,d) are equal if and only if a = c and b = d.

René Descartes (1596-1650) Cartesian Product Definition: The Cartesian Product of two sets A and B, denoted by A × B is the set of ordered pairs (a,b) where a ∈ A and b ∈ B . Example: A = {a, b} B = {1, 2, 3} A × B = {(a, 1), (a, 2), (a, 3), (b, 1), (b, 2), (b, 3)} Definition: A subset R of the Cartesian product A × B is called a relation from the set A to the set B. (Relations will be covered in depth in a later chapter. )

Cartesian Product Definition: The Cartesian product of the sets A1,A2,……,An, denoted by A1 × A2 × …… × An , is the set of ordered n-tuples (a1,a2,……,an) where ai belongs to Ai for i = 1, … n. Example: Construct the Cartesian product of the sets A = {0,1}, B = {1,2} and C = {0,1,2}: A × B × C = {(0,1,0), (0,1,1), (0,1,2),(0,2,0), (0,2,1), (0,2,2),(1,1,0), (1,1,1), (1,1,2), (1,2,0), (1,2,1), (1,1,2)}