James Tam Basic Set Theory You will learn basic properties of sets and set operations.

Slides:



Advertisements
Similar presentations
Introduction to Set Theory
Advertisements

Lecture 2 Introduction To Sets CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Sets DISCRETE STRUCTURE ABDUL BASIT TAHIR, KAMRAN ALI, FAIZAN ILLAHI, NOMAN AHMAD, ARSALAN MUBASHIR.
Analytical Methods in CS (CIS 505)
CS 454 Theory of Computation Sonoma State University, Fall 2011 Instructor: B. (Ravi) Ravikumar Office: 116 I Darwin Hall Original slides by Vahid and.
Chapter 5 Section 1 Sets Basics Set –Definition: Collection of objects –Specified by listing the elements of the set inside a pair of braces. –Denoted.
1 Learning Objectives for Section 7.2 Sets After today’s lesson, you should be able to Identify and use set properties and set notation. Perform set operations.
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.
Discrete Maths Objective to re-introduce basic set ideas, set operations, set identities , Semester 2, Set Basics 1.
Intro to Set Theory. Sets and Their Elements A set A is a collection of elements. If x is an element of A, we write x  A; if not: x  A. Say: “x is a.
CSCI 1900 Discrete Structures
This section will discuss the symbolism and concepts of set theory
©1999 Indiana University Trustees Basic Set Theory Definitions A set is a collection of objects or elements An element is an object that make up a set.
Set theory Sets: Powerful tool in computer science to solve real world problems. A set is a collection of distinct objects called elements. Traditionally,
Venn Diagrams/Set Theory   Venn Diagram- A picture that illustrates the relationships between two or more sets { } are often used to denote members of.
MTH 231 Section 2.1 Sets and Operations on Sets. Overview The notion of a set (a collection of objects) is introduced in this chapter as the primary way.
Set, Combinatorics, Probability & Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Set,
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:
© Jalal Kawash 2010 Elementary Set Theory Peeking into Computer Science.
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
Copyright © 2014 Curt Hill Sets Introduction to Set Theory.
Sets Math 123 September 15.
CompSci 102 Discrete Math for Computer Science
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.
CSNB143 – Discrete Structure Topic 1 - Set. Topic 1 - Sets Learning Outcomes – Student should be able to identify sets and its important components. –
Sets & venn diagrams; probability
Chapter 2 With Question/Answer Animations. Section 2.1.
(CSC 102) Lecture 13 Discrete Structures. Previous Lectures Summary  Direct Proof  Indirect Proof  Proof by Contradiction  Proof by Contra positive.
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.
© Jalal Kawash 2010 Elementary Set Theory Peeking into Computer Science.
Welcome to Form 4 Mathematics Topic for the day SETS.
Module #3 - Sets 3/2/2016(c) , Michael P. Frank 2. Sets and Set Operations.
Set Operations Section 2.2.
Section 1.2 – 1.3 Outline Intersection  Disjoint Sets (A  B=  ) AND Union  OR Universe The set of items that are possible for membership Venn Diagrams.
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.
Lecture 5 Set Theory. Plan of lecture Why set theory? Sets and their properties Membership and definition of sets “Famous” sets Types of variables and.
Thinking Mathematically Venn Diagrams and Set Operations.
The Basic Concepts of Set Theory. Chapter 1 Set Operations and Cartesian Products.
Unions and Intersections of Sets Chapter 3 Section 8.
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.
1.1 – SETS AND SYMBOLS. Goals SWBAT understand basic set notation and set symbols SWBAT solve simple sentences with a given domain SWBAT graph sets of.
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
Set, Combinatorics, Probability & Number Theory
Sets Section 2.1.
1.1 Sets and Subsets.
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.
CSE 2353 – September 22nd 2003 Sets.
CS100: Discrete structures
Set and Set Operations Grab a sheet from front.
        { } Sets and Venn Diagrams Prime Numbers Even Numbers
Operations with Sets A = { 1, 2, 3 ,4, 5} B = { 2, 4, 6, 8, 10}
2.1 Sets Dr. Halimah Alshehri.
CHAPTER 1 - Sets and Intervals
CHAPTER 1 - Sets and Intervals
Chapter Sets &Venn Diagrams.
Discrete Mathematics CS 2610
Discrete Mathematics Lecture 6: Set and Function
MCS680: Foundations Of Computer Science
Copyright © Cengage Learning. All rights reserved.
ICOM 5016 – Introduction to Database Systems
Lecture Sets 2.2 Set Operations.
ICOM 5016 – Introduction to Database Systems
Introduction A set is a collection of objects.

Presentation transcript:

James Tam Basic Set Theory You will learn basic properties of sets and set operations.

James Tam What Is A Set? A collection of elements/members. Example: students in this lecture.

James Tam Representing Sets Small sets can be represented by showing all the members. -Example: family = {mother, father, older brother, younger brother, little sister} Larger sets may be difficult to represent (infinite) so a notation must be used to specify the conditions for membership. -Examples: A = {x | x is a citizen in Canada} B = {x | x is an even number} Representing set membership: ∈ -Example: James Tam ∈ {Canadian citizen}

James Tam Sets That Contain No Elements An empty set contains no elements. Notation: A = {} A = 

James Tam Important Characteristics Of Sets Order Duplication

James Tam Order Generally order isn’t important for sets -Example: {Mother, Father, Daughter} Is the same as {Father, Mother, Daughter} A tuple is special type of set where order is important and is denoted with round brackets instead of curly braces. -(Alice, Bob, Charley) is not the same as (Bob, Charley, Alice)

James Tam Duplicates Duplicate elements may or may not be allowed. Generally for most sets duplicates are not allowed. {Father, Father, Mother, Daughter} -Should be {Father, Mother, Daughter} Multi-sets: the case that does allow for duplicates -{Larry, Darryl, Darryl}

James Tam Subset All the elements of one set (subset) that are also elements of another set (superset) Example: -Women who live in Canada (subset), People who live in Canada (superset). Notation: - Subset  Super set {1}  {1,2,3} A set is also a subset of itself {1,2,3}  {1,2,3} The empty set is also a subset of any set

James Tam Venn Diagrams: Subsets CPSC 203 students Business majors Science Social science RO

James Tam Men Venn Diagrams: Subsets Members of dating agency Woman = {“Alice”}

James Tam Set Operations 1.Intersection 2.Union 3.Subtraction 4.Multiplication (Book: Cartesian product)

James Tam Set Intersection Elements that are members of two sets. Elements of one set AND elements of another set. -Example: A = {1, 2, 3, 4} B = {3, 4, 5} A  B = C, C = {3, 4} -Example: A = {0, 2, 4, 6, 8} B = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} A  B = {0, 2, 4, 6, 8} = B -Example: A = {2, 4, 6, 8..} (positive even integers) B = {1, 3, 5, 7…} (positive odd integers) A  B = {}(Disjoined sets)

James Tam Venn Diagrams: Set Intersection A People who were born in Calgary B Students of the University of Calgary A  B = C University of Calgary students who were born in Calgary D People born in Vulcan

James Tam Set Union The elements of two sets combined. Includes elements that are in one set OR the other set. -Example A = {1, 2, 4} B = {1, 2, 3} A  B = {1, 2, 3, 4} -Example A = {2, 4, 6, 8..} (positive even integers) B = {1, 3, 5, 7…} {positive odd integers) A  B = {1, 2, 3, 4, 5…} (positive integers)

James Tam Venn Diagram: Set Union A Population of Alberta C Population of Manitoba B Population of Saskatchewan

James Tam Venn Diagram: Set Union A  B  C = D (Population of the prairie provinces)

James Tam Set Subtraction Take out the elements of one set that are in another set -Example A= {12, 1, 2, 23} B = {0, 1, 2, 3, 4, 5} A – B = {12, 23} Set subtraction of a superset from a subset yields the empty set. -Example A = {1, 3, 5} B = {all positive integers} A – B = {}

James Tam Venn Diagram: Set Subtraction A = Population of the prairie provinces B = Population of Alberta

James Tam Venn Diagram: Set Subtraction A - B = C Prairies sans AB

James Tam Set Multiplication “Takes all combinations from the sets” (If you prefer a Mathematical definition – from the lecture notes of Jalal Kawash): A 1 x A 2 x … x A n = {(a 1,a 2,…, a n ) | a 1 is in A 1 and a 2 is in A 2 … a n is in A n } The operation may be used in decision making to ensure that all combinations have been covered.

James Tam Set Multiplication: Applications Developing a game where all combinations must be considered in order to determine the outcome. Each combination is a tuple (not a set). A = {player one, player two} B = {rock, paper, scissors} A x B = {(player one, rock), (player one, paper), (player one, scissors), (player two, rock), (player two, paper), (player two, scissors)} (Examples from actual software will be much more complex and taking a systematic approach helps ensure that nothing is missed). A = {player one, player two, player three...} B = {completed quest one, completed quest two...} C = {healthy, injured, poisoned, diseased, dead, gone forever}

James Tam Set Relations Can be used to show how elements of a set or sets connect (or don’t connect). Relationships between the elements of different sets produces another set (of tuples) that show the relations. -Example (from page 31 of the text). O set of objects = {book, lion, plate} P set of properties = {colored, made-from-paper, has-bones, contains-glass} R set of relations from set O to P = {(book, colored), (book, made-from- paper), (lion, has-bones), (plate, colored), (plate, paper), (plate, contains- glass)}

James Tam Venn Diagram: Set Relations colored book made-from-paper plate paper contains-glass lion has-bones

James Tam Set Relations: Types Relations can be directed (one way) as the previous example. Relations can also be symmetric (two way – graphs, next section).

James Tam You Should Now Know What is a set How to textually specify a set and how to represent sets using a Venn diagram What is an empty set What is the difference between a set, a tuple and a multi-set What is a subset and what is a superset Common set operations: intersection, union, subtraction, multiplication (Cartesian product) What is a set relation