Sets.

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

More Set Definitions and Proofs 1.6, 1.7. Ordered n-tuple The ordered n-tuple (a1,a2,…an) is the ordered collection that has a1 as its first element,
Lecture 2 Introduction To Sets CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
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
Sets DISCRETE STRUCTURE ABDUL BASIT TAHIR, KAMRAN ALI, FAIZAN ILLAHI, NOMAN AHMAD, ARSALAN MUBASHIR.
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)
Introduction to Sets. A set is just a collection of stuff But the stuff must be written inside curly braces Each item in the curly braces is separated.
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.
Ch 9 Inequalities and Absolute Value
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.
Sets.
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.
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. 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,
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.
Module Code MA1032N: Logic Lecture for Week Autumn.
Sets Goal: Introduce the basic terminology of set theory.
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 11 Basic Structure : Sets, Functions, Sequences, and Sums Sets Operations.
Sets and Logic Alex Karassev. Elements of a set  a ∊ A means that element a is in the set A  Example: A = the set of all odd integers bigger than 2.
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.
1 Chapter Two Basic Concepts of Set Theory –Symbols and Terminology –Venn Diagrams and Subsets.
Lecture 5: Set Theory 1 Dr Andrew Purkiss-Trew Cancer Research UK Mathematics for Computing.
Unit :1 Set Theory Prof. A.J. SHAKADWIPI. Sets and Subsets A well-defined collection of objects. finite sets, infinite sets, subset A={1,3,5,7,9} B={x|x.
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.
Thinking Mathematically Venn Diagrams and Subsets.
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.
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.
“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.
CPCS 222 Discrete Structures I
Sets.
Sets Page 746.
1.1 Subsets of Real Numbers
Set Definition: A set is unordered collection of objects.
The Basic Concepts of Set Theory
Sets Section 2.1.
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
Intro to Set Theory The Math of Santa’s Bag.
CS100: Discrete structures
Set Theory A B C.
Set and Set Operations Grab a sheet from front.
        { } Sets and Venn Diagrams Prime Numbers Even Numbers
Algebra 1 Section 1.1.
The Basic Concepts of Set Theory
2.1 Sets Dr. Halimah Alshehri.
Chapter 2 The Basic Concepts of Set Theory
دوره‏ی ضمن خدمت کشوری ریاضی پایه‏ی نهم مرداد 1394.
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.
Chapter 2 The Basic Concepts of Set Theory
Which sets are equal? Which sets are equivalent?
Lecture Sets 2.2 Set Operations.
Sets & Set Operations.
Introduction A set is a collection of objects.
Sets, Unions, Intersections, and Complements
3-5 Working with Sets.
Presentation transcript:

Sets

Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational numbers

Set builder notation S contains all elements from U (universal set) That make predicate P true Brace notation with ellipses (wee dots)

Set Membership x is in the set S (x is a member of S) y is not in the set S (not a member)

Am I making this up?

Set operators

Set empty The empty set

The universal set U

Venn Diagram U B A U is the universal set A is a subset of B

Venn Diagram U B A U is the universal set A united with B

Venn Diagram U B A U is the universal set A intersection B

Cardinality of a set The number of elements in a set (the size of the set)

Power Set The set of all possible sets

Power Set The set of all possible sets

Power Set The set of all possible sets We could represent a set with a bit string 0th element

Is this true for a set S?

Cartesian Product A set of ordered tuples

(improper) Subset is empty {} a subset of anything? Is anything a subset of {}? We have an implication, what is its truth table? Note: improper subset!!

Consequently A is strictly smaller than B (proper) Subset Consequently A is strictly smaller than B |A| < |B|

Equal sets? Two show that 2 sets A and B are equal we need to show that And we know that

Try This Using set builder notation describe the following sets odd integers in the range 1 to 9 the integers 1,4,9,16,25 even numbers in the range -8 to 8

Answers Using set builder notation describe the following sets odd integers in the range 1 to 9 the integers 1,4,9,16,25 even numbers in the range -8 to 8

How might a computer represent a set? Remember those bit operations?

Computer Representation (possible} How do we compute the following? membership of an element in a set union of 2 sets intersection of 2 sets compliment of a set set difference (tricky?)

Power set Try this Compute the power set of {1,2} {1,2,3} {{1},{2}} {}

Power set Compute the power set of {1,2} {1,2,3} {{1},{2}} {} Think again … how might we represent sets?

Cartesian Product A set of ordered tuples note AxB is not equal to BxA Just reminding you (and me)

Try This Let A={1,2,3} and B={x,y}, find AxB BxA if |A|=n and |B|=m what is |AxB|

My answer Let A={1,2,3} and B={x,y}, find AxB BxA if |A|=n and |B|=m what is |AxB|

Power Set PS(A) The thinking behind the code 1 11 01 111 011 101 001 11 01 111 011 101 001 10 110 010 100 000 00 Go left: take Go right: don’t take

Power Set PS(A) The thinking behind the code ▪▪▪ ▫▫▫ don’t select ▪▪▫ ▫▫▪ ▪▪▫ ▫▫▫ ▪▫▫ ▫▫▪ ▪▫▫ ▫▪▫ ▪▫▫ ▫▫▫ ▫▪▪ ▪▫▫ ▫▫▫ ▪▫▪ ▫▫▫ ▫▫▪