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.

Slides:



Advertisements
Similar presentations
1.6 Functions. Chapter 1, section 6 Functions notation: f: A B x in A, y in B, f(x) = y. concepts: –domain of f, –codomain of f, –range of f, –f maps.
Advertisements

Discrete Mathematics Lecture 5 Alexander Bukharovich New York University.
2.3 Multiplication and Division of Whole Numbers Remember to Silence Your Cell Phone and Put It In Your Bag!
The Engineering Design of Systems: Models and Methods
Basic Properties of Relations
Discrete Mathematics Lecture # 16 Inverse of Relations.
Lecture 3 Set Operations & Set Functions. Recap Set: unordered collection of objects Equal sets have the same elements Subset: elements in A are also.
modified from UCI ICS/Math 6D, Fall Sets+Functions-1 Sets “Set”=Unordered collection of Objects “Set Elements”
Discussion #26 Chapter 5, Sections /15 Discussion #26 Binary Relations: Operations & Properties.
Functions Goals Introduce the concept of function Introduce injective, surjective, & bijective functions.
1 Section 1.8 Functions. 2 Loose Definition Mapping of each element of one set onto some element of another set –each element of 1st set must map to something,
Relations Chapter 9.
CS355 - Theory of Computation Lecture 2: Mathematical Preliminaries.
Logics for Data and Knowledge Representation Introduction to Algebra Chiara Ghidini, Luciano Serafini, Fausto Giunchiglia and Vincenzo Maltese.
Relations: Operations & Properties. Power Sets Set of all subsets of a set A. –A = {1,2} –P(A) = 2 A = { {}, {1}, {2}, {1,2} } We note that each element.
A Brief Summary for Exam 1 Subject Topics Propositional Logic (sections 1.1, 1.2) –Propositions Statement, Truth value, Proposition, Propositional symbol,
Chapter 4 Relations and Digraphs
Functions. Copyright © Peter Cappello2 Definition Let D and C be nonempty sets. A function f from D to C, for each element d  D, assigns exactly 1 element.
Chapter 9. Chapter Summary Relations and Their Properties Representing Relations Equivalence Relations Partial Orderings.
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.
INM175 Topic 7 1 Module INM175 Discrete Mathematics Topic 7 Set Theoretic Models.
R. Johnsonbaugh, Discrete Mathematics 5 th edition, 2001 Chapter 2 The Language of Mathematics.
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
Functions1 Elementary Discrete Mathematics Jim Skon.
Chapter 1 SETS, FUNCTIONs, ELEMENTARY LOGIC & BOOLEAN ALGEBRAs BY: MISS FARAH ADIBAH ADNAN IMK.
1.4 Sets Definition 1. A set is a group of objects . The objects in a set are called the elements, or members, of the set. Example 2 The set of positive.
Basic Structures: Sets, Functions, Sequences, and Sums CSC-2259 Discrete Structures Konstantin Busch - LSU1.
Chapter 5 – Relations and Functions. 5.1Cartesian Products and Relations Definition 5.1: For sets A, B  U, the Cartesian product, or cross product, of.
Agenda Week 10 Lecture coverage: –Functions –Types of Function –Composite function –Inverse of a function.
Language: Set of Strings
Discrete Mathematics Relation.
Software testing techniques Spring 2009 Csci565: Theory and Practice of Software Testing1.
CHAPTER 3 FUZZY RELATION and COMPOSITION. 3.1 Crisp relation Product set Definition (Product set) Let A and B be two non-empty sets, the product.
Sets. Definitions (I) Collection of elements such that: There are no duplicates There is no order Special sets Universe (U or E): all elements under consideration.
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.
Discrete Mathematics Lecture # 15 Types of Relations (contd.)
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
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.
2007 D iscrete The foundations C ounting theory N umber theory G raphs & trees structure s
CSci 2011 Discrete Mathematics Lecture 9, 10
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.
FUNCTIONS COSC-1321 Discrete Structures 1. Function. Definition Let X and Y be sets. A function f from X to Y is a relation from X to Y with the property.
Relations and Functions ORDERED PAIRS AND CARTESIAN PRODUCT An ordered pair consists of two elements, say a and b, in which one of them, say a is designated.
1 Set Theory Second Part. 2 Disjoint Set let A and B be a set. the two sets are called disjoint if their intersection is an empty set. Intersection of.
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 B = {a,b} {( 0, a), (
Advanced Digital Designs Jung H. Kim. Chapter 1. Sets, Relations, and Lattices.
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
FUNCTIONS.
1 CMSC 250 Discrete Structures CMSC 250 Lecture 41 May 7, 2008.
Week 8 - Wednesday.  What did we talk about last time?  Relations  Properties of relations  Reflexive  Symmetric  Transitive.
Section 9.1. Section Summary Relations and Functions Properties of Relations Reflexive Relations Symmetric and Antisymmetric Relations Transitive Relations.
Lecture 7: Relations Dr Andrew Purkiss-Trew Cancer Research UK Mathematics for Computing.
Relations Chapter 9 Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill.
Chapter 5 Relations and Operations
Cartesian product Given two sets A, B we define their Cartesian product is the set of all the pairs whose first element is in A and second in B. Note that.
Relation and function.
CS201: Data Structures and Discrete Mathematics I
Discrete Math (2) Haiming Chen Associate Professor, PhD
Sungho Kang Yonsei University
Mathematical Background 1
Mathematical Background 1
Relations and their Properties
Introduction to Relations and Functions
ICS 253: Discrete Structures I
Mathematical Background
REVISION Relation. REVISION Relation Introduction to Relations and Functions.
Lecture # 16 Inverse of Relations
Presentation transcript:

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 of natural numbers between 0 & 50 that are multiples of 10 Otherwise: {n : N |  k : N  n = 10  k  0  n  50} Power set:  (A) is the set of all subsets of A (including  and A itself) U is the “universal set,” the set of discourse A – B is the set difference of A and B: everything in A that’s not in B The complement of set A, A, is U - A

Set Theoretical Laws Commutative Laws A  B = B  A A  B = B  A Associative Laws (A  B )  C = A  (B  C) (A  B)  C = A  (B  C) Distributive Laws (A  B)  C = (A  C)  (B  C) (A  B)  C = (A  C)  (B  C) De Morgan’s Laws (A  B) = A  B (A  B) = A  B

Identities Involving  A   =  A   = A A -  = A  - A =   = U Identities Involving U A  U = A A  U = U A – U =  U =  Laws about Set Intersection, Union, and Inclusion A  B  A A  A  B

Generalized Set Operations If S is a set of sets, then  S is the union of all sets in S, and  S is their intersection Binary Relations A binary relation R on sets A and B is a set of pairs (2-tuples) all belonging to the same Cartesian product: R  A  B, sometimes written R : A  B or R : A  B The set of elements in A that participate in R is the domain of R  The set of elements in B that participate in R is the range of R The inverse of R is {(y,x) | (x,y)  R } An n-ary relation R on sets A 1, …, A n is a subset of the Cartesian product A 1  …  A n : R  A1  … An

Properties of Binary Relations Suppose R: A  A. R is reflexive iff (a,a)  R for all a  A R is irreflexive iff (a,a)  R for all a  A R is non-reflexive iff it’s neither reflexive nor irreflexive R is symmetric iff, for any a, b  A, (a,b)  R  (b,a)  R R is anti-symmetric iff, for any a, b  A, (a,b)  R  (b,a)  R  a = b R is non-symmetric iff it’s neither symmetric nor anti-symmetric R is transitive iff, for any a, b, c  R, (a,b)  R  (b,c)  R  (a,c)  R R is an equivalence relation iff R is reflexive, symmetric, and transitive

A set S of subsets of arbitrary set A is a partition of A iff 1.   S 2. If S 1, S 2  S and S 1  S 2, then S 1  S 2 =  3.  S = A Given an equivalence relation R on set A and a  A, the equivalence class of a, denoted by [a], is { x | x  A  (a,x)  R } (Note: if (a,b)  R, then [a] = [b] )  And the quotient of A by R, denoted by A / R, is { [a] | a  A } A / R is a partition of A The composition of R: A  B and S : B  C, denoted by R  S, is defined as {(a,c)  a : A, c: C |  b : B  (a,b)  R  (b,c)  S }

Functions Relation f : A  B is a function iff  x : A; y, z : B  (x,y)  f  (x,z)  f  y = z  I.e., f maps a domain element to a unique value Where f is a function, we write f : A  B  A is the domain, B is the codomain Not assumed that every element of B is an image under f of an element of A  The subset of B consisting of images of elements of A under f is the range of f For A 1  A, write f (A 1 ) for the subset of B consisting of the images under f of the elements of A 1

Suppose f : A  B For C  A, f is a partial function on C and is total iff C= A. it’s undefined for C – A. f is surjective (onto) iff B is its range f is injective (1-to-1) iff its inverse is a function (i.e., each element in its range has a unique pre-image) f is bijective iff it’s surjective and injective (then there’s a 1-to-1 correspondence between A and B) If f : A  B and g : B  C, we write the composition of f and g applied to some x  A as g (f (x))

A sequence s on a set A of length n is a finite function from {0, …, n -1 } to A  Some take the domain to be {1, …, n }  Instead of s( i ), we write s i An array in a programming language is a sequence hence mathematically a function The concatenation s ^ t of sequence s of length n and sequence t of length m is a sequence of length n + m such that  s ^ t (i ) = s(i ) for 0  i  n -1 and  s ^ t (i ) = t ( i - n) for n  i  n + m -1

A bag b on a set A is a function from a subset of A to the natural numbers  For x  A, b (x ) is the number of times x occurs in b A bag can be thought of as a set that allows duplicates