Sets. A set is a well-defined collection of values of the same kind (objects) Objects can be numbers, people, letters, days, may be sets themselves Examples.

Slides:



Advertisements
Similar presentations
Sets and its element A set is a collection of well-defined and well-distinguished objects. The objects that make up a set are called the members or elements.
Advertisements

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.
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.
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.
Set Theory.
Chapter 2 The Basic Concepts of Set Theory © 2008 Pearson Addison-Wesley. All rights reserved.
Sets.
Discrete Mathematics Unit - I. Set Theory Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is very subjective)
22 March 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
Set theory Sets: Powerful tool in computer science to solve real world problems. A set is a collection of distinct objects called elements. Traditionally,
CS355 - Theory of Computation Lecture 2: Mathematical Preliminaries.
Objectives: By the end of class, I will be able to:  Identify sets  Understand subsets, intersections, unions, empty sets, finite and infinite sets,
Chapter 3 – Set Theory  .
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 --- A set is a collection of objects. Sets are denoted by A, B, C, … --- The objects in the set are called the elements of the set. The elements are.
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)
Copyright © 2014 Curt Hill Sets Introduction to Set Theory.
Language: Set of Strings
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.
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.
ELEMENTARY SET THEORY.
Chapter SETS DEFINITION OF SET METHODS FOR SPECIFYING SET SUBSETS VENN DIAGRAM SET IDENTITIES SET OPERATIONS.
Module Code MA1032N: Logic Lecture for Week Autumn.
PSAT MATHEMATICS 9-A Basic Arithmetic Concepts. Set A collection of “things” that have been grouped together in some way. “things” – elements or members.
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.
(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.
Lecture 5: Set Theory 1 Dr Andrew Purkiss-Trew Cancer Research UK Mathematics for Computing.
Based on slides by Patrice Belleville and Steve Wolfman CPSC 121: Models of Computation Unit 11: Sets.
Lecture 3 Fuzzy sets. 1.1 Sets Elements of sets An universal set X is defined in the universe of discourse and it includes all possible elements.
Based on slides by Patrice Belleville and Steve Wolfman CPSC 121: Models of Computation Unit 11: Sets.
Module #3 - Sets 3/2/2016(c) , Michael P. Frank 2. Sets and Set Operations.
Fr: Discrete Mathematics by Washburn, Marlowe, and Ryan.
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.
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)
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.
CSE15 Discrete Mathematics 02/13/17
The set of whole numbers less than 7 is {1, 2, 3, 4, 5, 6}
Sets Page 746.
CHAPTER 2 Set Theory A B C.
Set Definition: A set is unordered collection of objects.
CSNB 143 Discrete Mathematical Structures
Set, Combinatorics, Probability & Number Theory
The Basic Concepts of Set Theory
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.
CS201: Data Structures and Discrete Mathematics I
CS100: Discrete structures
        { } Sets and Venn Diagrams Prime Numbers Even Numbers
Algebra 1 Section 1.1.
The Basic Concepts of Set Theory
Review of Sets and Set Operations
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
Sets A set is simply any collection of objects
ICOM 5016 – Introduction to Database Systems
Lecture Sets 2.2 Set Operations.
ICOM 5016 – Introduction to Database Systems
Set – collection of objects
Presentation transcript:

Sets

A set is a well-defined collection of values of the same kind (objects) Objects can be numbers, people, letters, days, may be sets themselves Examples

Sets Small sets may be introduced by listing their elements Other sets may be constructed using set comprehension, the power set operator, and the cartesian product Use extension for listing elements Examples

Membership of a set We write x  s to indicate that x is an element of set s We write  (x  s ) as x  s Examples 3  Primes 6  Primes

Equality of sets & Null set Two sets of values of the same kind are equal if and only if they have the same members Examples s == {2,2,5,5,3} t == {2,3,5} s = t A null set is set with no members Denoted as  or {}

Subsets One set is said to be a subset of another if all the members of the one are also the members of the other Example A is a set of all primes and B == {2,3,5} then B is a subset of A denoted by B  A

Union of sets Two sets of the same kind, A and B, whose members are the members of A and B together Denoted by A  B Example: A == {1,2,3,4,5} B == {2,4,5,6,7} A  B == {1,2,3,4,5,6,7 }

Intersection Two sets of the same kind, A and B, whose members are the members that A and B have in common Denoted by A  B Example A == {1,2,3,4,5} B == {2,4,6,7} A  B == {2,4} Two sets are disjoint if they have no member in common C == {6,7,8} A  C = 

Set Difference Two sets A, B of the same kind, whose members are the members of A but not of B Denoted by A\B Example A == {1,2,3,4,5} B == {2,4} A\B == {1,3,5}

Set Comprehension Defining a set by stating a property that distinguishes its member from other values of the same kind Suppose D denotes some declarations, P denotes a predicate constraining the value, and E denotes an expression denoting a term, then {D|PE} is called set comprehension term Denotes a set of values consisting of all values of the term E for everything declared in D satisfying the constraint P

Set Comprehension Example {x :  | x  5 x 2 } denotes the same set as {0,1,4,9,16,25} We can omit heavy dot {x :  | x  5} We can omit constraint and constraint bar {x :  x 2 }

Defining sets using predicates BigCountries == {c : country | c has more than 40 million inhabitants} MultipleOfSixes == {n :  |  m :   n = m  6} BiggestCities == {macropolis : city |  co : country  macropolis is in co   ci : city  ci is in co   ci is macropolis  macropolis is bigger than ci}

Power Sets The power set of a set A is the set of all its subsets. Denoted by p A --- power set of A Example A == {x,y} p A == { , {x}, {y}, {x,y}} A  B has the same meaning as A  p B Example X == {1}, p X == { , {1}}, pp X == { , {  }, {{1}}, { , {1}}} Exercise : list the power set for {1,2,3}

Cartesian Product Countries == {UK, USA, Malaysia, Iran …} Capitals == {London, Washington, KL, Tehran, …} CountriesAndCapitals == {(UK,London), (USA,Washington), (Malaysia,KL), (Iran,Tehran),…} CountriesAndCapitals == {co : country; ca : city | ca is the capital of co}

Tuple membership If a 1 …a n are sets and then Example

Tuple equality if x1 = y1 and x2 = y2 … xn = yn then (x1,x2,..,xn) = (y1,y2,…,yn)

Component selection

Types

Sets of numbers Integers, denoted by , is the set of positive and negative whole numbers including zero. Its type is p  Natural numbers, denoted by , is the set of whole numbers from zero onwards. The natural numbers are a subset of the integers. Its type is p  Restricted set of numbers, whose numbers lying in a certain range is called a subrange, eg denotes {1,2,3,4} Finite set : 1..4 Infinite set : , ‘the set of natural numbers that are prime’ If X denotes some finite set, then the number of elements in the set is called its cardinality or size, and denoted by #X

Other forms of type Types of ordered pair (cartesian product) involving integer  In general if a specification has the basic types X and Y, we can have a list of other types: p X, p Y, pp X, pp Y, …. X  X, X  Y, Y  X, Y  Y ( p X)  ( p X), p (X  X), ( p X)  Y ….