Set Theory Concepts Set – A collection of “elements” (objects, members) denoted by upper case letters A, B, etc. elements are lower case brackets are used.

Slides:



Advertisements
Similar presentations
Equivalence Relations
Advertisements

Discrete Mathematics Lecture 5 Alexander Bukharovich New York University.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Instructor: Hayk Melikya
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
The Engineering Design of Systems: Models and Methods
Denoting the beginning
Discrete Structures Chapter 3 Set Theory Nurul Amelina Nasharuddin Multimedia Department.
Sets, Relation and Functions A set is a collection of objects (elements) or a container of objects. Defining sets –Empty set (Ø): no elements –Universal.
Computing Fundamentals 1 Lecture 6 A Theory of Sets Lecturer: Patrick Browne Room K308 Based on Chapter 11. A Logical approach.
Algebra Algebra – defined by the tuple:  A, o 1, …, o k ; R 1, …, R m ; c 1, …, c k  Where: A is a non-empty set o i is the function, o i : A p i  A.
Partially Ordered Sets (POSets)
Relations Chapter 9.
Sets, POSets, and Lattice © Marcelo d’Amorim 2010.
Sets.
Set theory Sets: Powerful tool in computer science to solve real world problems. A set is a collection of distinct objects called elements. Traditionally,
Logics for Data and Knowledge Representation Introduction to Algebra Chiara Ghidini, Luciano Serafini, Fausto Giunchiglia and Vincenzo Maltese.
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Set, Combinatorics, Probability & Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Set,
2.6 Equivalence Relation §1.Equivalence relation §Definition 2.18: A relation R on a set A is called an equivalence relation if it is reflexive, symmetric,
R. Johnsonbaugh, Discrete Mathematics 5 th edition, 2001 Chapter 2 The Language of Mathematics.
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:
Chapter 9. Section 9.1 Binary Relations Definition: A binary relation R from a set A to a set B is a subset R ⊆ A × B. Example: Let A = { 0, 1,2 } and.
8.3 Representing Relations Directed Graphs –Vertex –Arc (directed edge) –Initial vertex –Terminal vertex.
Sets Define sets in 2 ways  Enumeration  Set comprehension (predicate on membership), e.g., {n | n  N   k  k  N  n = 10  k  0  n  50} the set.
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.
Language: Set of Strings
CompSci 102 Discrete Math for Computer Science
Sets, Relations, and Lattices
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Relations, Functions.
ELEMENTARY SET THEORY.
Mathematical Preliminaries
Sets and Subsets Set A set is a collection of well-defined objects (elements/members). The elements of the set are said to belong to (or be contained in)
Relations. Important Definitions We covered all of these definitions on the board on Monday, November 7 th. Definition 1 Definition 2 Definition 3 Definition.
Chapter 2 With Question/Answer Animations. Section 2.1.
Problem Statement How do we represent relationship between two related elements ?
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Unit II Discrete Structures Relations and Functions SE (Comp.Engg.)
Discrete Mathematics CS 2610 January 27, part 2.
Discrete Mathematics Set.
Chapter 8: Relations. 8.1 Relations and Their Properties Binary relations: Let A and B be any two sets. A binary relation R from A to B, written R : A.
RelationsCSCE 235, Spring Introduction A relation between elements of two sets is a subset of their Cartesian products (set of all ordered pairs.
1 Equivalence relations Binary relations: –Let S1 and S2 be two sets, and R be a (binary relation) from S1 to S2 –Not every x in S1 and y in S2 have such.
Module #3 - Sets 3/2/2016(c) , Michael P. Frank 2. Sets and Set Operations.
Advanced Digital Designs Jung H. Kim. Chapter 1. Sets, Relations, and Lattices.
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.
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
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.
Week 8 - Wednesday.  What did we talk about last time?  Relations  Properties of relations  Reflexive  Symmetric  Transitive.
“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.
Set. Outline Universal Set Venn Diagram Operations on Sets.
Relations Chapter 9 Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill.
Citra Noviyasari, S.Si, MT
Chapter 5 Relations and Operations
Unit-III Algebraic Structures
Equivalence Relations
Set, Combinatorics, Probability & Number Theory
Sets Section 2.1.
CS201: Data Structures and Discrete Mathematics I
IS 2150 / TEL 2810 Information Security & Privacy
Session – 2 SETS & Operations of SETS
Sungho Kang Yonsei University
IS 2150 / TEL 2810 Introduction to Security
MCS680: Foundations Of Computer Science
Equivalence relations
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
IS 2150 / TEL 2810 Introduction to Security
Foundations of Discrete Mathematics
IS 2150 / TEL 2810 Information Security & Privacy
Presentation transcript:

Set Theory Concepts Set – A collection of “elements” (objects, members) denoted by upper case letters A, B, etc. elements are lower case brackets are used to encompass members of a set A = {a, b, c}a  Ad  A sets may be finite or infinite  is the empty set,  = {}  is a finite set U is the universal set, it contains all possible elements U may be finite or infinite

Describing Sets Two Ways: 1)Enumeration – list all elements 2)Generation – general expression and condition Example: The set of all integers between 5 and 13 {5,6,7,8,9,10,11,12,13} {x | 5  x  13 and is integral} {y | 4 < y < 14 and is integral}

Subsets When all elements in A are also elements of B : A is a “subset” of B A  B B “contains” or “covers” A  Otherwise, A  B  Any set is a subset of U   is a subset of any set If A  B and B  A, then A = B If A  B and A  B then A is a “proper subset” of B A  B The set of subsets of A is the “power set” of A, P(A)   P(A) and A  P(A) NOTE: A  A and A  A and   A and A  U

Some Common Operations The “Union” of A and B is A  B A  B contains elements that are in set A or in set B or in both sets A and B A  B ={x | x  A or x  B} The “Intersection” of A and B is A  B A  B contains the common elements that are in both sets A and B A  B ={x | x  A and x  B} The “Complement” of set A is A C or A A C contains all elements in U that are not in A A = A C = U - A A C ={x | x  A and x  U}

Properties of Sets Idempotence Laws: A  A =A, A  A = A Commutative Laws: A  B = B  A, A  B = B  A Associative Laws: A  (B  C) = (A  B)  C, A  (B  C) = (A  B)  C Absorption Laws: A  (A  B) = A, A  ( A  B)= A Distributive Laws: A  (B  C) = (A  B)  (A  C), A  (B  C) = (A  B)  (A  C) Involution Law: A = A Complement Laws: U = ,  = U A  A = U, A  A =  Identity Laws: A   = A, A  U = A A  U = U, A   =  DeMorgan’s Laws: (A  B) = A  B, (A  B) = A  B

Venn’s Diagram A B C U

Difference Operation A B U A = {1,3,5,6,7,8}B = {1,2,3,4,5} A – B = {6,7,8} B – A = {2,4} A  B = {1,3,5}

Cartesian Product 2 elements in a fixed order is a “pair” or “ordered pair” (a,b) n elements in a fixed order is an “ n -tuple” (a 1, a 2, …., a n ) (a 1, a 2, …., a n ) = (b 1, b 2, …., b n ) iff a i =b i  i where 1  i  n The “cartesian product” or “direct product” of 2 sets A and B the set of all ordered pairs of A and B A  B EXAMPLE: A={0, 1} B ={0, 1, 2} A  B = {(0,0),(0,1),(1,0),(0,2),(1,1),(1,2)} “Cardinality” or “size” of set A is | A |=n A | A  B | = n A  n B = 2  3 = 6

Propositional Functions A Propositional Function, F(x,y), is Defined on A  B Ordered Pair (a,b) Substituted for (x,y)(a,b)  A  B F(x,y) Can be a Proposition (F(x,y ) is either true or false, but not both) EXAMPLE: x is less than y x weighs y pounds x divides y x is the spouse of y A Relation, R, is Defined Over: 1)a set A 2)a set B 3)a proposition F(x,y) R = (A, B, F(x,y)) if F(a,b) is true then aRb if F(a,b) is false then aRb

Set Relations If R  A  B, then R is a “binary relation” EXAMPLE: R  A  B a i  A b i  B if (a i,b i )  R then a i R b i and “relation R holds” if (a i,b i )  R then a i R b i “relation R does not hold” Inverse Relation, R -1, is all pairs in R with reverse order R -1 = {(b j,a i )|(a i,b j )  R } R =(A, A, F(x,y)) is an “equivalence relation” on set A if: 1)aRa (reflectivity) 2)If aRb then bRa (symmetry) 3)If aRb and bRc then aRc (transitivity) a, b, c  A

Equivalence Relation Consider R = (Z, Z, F(x,y)) where Z is the set of all positive integers and F(x,y) is the Proposition that x = y R  Z  Z = {(1,1), (2,2), (3,3) ….} For any z i  Z it is true that z i R z i Reflectivity is Satisfied For any z i, z j  Z, if F(z i,z j ) is true then F(z j,z i ) is true Symmetry is Satisfied For any z i, z j,z k  Z, if F(z i,z j ) and F(z j,z k ) then F(z j,z k ) Transitivity is Satisfied R is an Equivalence Relation over Z

Set Partitions A Partition of A denoted by [a] satisfies: [a]  A Consider a Set of Subsets of A {A 1, A 2, …, A n } The A i are Partitions of A if: 1)A = A 1  A 2  …  A n 2)Either A i = A j or A i  A j =  (disjoint subsets) EXAMPLE Consider A={1,2,3,…,9,10}, B 1 ={1,3}, B 2 ={7,8,10}, B 3 ={2,5,6} and B 4 ={4,9} 1)A = B 1  B 2  B 3  B 4 2)B i  B j =   i  j {B 1, B 2, B 3, B 4 } are Partitions of A

Equivalence Class R is a “binary relation” over set A Partition A into “blocks” such that [a]={x | a R x, x  A} Set [a] is an “equivalence class” of A over R An arbitrary element of A is a member of exactly one equivalence class Set of all equivalence classes over R on A is the “quotient set” of A wrt R A / R The number of equivalence classes “rank” of R

Equivalence Class Example R = (A, A, F(x,y)) F(x, y) is Proposition that K=x (mod 3), K is a Constant NOTE: F(x, y)= F(x) in this case, a unary proposition A ={0,1,2,3,4,5,6,7,8,9,10} [a 1 ]={0,3,6,9}, [a 2 ]={1,4,7,10}, [a 3 ]={2,5,8} Each Partition is an Equivalence Class A / R ={{0,3,6,9},{1,4,7,10},{2,5,8}} Rank of R is 3

Logic Notation “proposition” is a sentence with a clear meaning allowing its’ evaluation of true or false Fire is cold -FALSE Let P and Q be propositions P  Q means that if P holds then Q holds P  Q means that P is true iff Q is true, or, P is a “necessary” and “sufficient” condition for Q If P  Q : P is a “sufficient condition” of Q Q is a “necessary condition” of P P  Q does not necessarily mean that Q  P Q  P is the “converse” of P  Q If P  Q then Q  P Q  P is the “contraposition” of P  Q

Refinement R 1 and R 2 are Equivalence Relations over A if xR 1 y  xR 2 y for x, y  A then R 1 is a “refinement” of R 2 R 1  R 2 EXAMPLE: A={011, 100, 110, 111} R 0 =(A,A, F 0 )R 1 =(A, A,F 1 ) R 0 and R 1 are Equivalence Relations F 0 proposition that all corresponding bits are same F 1 is proposition that right two bits are same R 0 ={(011,011),(100,100),(110,110),(111,111)} R 1 ={(011,011),(011,111),(100,100),(110,110),(111,011),(111,111)} R 0 is a refinement of R 1 R 0  R 1

Definition of a Function A and B are sets, f is a function that maps a i  A to b j  B f: A  B f(a i )=b j a i f b j A is the “domain” of f b j is the “value” of function f b j = f(a i )  B is an “image” of a i  A A Relation R f may be Defined from f f : A  B, f(a i )= b j iff (a i, b j )  R f f -1 is the “inverse relation” of function f: A  B f -1 is NOT, in general, a function f -1 (b j ) IS an “inverse image” of b j f -1 (b j )  A

Operation “unary” operation is a function, f : A  A “binary” operation is a function, f : A  A  A (e.g. a i * a j = a k, (a i,a j )  a k ) EXAMPLE B = {0,1}a,b  B a = 1 - a (unary-complement) a  b = a b (binary-conjunction) a  b = a + b - (a b) (binary-disjunction) a  b = a + b - (2 a b) (binary-exclusive OR)

Ordered Relations R is a Binary Relation on A For a,b,c  A if the following hold: 1)aRa (Reflexive Law) 2)If aRb and bRa then a=b (Anti-Symmetric Law) 3)If aRb and bRc then aRc (Transitive Law) R is said to be a “Partially Ordered Relation” Also, if  a,b  A, aRb or bRa then R is said to be a “Total Order Relation” Such ordered relations are denoted as a  R b rather than aRb

Ordered Sets R is a binary Relation on A For a,b,c  A if the following hold: 1) aRa (Reflexive Law) 2)If aRb and bRa then a=b (Anti-Symmetric Law) 3)If aRb and bRc then aRc (Transitive Law) R is said to be a “Partially Ordered Relation” Also, if  a,b  A, aRb or bRa then R is said to be a “Total Order Relation” Such ordered relations are denoted as a  R b rather than aRb An ordered set consists of an order relation and the set over which it is defined  A,  R 

Hasse Diagrams R is a binary Relation on A For a,b,c  A such that a  R b and a  b if there is no element c such that a  R c, c  R b where a  b  c then b “covers” a Hasse Diagrams are useful for visualizing cover characteristics Covering elements appear ABOVE Covered elements and are connected by a line “Maximal Elements” are those which are NOT Covered “Minimal Elements” are those which do NOT cover any other Elements

Hasse Diagram Examples 1 is the maximal element 0 is the minimal element 1 0 ab e f d c (1,1) (0,0) (0,1) (1,0) (1,1) is the maximal element (0,0) is the minimal element a and b are the maximal elements c is the greatest lower bound of { a, b } e and f are the minimal elements d is the least upper bound of { e, f }

Least Upper Bound, Greatest Lower Bound Let  A,  R  be an ordered set and let B  A a  A is Upper Bound of B if b  R a,  b  B a  A is Lower Bound of B if a  R b,  b  B If there is a minimum element in the set of the upper bounds of B, then it is the Least Upper Bound of B (denoted by a  b ) If there is a maximum element in the set of the lower bounds of B, then it is the Greatest Upper Bound of B (denoted by a b )