08 April 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.

Slides:



Advertisements
Similar presentations
18 April 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
Advertisements

18 April 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
Relations Relations on a Set. Properties of Relations.
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.
22 March 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
13 May 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
12 April 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
Discrete Mathematics Relations
04 March 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
08 March 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
Section 7.4: Closures of Relations Let R be a relation on a set A. We have talked about 6 properties that a relation on a set may or may not possess: reflexive,
Basic Properties of Relations
Relations.
Representing Relations Using Matrices
5/16/20151 You Never Escape Your… Relations. 5/16/20152Relations If we want to describe a relationship between elements of two sets A and B, we can use.
Applied Discrete Mathematics Week 11: Graphs
8.4 Closures of Relations. Intro Consider the following example (telephone line, bus route,…) abc d Is R, defined above on the set A={a, b, c, d}, transitive?
Theory and Applications
Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Software Systems.
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,
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.
13 May 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
10 May 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
C. N. Colón Geometry St. Barnabas H. S. Bronx, NY Real Numbers and Their Properties Ch 1.2.
Reminders: –Test3 is scheduled for Friday, April 25 was sent that included a proposed schedule –HW 8 is due Wednesday, April 9 in class Pascal’s.
01 March 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
Applied Discrete Mathematics Week 10: Equivalence Relations
22 March 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
12 April 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
1 Relations and Their Properties Epp, section ??? CS 202 Aaron Bloomfield.
CS Discrete Mathematical Structures Mehdi Ghayoumi MSB rm 132 Ofc hr: Thur, 9:30-11:30a Fall 2002KSU - Discrete Structures1.
April 10, 2002Applied Discrete Mathematics Week 10: Relations 1 Counting Relations Example: How many different reflexive relations can be defined on a.
931102fuzzy set theory chap07.ppt1 Fuzzy relations Fuzzy sets defined on universal sets which are Cartesian products.
17 May 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Object Oriented.
1 April 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
03 May 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
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 Structures1 You Never Escape Your… Relations.
April 14, 2015Applied Discrete Mathematics Week 10: Equivalence Relations 1 Properties of Relations Definition: A relation R on a set A is called transitive.
Copyright © Cengage Learning. All rights reserved. CHAPTER 8 RELATIONS.
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.
Fall 2002CMSC Discrete Structures1 You Never Escape Your… Relations.
Mathematical Preliminaries
Lecture on Relations 1Developed by CSE Dept., CIST Bhopal.
CSNB143 – Discrete Structure Topic 7 – Relations Part II.
Relation. Combining Relations Because relations from A to B are subsets of A x B, two relations from A to B can be combined in any way two sets can be.
Chapter Relations and Their Properties
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.
8.4 Closures of Relations Definition: The closure of a relation R with respect to property P is the relation obtained by adding the minimum number of.
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.
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), (
1 CMSC 250 Discrete Structures CMSC 250 Lecture 41 May 7, 2008.
Chapter8 Relations 8.1: Relations and their properties.
Relations and Their Properties
Introduction to Relations
Learn about relations and their basic properties
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.
Relations and Their Properties
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 9 Relations Slides are adopted from.
Applied Discrete Mathematics Week 9: Equivalence Relations
Applied Discrete Mathematics Week 10: Equivalence Relations
Relations and Their Properties
NAME THAT PROPERTY! For each of the equations below,
Introduction to Relations and Functions
Properties of Relations
Discrete Math (2) Haiming Chen Associate Professor, PhD
REVISION Relation. REVISION Relation Introduction to Relations and Functions.
Presentation transcript:

08 April 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal Methods Relations

08 April 2009Instructor: Tasneem Darwish2 Outlines Relational inverse Relational composition Closures

08 April 2009Instructor: Tasneem Darwish3 Relational inverse For a relation R, which is an element of the set, X is the source set and Y is the target set of R. The relational inverse (~) operator exchange the source and target. the elements of each ordered pair are exchanged. the result is an element of The relation R ~ maps y to x exactly when R maps x to y Example 7.9 The inverse of the relation drives, defined in Example 7.2, relates cars to their drivers:

08 April 2009Instructor: Tasneem Darwish4 Relational inverse The relation is homogeneous if the target and source are of the same type. The relation is heterogeneous if the target and source are not of the same type. An important homogeneous relation is the identity relation, defined by If a homogeneous relation contains the identity relation, then it is reflexive R is reflexive if Example 7.11 The relation ≤ upon natural numbers is reflexive; the relation < is not.

08 April 2009Instructor: Tasneem Darwish5 Relational inverse A homogenous relation is symmetric if whenever it relates x to y, it also relates y to x. A homogeneous relation is antisymmetric, if it is impossible for two different elements to be related in both directions. A homogeneous relation R is asymmetric if whenever it relates x to y, it doesn’t relate y to x. Example 7.14 The strict subset relation is asymmetric: it is impossible to find two sets s and t such that

08 April 2009Instructor: Tasneem Darwish6 Relational composition Relational composition is when the target type of one relation matches the source type of another, and they are combined to form a single relation. If R is an element of, and S is an element of, then we write to denote the relational composition of R and S which is the element of

08 April 2009Instructor: Tasneem Darwish7 Relational composition Example 7.16 The relation uses of type Cars↔Fuels tells us which fuel is used by each of the cars in Example 7.2: We may compose the relations drives and uses to find out which fuels a driver may purchase. The type of buys is

08 April 2009Instructor: Tasneem Darwish8 Relational composition A homogeneous relation R is transitive if every pair of connecting maplets and in R has a corresponding maplet in R. Example 7.17 The greater-than relation on natural numbers N is transitive: whenever a > b and b > c, we know that a > c If a homogeneous relation is reflexive, symmetric, and transitive, then it is an equivalence relation:

08 April 2009Instructor: Tasneem Darwish9 Closures the principle of closure involves adding maplets to a relation until some useful property is achieved The simplest form of closure is obtained by adding the identity relation to get reflexive closure Example 7.21 The reflexive closure < r is the relation. The symmetric closure is obtained by adding enough maplets to produce a symmetric relation.

08 April 2009Instructor: Tasneem Darwish10 Closures For any positive natural number n, we may write R n to denote the composition of n copies of R: that is: R −n is the inverse of R n and R 0 is the identity relation. The information obtained from all finite iterations of R can be combined to form the relation R +

08 April 2009Instructor: Tasneem Darwish11 Closures The information obtained from all finite iterations of R can be combined to form the relation R + R+ is the transitive closure of R; it is the smallest transitive relation containing R. Example 7.25 We may use a relation direct to record the availability of a direct flight between two airports. For the four airports shown this relation is given by The composition comprises all of the possibly indirect Flights that involve at most one stop en route

08 April 2009Instructor: Tasneem Darwish12 Closures Example 7.25 We may use a relation direct to record the availability of a direct flight between two airports. For the four airports shown this relation is given by The composition comprises all of the possibly indirect Flights that involve at most one stop in route Two step in route

08 April 2009Instructor: Tasneem Darwish13 Closures Example 7.25 at most one stop in route Two step in route direct 4 = direct 2 and that direct 5 = direct 3

08 April 2009Instructor: Tasneem Darwish14 Closures Example 7.26 The transitive closure of direct relates two airports exactly when there is a route between them consisting of some number of direct flights It is sometimes useful to consider the reflexive transitive closure of a homogeneous relation. If R is a relation of type X↔X, then we write R* to denote the smallest relation containing R that is both reflexive and transitive,

08 April 2009Instructor: Tasneem Darwish15 Closures Example 7.27 In the direct + relation, there is no way to travel from Perth to Perth. However, if we are planning the movement of equipment between locations, we might wish to record the fact any equipment already at Perth can be moved to Perth. In this case, we would consider the reflexive transitive closure direct of our flights relation: