Relations Relations between sets are like functions, but with a more general definition (given later). presentations: a set, a binary matrix, a graph…

Slides:



Advertisements
Similar presentations
Representing Relations
Advertisements

Representing Relations Rosen 7.3. Using Matrices For finite sets we can use zero-one matrices. Elements of each set A and B must be listed in some particular.
The Engineering Design of Systems: Models and Methods
Relations - review A binary relation on A is a subset of A×A (set of ordered pairs of elements from A) Example: A = {a,b,c,d,e} R = { (a,a),(a,b),(b,b),(b,c),
CS2210(22C:19) Discrete Structures Relations Spring 2015 Sukumar Ghosh.
Discrete Structures Chapter 5 Relations Nurul Amelina Nasharuddin Multimedia Department.
Relations. Binary Relations a relation between elements of two sets is a subset of their Cartesian product (of ordered pairs). Note the di ff erence between.
Relations binary relations xRy on sets x  X y  Y R  X  Y Example: “less than” relation from A={0,1,2} to B={1,2,3} use traditional notation 0 < 1,
Discrete Mathematics Lecture#11.
1 Section 7.1 Relations and their properties. 2 Binary relation A binary relation is a set of ordered pairs that expresses a relationship between elements.
Sets, POSets, and Lattice © Marcelo d’Amorim 2010.
Week 8 - Wednesday.  What did we talk about last time?  Cardinality  Countability  Relations.
Chapter 7 Functions Dr. Curry Guinn. Outline of Today Section 7.1: Functions Defined on General Sets Section 7.2: One-to-One and Onto Section 7.3: The.
Logics for Data and Knowledge Representation Introduction to Algebra Chiara Ghidini, Luciano Serafini, Fausto Giunchiglia and Vincenzo Maltese.
Representing Relations By Ajhane Foster And MarTricesa Carter.
Relation. Relations Recall the definition of the Cartesian (Cross) Product: The Cartesian Product of sets A and B, A x B, is the set A x B = { : x  A.
Chapter 4 Relations and Digraphs
April 10, 2002Applied Discrete Mathematics Week 10: Relations 1 Counting Relations Example: How many different reflexive relations can be defined on a.
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
Week 7 - Friday.  What did we talk about last time?  Set disproofs  Russell’s paradox  Function basics.
An ordered n-tuple is a set of n objects with an order associated with them. If n objects are represented by x 1, x 2,..., x n, then we write the ordered.
CHAPTER (6) RELATIONS. RELATIONS : - Let A and B be sets. A binary relation from A to B is subset of A* B …
HALVERSON – MIDWESTERN STATE UNIVERSITY CMPS 2433 Chapter 2 – Part 2 Functions & Relations.
Math Chapter 6 Part II. POWER SETS In mathematics, given a set S, the power set of S, written P(S) or 2 n(S), is the set of all subsets of S. Remember.
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.
Agenda Week 10 Lecture coverage: –Functions –Types of Function –Composite function –Inverse of a function.
April 14, 2015Applied Discrete Mathematics Week 10: Equivalence Relations 1 Properties of Relations Definition: A relation R on a set A is called transitive.
Relations, Functions, and Countability
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Relations.
Discrete Mathematics Relation.
Copyright © Zeph Grunschlag, Relations Zeph Grunschlag.
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.
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)
1 RELATIONS Learning outcomes Students are able to: a. determine the properties of relations – reflexive, symmetric, transitive, and antisymmetric b. determine.
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.)
1 Partial Orderings Aaron Bloomfield CS 202 Epp, section ???
1 Discrete and Combinatorial Mathematics R. P. Grimaldi, 5 th edition, 2004 Chapter 5 Relations and Functions.
Unit II Discrete Structures Relations and Functions SE (Comp.Engg.)
Chapter Relations and Their Properties
1 RELATIONS Learning outcomes Students are able to: a. determine the properties of relations – reflexive, symmetric, transitive, and antisymmetric b. determine.
Equivalence Relations
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.
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.
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.
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.
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), (
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
Week 8 - Monday.  What did we talk about last time?  Properties of functions  One-to-one  Onto  Inverses  Cardinality.
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.
Lecture 7: Relations Dr Andrew Purkiss-Trew Cancer Research UK Mathematics for Computing.
Relations and Their Properties
Citra Noviyasari, S.Si, MT
Department of Mathematics
6.1 Partially Ordered Sets
Relations and Digraphs
Applied Discrete Mathematics Week 10: Relations
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.
Aaron Bloomfield CS 202 Epp, section ???
Relation and function.
Applied Discrete Mathematics Week 9: Equivalence Relations
Relations and Their Properties
Relations and their Properties
Introduction to Relations and Functions
CSE 321 Discrete Structures
REVISION Relation. REVISION Relation Introduction to Relations and Functions.
Agenda Lecture Content: Relations (Relasi)
Presentation transcript:

Relations Relations between sets are like functions, but with a more general definition (given later). presentations: a set, a binary matrix, a graph… distinguished types: orderings, symmetric, reflexive, transitive,... By the end of the next two weeks you should be able to say what a relation is translate between different presentations recognise (and prove) if a relation is of a certain type

Functions Recall a function f from set A to set B gave a unique element of B for every element of A. A domainB codomain f Also partial functions allow some domain elements without images

Describing functions using pairs Functions on finite sets can be defined by listing pairs (x, f(x)) A domainB codomain f a b c d p q r f can be given by the set {(a,p), (b,p), (d,p), (c,q) }, a subset of the Cartesian product of A and B.

Describing functions using a table Functions on finite sets can be defined using a table A domainB codomain f a b c d p q r Notice that all columns sum to 1 - why?

Reading or writing functions A domainB codomain f a b c d p q r Writef(a) = p or say“ f of a is p ” or“ f maps a to p ” or“ the image of a under f is p ”

Inverse functions A domainB codomain f a c d p q r f -1 A codomain a c d B domain p q r

Composing functions A domainB codomain f a b c d p q r B domain p q r g C codomain codomain composite domain a b c d A domain C codomain

Relations Some relations between sets don’t give functions. AB Q: why isn’t this a function from A to B? Q: why isn’t it a function from B to A?

Using pairs to describe a relation Relations can be defined using a set of pairs R is a relation between sets A and B. R can be given by the set {(a,p), (b,p), (b,q), (d,p), (c,q) }, a subset of the Cartesian product of A and B. A B a b c d p q r R

Formal definition of a relation A relation R between two sets A and B is a subset of the Cartesian product of A and B.

Using a binary matrix to describe a relation There are no restrictions on the entries in this binary matrix for relations A B a b c d p q r

Reading or writing relations A B a b c d p q r WriteaRp ora is related to p under R orR relates a to p or saya is related to p R

A relation between two sets Given the set A = {(1,0), (2,0), (3,4), (1,1)} and the set B = {1, 2, 3, 4, 5} aRb iff a is at least distance b from the origin (0,0) Describe this relation using dots and arrows, using a set of pairs and using a binary matrix

A relation “on a set” On the set A = {1, 2, 3, 4} we can say that “3 is less than 4” (and other examples). The template “- is less than -” gives a relation between the set A and the set A (gives a relation “on the set A”) Describe this relation using dots and arrows, using a set of pairs and using a binary matrix

Inverse relations A B R a c d p q r b R -1 A a c d B p q r b

Inverse relations A B R a c d p q r b R -1 A a c d B p q r b R = { (a,p), (a,r), (c,q), (d,p), (d,q) } R -1 = { (p,a), (r,a), (q,c), (p,d), (q,d) }

Inverse relations A B R a c d p q r b R -1 A a c d B p q r b

Composing relations A B R a b c d p q r B p q r S C composite a b c d A C

Distinguished types of relation A function from set A to set B is a relation between A and B such that

Distinguished types of relation A reflexive relation on set A is a relation on A such that

Distinguished types of relation A symmetric relation on set A is a relation on A such that

Distinguished types of relation An antisymmetric relation on set A is a relation on A such that

Distinguished types of relation A transitive relation on set A is a relation on A such that

Distinguished types of relation A partial ordering on set A is a reflexive, antisymmetric and transitive relation on A

Distinguished types of relation A total ordering on set A is a partial ordering on A with

Distinguished types of relation An equivalence relation on set A is a relation on A which is reflexive, symmetric and transitive.