Attribution Non-Commercial (BY-NC)

122 views

Attribution Non-Commercial (BY-NC)

- Analysis of Barriers of Total Productive Maintenance (TPM)
- Smarandache Loops, by W.B.Vasantha Kandasamy
- Discrete Maths 2002 Lecture 21 3 Slides Pp
- criptography
- 03_Number_Theory_Modular_Arithmetic.pdf
- Linear System of Congruence
- Relations Ch 11
- An Example of the RSA Algorithm
- Framework for Measuring Differences in Data Chars--ganti Et.al. (2002)--PUB
- AVL Treeavail
- Introduction to Proofs
- Objective Ch 2 FSC Part1 Imran
- A Subgraph Pattern Search over Graph Databases
- Neutrosophic Soft Graphs
- Equivalence Class Testing.ppt
- Class 12th Maths Chapter 1 (Relations and Functions) Unsolved.pdf
- lec7
- Frida Pres
- Graph Adt
- II (Art 1) Minimum Flows in Directed S-t Planar Networks

You are on page 1of 21

Suha Al-Shaikh-Dammam

Binary relation

relation R)”.

Example:

Let R: A ↔ B

Ex: Let A be the set {1,2,3,4}, which ordered pairs are in the relation R={(a,b)| a

divides b}?

R= {(1,1),(2,2),(3,3),(4,4),(1,3),(1,2),(1,4),(2,4)}

C. Graph

R1 = {(1,1),(2,2),(3,3),(4,4),(1,3),(1,2),(1,4),(2,4)}

1

M131-Chapter8 By Ms. Suha Al-Shaikh-Dammam

D. Table

R = {(1,1),(2,2),(3,3),(4,4),(1,3),(1,2),(1,4),(2,4)}

Relations on a Set

Example: The “<” relation defined as a relation on the set N of natural numbers.

Example:

A = {1,2,3,4}

IA = {(1,1),(2,2),(3,3),(4,4)}

Example:

R1= {(a,b)| a ≤ b}

(1,1) is in R1,R2,R3

(1,2) is in R1,R3

(1,-1) is in R2,R3

2

M131-Chapter8 By Ms. Suha Al-Shaikh-Dammam

Question:

2

3. Number of subsets for n2 elements is 2 n

2

Thus there are 2 n relations on a set with n elements.

Example

S ={a, b, c}

There are :

23 29 512 Relations

2

Properties of Relations

1. R1={(1,1),(1,2),(2,1),(2,2),(3,4),(4,1),(4,4}

Not Reflexive

2. R2={(1,1),(2,1),(2,2),(3,3),(3,4),(4,4)}

Reflexive

3. R3 = {(a, b) | a ≤ b} Reflexive

Example:

A= {1, 2}

3

M131-Chapter8 By Ms. Suha Al-Shaikh-Dammam

Example:

Example:

(a,b)R → (b,a)R.

Example:

Let A = {1,2,3}

4

M131-Chapter8 By Ms. Suha Al-Shaikh-Dammam

Example:

R1={(a, b) | a=b}

symmetric , antisymmetric

R2={(a, b) | a>b}

R3={(a, b) | a=b+1}

3. Transitivity

(a,b)R (b,c)R → (a,c)R.

Examples: A= {1,2}

R1={(1,1),(1,2),(2,1),(2,2)} transitive

R3 ={(3,4)} transitive

Special cases

Empty set {}

U universal set.

Combining Relations:

R1={(1,1),(2,2),(3,3)}

R2={(1,1),(1,2),(1,3),(1,4)}

R1 R2 = {(1,1),(2,2),(3,3), (1,2),(1,3),(1,4)}

R1 R2= {(1,1)}

R1- R2={(2,2),(3,3)}

5

M131-Chapter8 By Ms. Suha Al-Shaikh-Dammam

Composite Relations:

If R1 a relation from a set A to a set B, and R2 is a relation from set B to set C, the

R2◦ R1 is a set from A to C.

A

R1

B

R2

C

A C

R 2 R1

Ex:

R={(1,1), (1,4),(2,3),(3,1),(3,4)}

S = {{1,0), (2,0),(3,1),(3,2),(4,1)}

Power

R1 =R and Rn = Rn-1 ◦ R

Find:

R2 = {(1,1),(2,1),(3,1),(4,2)}

R3 = R2 ◦ R= {(1,1),(2,1),(3,1),(4,1)}

Let R be a Relation from a set A to a set B. The inverse relation from B to A denoted

by: R-1= {(b,a)| (a,b) R}.

R {(a, b) | (a, b) R}

6

M131-Chapter8 By Ms. Suha Al-Shaikh-Dammam

MR = [mij], let mij = 1 if (ai,bj)R, else 0.

E.g., Joe likes Susan and Mary, Fred likes Mary, and Mark likes Sally.

Susan M ary Sally

Joe 1 1 0

Fred 0 1 0

M ark 0 0 1

Example:

0 0

R= {(2,1),(3,1),(3,2)} then the matrix for R is: M R 1 0

1 1

7

M131-Chapter8 By Ms. Suha Al-Shaikh-Dammam

These relation characteristics are very easy to recognize by inspection of the zero-

one matrix.

Remark: 1) The relation R is reflexive if all the elements on the main diagonal of M R

(2) The relation R is symmetric if and only if mij m ji for all pairs of integers i

and j with i = 1,2,…..,n and j = 1,2,…….n

(4) The relation R is anti symmetric if and only if (a,b) R and (b,a) R → a=b. The

matrix of anti symmetric relation has the property that if mij 1 i j then m ji 0

Example:

1 1 0

M R 1 1 1

0 1 1

Reflexive, symmetric, not antisymmetric

Operations

The Boolean Operations join and meat can be used to find the matrices

representing the union and the intersection of two relations

Then: M R1 R 2 M R1 M R 2

M R1 R 2 M R1 M R 2

8

M131-Chapter8 By Ms. Suha Al-Shaikh-Dammam

Example:

1 0 1 1 0 1

M R1 1 0 0 and M R2 0 1 1

0 1 0 1 0 0

Then :

1 0 1

M R1 R 2 M R1 M R 2 1 1 1

1 1 0

1 0 1

M R1 R 2 M R1 M R 2 0 0 0

0 0 0

2) Composite

Suppose that R: A ↔ B, S: B ↔ C

(Boolean Product)

M S R M R M S

Example:

Let 1 0 1 0 1 0

M R 1 1 0 and M S 0 0 1

0 0 0 1 0 1

Find the matrix of S R

1 1 1

M S R 0 1 1

0 0 0

3)Power

M R n M R[n ]

• R2 =R ◦ R = MR[2]

9

M131-Chapter8 By Ms. Suha Al-Shaikh-Dammam

Example

Find the matrix that represent R2 where the matrix representing R is:

0 1 0 0 1 1

M R 0 1 1 then M R2 1 1 1

1 0 0 0 1 0

EGVG×VG of edges (arcs,links). Visually represented using dots for nodes, and

arrows for edges. Notice that a relation R:A↔B can be represented as a graph

GR=(VG=AB, EG=R).

Susan M ary Sally

Joe 1 1 0

Fred 0 1 0

M ark 0 0 1

Note that : an edge from (a,a) represented using an arc from the

vertex a back to it self. Such an edge is called a loop

Example:

Edges are (a,b), (b,b), (c,b), (a,d), (b,d), (d,b), and (c,a).

R={(1,1),(1,3),(2,1),(2,3),(2,4),(3,1),(3,2),(4,1)} on the set {1,2,3,4}

Solution:

11

M131-Chapter8 By Ms. Suha Al-Shaikh-Dammam

properties by graph inspection.

Example: Determine whether the relation for the following directed graph are

reflexive, symmetric , anti symmetric, and or transitive.

2)It is not symmetric because there are (a,b) but not (b,a).

4)R is not transitive because (a,b), and (b,c) belongs to S, but (a,c) doesn’t belong.

11

M131-Chapter8 By Ms. Suha Al-Shaikh-Dammam

Closures of Relations

Definition: For any property X, the “X closure” of a set A is defined as the “smallest”

superset of A that has the given property.

aA not already in R

I.e., it is R IA

Example

How can you produce a reflexive relation containing R that is as small as possible?

{(1,1),(1,2),(2,1),(3,2),(2,2),(3,3)}

Example

Answer:

12

M131-Chapter8 By Ms. Suha Al-Shaikh-Dammam

i.e., it is R R−1

Example

The relation

How can we produce a symmetric relation that is as small as possible and contains R?

{(1,1),(2,2),(1,2),(3,1),(2,3),(3,2),(2,1),(1,3)}

Example

Answer:

adding (a, c) to R for each (a, b), (b, c) in R.

i.e., it is R* R n

nZ

MR*=MR MR[2]…………MR[n]

Example

• R* = R R2 R3

• R2 = R ◦ R = {(1,1),(1,2),(2,2),(3,1)}

• R3 = R2o R = {(1,1),(1,2),(2,1),(2,2),(3,2)}

• R* = {(1,1),(1,2),(2,1),(3,2),(2,2),(3,1)}

13

M131-Chapter8 By Ms. Suha Al-Shaikh-Dammam

Example:

1 0 1

*

Find MR for M R 0 1 0

1 1 0

1 1 1

M R * M R M R[ 2 ] M R[ 3 ] 0 1 0

1 1 1

Questions: 1) let R be the relation on the set {0,1,2,3} containing the pairs

(0,1),(1,1),(1,2),(2,0),(2,2) and (3,0). Find the

a) Reflexive closure of R

b) Symmetric closure of R

_____________________________________________________________________

2) Let R be the relation {(a,b)| a divides b} on the set of integers. What is the

symmetric closure of R?

_____________________________________________________________________

3) Draw the directed graph of the reflexive closure and the symm. Closure of the

relation with the directed graph shown

Solution:

14

M131-Chapter8 By Ms. Suha Al-Shaikh-Dammam

Equivalence Relations

An equivalence relation on a set A is simply any binary relation on A that is reflexive,

symmetric, and transitive.

Example:

Answer:

R is transitive since for (a,b) then a-b integer and for (b,c) then b-c integer ,

so R is an Equivalence Relation.

Example:

relation.

Answer:

So that : b ≡a(mod m)

*R is transitive: Suppose

a-c=(a-b)+(b-c)=km+lm=(k+l)m

15

M131-Chapter8 By Ms. Suha Al-Shaikh-Dammam

Example: show that “divides” relation on the set of positive integers is not an

equivalence relation.

Solution:

Example: let R be the relation on the set of real numbers such that x Ry if and only if

x and y are real numbers that differ by less than 1. That is |x-y|<1. Show that R is not

an equivalence relation.

Solution:

|x-y|=|y-x|<1→yRx so R is symmetric.

x y 1 and y z 1

1 x y 1

add 2 x y y z 2

1 y z 1

2 xz 2 xz 2

So R is not transitive.

Equivalence classes:

Definition: let R be an equivalence relation on a set A. The set of all elements that are

related to an element a of A is called the equivalence class of a (denoted by [a]R ).

aR s | (a, s) R

class of the element a is

Do example8.

16

M131-Chapter8 By Ms. Suha Al-Shaikh-Dammam

Example: what are the equivalence classes of 0 and 1 for congruence modulo 4?

Solution:

*The equivalence class of 0 contains all integers a such that a o(mod 4) . The

integers in this class are divisible by 4. so 04 ....,8,4,0,4,8,....

The integers in this class are those that have a remainder 1 when divided by 4.

So 14 ....,7,3,1,5,9,....

am ......, a 2m, a m, a, a m, a 2m,...

Refer to last example. Find 24 and 34

24 ....,6,2,2,6,10,...

34 ....,5,1,3,7,11,...

17

M131-Chapter8 By Ms. Suha Al-Shaikh-Dammam

reflexive, anti symmetric and transitive.

A set S together with R is called a partially ordered set, or poset and is denoted by

(S,R), members of S are called elements of the poset.

Example1: (page566)

Show that the “greater than or equal” relation (≥)is the partial ordering on the set of

integers.

Solution:

that ≥ is a partial ordering on the set of integers and (Z, ≥) is a poset.

2) Anti symmetric: if a|b and b|a then a=b. Hence | is anti symmetric.

C=lb=l(ka)=(lk)a→a|c so | is transitive

It follows that | is a partial ordering on the set of positive integers and and ( Z , |)

is a poset.

Example: show that the inclusion relation is a partial ordering on the power set of a

set S.

transitive

Therefore is a partial ordering on the power set of a set S; and (p(s), ) is a poset.

18

M131-Chapter8 By Ms. Suha Al-Shaikh-Dammam

Let R be the relation on the set of people such that xRy if x and y are people and x is

older than y. Show that R is not a partial ordering.

Solution: R is not reflexive because no person is older than himself or herself. That is

xRx for all people x it follows that R is not partial ordering.

(S,R).

Example: In the poset ( Z , |) are the integers 3 and 9 comparable? Are 5 and 7

comparable?

Solution: because 3|9, the integers 3 and 9 are comparable. Because 5 | 7, the integers

5 and 7 are in comparable.

Remark: when every two elements in the set are comparable, the relation is called

a total ordering.

totally ordered or linearly ordered set, and is called a total order or a linear order.

A totally ordered set is also called a chain.

Example:page 568:

the poset (Z,≤) is totally ordered, because a≤b or b≤a whenever a and b are integers.

Example: the poset ( Z , |) is not totally ordered because it contains elements that are

in comparable, such as 5 and 7.

ordering ≤ on A1×A2 is defined by:

a1 , a2 is less than b1 , b2 that is a1 , a2 b1 , b2

either if a1 1 b1 or if both a1 b1 and a2 2 b2

19

M131-Chapter8 By Ms. Suha Al-Shaikh-Dammam

constructed from the usual ≤ relation on Z.

Solution: because 3<4 it follows that (3,5) (4,8) and that (3,8) (4,5), we have

(4,9) (4,11), because the first entries of (4,9) and (4,11) are the same but 9<11.

Examplepage 569:

note that (1,2,3,5) (1,2,4,3), because the entries in the first 2 positions of these 4-

tuples agree, but in the third position the entry in the first 4-tuples,3 is less than 4 (

here the ordering on 4-tuples is the lexicographic ordering that comes from the usual

“less than or equals” relation on the set of integers).

The Hasse Diagram for the partial ordering relation is obtained from the associated

diagrams by deleting all the loops and all the edges that occur from transitivity

1) Starts with the directed graphs for the given relation (partial ordering set)

3) Remove the edges that must be in-the partial ordering because of the presence

of other edges and transitivity. E.g if (a,b) and (b,c) are in the partial ordering

remove (a,c)

4) Finally arrange each edge so that its initial vertex is below its terminal vertex.

Example: Draw the Hasse Diagram representing the partial ordering {(a,b):a≤b} on

the set {1,2,3,4}

Solution: R{(1,1),(2,2),(3,3),(4,4),(1,2),(1,3),(1,4),(2,3),(2,4),(3,4)}

21

M131-Chapter8 By Ms. Suha Al-Shaikh-Dammam

Example: Draw the Hasse Diagram representing the partial ordering {(a,b):a|b} on

{1,2,3,4,6,8,12}

Answer:

R={(1,1),(1,2),(1,3),(1,4),(1,6),(1,12),(2,2),(2,4),(2,6),(2,8),(2,12),(3,3),(3,6),(3,12),

(4,4),(4,8),(4,12),(6,6),(6,12),(8,8)(12,12)}

21

- Analysis of Barriers of Total Productive Maintenance (TPM)Uploaded bycamiloromez
- Smarandache Loops, by W.B.Vasantha KandasamyUploaded bymarinescu
- Discrete Maths 2002 Lecture 21 3 Slides PpUploaded byapi-26021617
- criptographyUploaded byanant
- Linear System of CongruenceUploaded byAskum Budi
- 03_Number_Theory_Modular_Arithmetic.pdfUploaded byAnonymous UIF2sJQqY
- Relations Ch 11Uploaded byAnonymous qyvpNA
- An Example of the RSA AlgorithmUploaded bystephenraj
- Framework for Measuring Differences in Data Chars--ganti Et.al. (2002)--PUBUploaded byWaisak Purnomo H
- AVL TreeavailUploaded byKiran Kharade
- Introduction to ProofsUploaded byMudit Khetan
- Objective Ch 2 FSC Part1 ImranUploaded byAngelic Shine
- A Subgraph Pattern Search over Graph DatabasesUploaded byIJMER
- Neutrosophic Soft GraphsUploaded byAnonymous 0U9j6BLllB
- Equivalence Class Testing.pptUploaded byDOCTOR
- Class 12th Maths Chapter 1 (Relations and Functions) Unsolved.pdfUploaded byEr. Narender Singh
- lec7Uploaded bymukesh3021
- Frida PresUploaded byFrank John
- Graph AdtUploaded byRhoxette Pedroza
- II (Art 1) Minimum Flows in Directed S-t Planar NetworksUploaded bydarkfire13ro
- database_finals.docxUploaded byFaheem Unar
- Vector Data RepresentationUploaded byAjay Kumar
- A Congruence with Smarandache's FunctionUploaded byRyanElias
- urcasposter mesa v2Uploaded byapi-375229991
- ac.els-cdn.com_S0377042707002671_1-s2.0-S0377042707002671-mainUploaded byKeoBot Keo
- Make Unbreakable Passwords in Your HeadUploaded byAnonymous vcdqCTtS9
- Titan Biggraphdata 2012 120614135441 Phpapp01Uploaded bySzárnyas Gábor
- Part7 Ch.3 Coding2Uploaded byhimanshu_agra
- Sol 1Uploaded byMiguel Francisco
- ijcopi12Uploaded byscrib

- DISCRETE OPTIMIZATION PROBLEMSUploaded byZaid Hadi
- Software Testing by Statistical MethodsUploaded bymcnavine
- James Propp- Discrete analogue computing with rotor-routersUploaded byHemAO1
- Graph TheoryUploaded byAman Gupta
- Basic Mathematics Vol I for OnlineUploaded byAmity-elearning
- Introduction to Computation and Programming Using Python%2C Revised - Guttag%2C John v..257Uploaded byZhichaoWang
- Mining the Inner Structure of the Web GraphUploaded byapi-26490800
- NetworksUploaded byChitradeep Dutta Roy
- Short LabUploaded byBatman
- EE2204 DSA 100 2marksUploaded byVinod Deenathayalan
- Graph Theory-mfcs MaterialUploaded byKiran Kumar
- TarjanUploaded byGustavo Viana
- BerlinGUploaded bykr0465
- Network Positions & RolesUploaded byPoonam Naidu
- A Course in Combinatorics.vilsonVanlintUploaded byrohanvermaaaaa
- Value Chain Analysis of Mirpur Benarasi Saree IndustryUploaded byFahad Sami
- ContestUploaded byBob Sanders
- Algorithmic GraphUploaded byMike Hare
- Networkx TutorialUploaded byDan Iftodi
- MIT14_15JF09_pajekUploaded byAlbert Pranata
- Manual CPNUploaded byfbautistah
- Olympiad Combinatorics Chapter 8Uploaded byAndros
- M3_Non Linear Data StructuresUploaded byresmi_ng
- dynamic treesUploaded byAnonymous Hurq9VK
- ADA+Lab+All+ProgramsUploaded bySrini Vas
- ISM.,.,Uploaded byAnonymous kTVBUxr
- 0521736536 Graph AlgorithmsUploaded by3qeel
- In DegreeUploaded byPankaj Ahire
- Product Modularity Measures and Design MethodsUploaded byDiego Fettermann
- 1979_Graph_Arbitrage_2330182Uploaded bytherm000