Top Banner
Equivalence Relation and Partitions, Partial Ordering, and N-ARY Relations Jefry Andi Sinaga (4153311016) Josephine Halcynon Sinaga (4153311019) Sebrina br Saragih (41533110)
20

HIMLOG

Dec 06, 2015

Download

Documents

JosephineSinaga

Partisi dan RRelasi Ekivalen, N-Ary, dan Partial Ordering
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: HIMLOG

Equivalence Relation and Partitions, Partial Ordering, and N-ARY Relations

Jefry Andi Sinaga (4153311016)Josephine Halcynon Sinaga (4153311019)

Sebrina br Saragih (41533110)

Page 2: HIMLOG

Equivalence Relations and Partitions

Page 3: HIMLOG

3

Definition. A relation RAA is called an equivalence relationon A if it is symmetric, reflexive and transitive.

Consider the following relation on a set of all people:B = {(x, y)| x has the same birthday as y }

B is reflexive, symmetric and transitive. We can think about this relation as splitting all people into 366 categories, one for each possible day.

An equivalence relation on a set A represents some partition of this set.

Equivalence Relations and Partitions

Page 4: HIMLOG

4

Definition. For any set A subsets AiA partition set A if • A = A1 A2 … An

• AiAj= , for any ij. • Ai for any i

Example. A={1, 2, 3, 4}, ={{2}, {1, 3}, {4}} is a partition of A.

A1

A2

A3A4

A

Equivalence Relations and Partitions

Page 5: HIMLOG

5

Definition. Suppose R is equivalence relation on a set A, and xA. Then the equivalence class of x with respect to Ris the set

[x]R={yA| yRx}

In the case of the same birthday relation B, if p is any person,then the equivalence class of p

[p]B={qP | pBq} ={qP | q has the same birthday as p}

For example, if John was born on Aug. 10, [John]B= {q P | q was born on Aug.10}

The set of all equivalence classes of elements of A is called A modulo R and is denoted A/R:

A/R={[x]R | x A}We are going to prove that any equivalence relation R on Ainduces a partition of A and any partition of A gives rise to an equivalence relation.

Equivalence Relations and Partitions

Page 6: HIMLOG

Example:

A = {1,2,3,4,5,6,7}.Take R kongruesi relation modulo 3. R = {(1,1),(1,4),(1,7),(2,2),(2,5),(3,3),(4,1),(4,4), (4,7),(5,2),(5,5), (6,3),(6,6), (7,1),(7,4),(7,7)}[1]={X(1,x)R}={1,4,7}[2]={X(2,x)R}={2,5}[3]={X(3,x)R}={3,6}[4]={X(4,x)R}={1,4,7}[5]={X(5,x)R}={2,5}[6]={X(6,x)R}={3,6}[7]={X(7,x)R}={1,4,7}

That [1]=[4]=[7],[2]=[5] and [3]=[6], so only 3 different equivalent class.

Equivalence Relations and Partitions

Page 7: HIMLOG

Partial Ordering

Page 8: HIMLOG

Partial Order Relations

• A relation R on a set A is a partial order relation if– R is reflexive.– R is antisymmetric.– R is transitive.

• We use as the generic symbol for a partial order relation.

Partial Ordering

Page 9: HIMLOG

Antisymmetry

• A relation R on a set A is antisymmetric if for all a, b A,

(a, b) R and (b, a) R a = b.• This is equivalent to

(a, b) R and a b (b, a) R.

Partial Ordering

Page 10: HIMLOG

Examples: Antisymmetry

• The following relations are antisymmetric.– a b, on Z+.– A B, on (U).– x y, on R.– A B = A, on (U).– f(x)g(x) = f(x) on the set of all functions from R to R.

Partial Ordering

Page 11: HIMLOG

Examples: Partial Order Relations

• The following relations are partial order relations.– a b, on Z+.– A B, on (U).– x y, on R.

• Is the relation f(x)g(x) = f(x) on functions a partial order relation?

Partial Ordering

Page 12: HIMLOG

Example: Partial Order Relation

• Let F be the set of all functions f : R+ R+.• Let E be the set of equivalence classes [f] of F,

under the equivalence relation f ~ g if f(x) is (g(x)).

• Define on E by [f] [g] if f(x) is O(g(x)).

Partial Ordering

Page 13: HIMLOG

13

Reflexivity

• A relation is reflexive if every element is related to itself– Or, (a,a)R

• Examples of reflexive relations:– =, ≤, ≥

• Examples of relations that are not reflexive:– <, >

Page 14: HIMLOG

14

Antisymmetry

• A relation is antisymmetric if, for every (a,b)R, then (b,a)R is true only when a=b– Antisymmetry is not the opposite of symmetry

• Examples of antisymmetric relations:– =, ≤, ≥

• Examples of relations that are not antisymmetric:– <, >, isTwinOf()

Page 15: HIMLOG

15

Transitivity

• A relation is transitive if, for every (a,b)R and (b,c)R, then (a,c)R

• If a < b and b < c, then a < c– Thus, < is transitive

• If a = b and b = c, then a = c– Thus, = is transitive

Page 16: HIMLOG

N-Ary Relation

Page 17: HIMLOG

We can have relation between more than just 2 sets

A binary relation involves 2 sets and can be described by a set of pairsA ternary relation involves 3 sets and can be described by a set of triples…An n-ary relation involves n sets and can be described by a set of n-tuples

Relations are used to represent computer databases

n

domainsAAA

AAAaryn

AAA

n

n

n

isrelation theof degree The

relation theof theare ,,, sets The

product cartesian theofsubset a isrelation An

sets be ,,Let

21

21

2,1

Page 18: HIMLOG

cbacba

NNNR

such that ),,(

triplesof consisting on relation thebe Let

Note: N is the set of natural numbers {0,1,2,3,…}

An example

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

R)3,4,2(

Note: R could be considered as an extensional representation of the ternary relation a<b<c, assuming domains are finite and really quite small

The relation has degree 3

The domains of the relation are the set of natural numbers

Page 19: HIMLOG

)0()(such that ),,,(

tuples-4 of consisting on relation thebe Let

dcbadcbadcba

ZNZNR

Note: N is the set of natural numbers {0,1,2,3,…} Z is the set of integers {…,-2,-1,0,1,2,…}

The relation has degree 4R

R

R

)9,3,6,6(

)3,3,11,5(

)0,1,1,0(

Page 20: HIMLOG

Thank’sMakasih