Quick viewing(Text Mode)

Visualizing Relations Math 221, Discrete Structures a Relation Over B×B Is a Subset of the Ordered Pairs in B×B. If B Is A

Visualizing Relations Math 221, Discrete Structures a Relation Over B×B Is a Subset of the Ordered Pairs in B×B. If B Is A

Visualizing relations Math 221, Discrete Structures

ArelationoverB B is a of the ordered pairs in B B.IfB is a set of n elements then one way to visualize × × arelationiswithann n matrix of 1’s and 0’s, where a 1 in row i column j indicates that ordered pair i, j is in the subset, and a 0 indicates× that the ordered pair is not in the subset. ⟨ ⟩

For example, suppose B = w,x,y,z ,andρ is the defined as w,w , x,x , w,x , { } {⟨ ⟩ ⟨ ⟩ ⟨ ⟩ z,y .Thematrixontherightisthematrixrepresentationofrelationρ.Fromtopto 1100 ⟨ ⟩} bottom, the rows are for elements w, x, y,andz.Similarly,fromlefttoright,thecolumns ⎡0100⎤ 0000 are for elements w, x, y,andz.The1inthefirstrowandfirstcolumnrepresentstheordered ⎢ ⎥ ⎢0010⎥ pair w,w .The1inthefourthrowandthirdcolumnrepresentstheorderedpair z,y . ⎢ ⎥ ⟨ ⟩ ⟨ ⟩ ⎣ ⎦ The inverse relation –Theinverserelationρ 1 on B is defined as b,c ρ 1 c,b − ⟨ ⟩∈ − ≡⟨ ⟩∈ ρ,forallb: B.Intermsofthematrix,theρ 1 matrix is the mirror image about the 1000 − 1100 diagonal of the ρ matrix. The matrix on the right is for the relation that is the inverse of the ⎡ ⎤ 0001 relation above. Ordered pair x,w is in this relation because ordered pair w,x is in the ⎢ ⎥ ⟨ ⟩ ⟨ ⟩ ⎢0000⎥ original relation. ⎢ ⎥ ⎣ ⎦ 1000 The identity relation –Theidentityrelationi on B is defined as i = x: B : x,x . B B 0100 In terms of the matrix, the diagonal must contain all 1’s, and all off-diagonal{ entries⟨ must⟩} ⎡ ⎤ 0010 contain 0’s. ⎢ ⎥ ⎢0001⎥ ⎢ ⎥ ⎣ ⎦

Reflexive relations –Areflexiverelationρ is defined as ( b : b ρ b),or,alternativelyas 1 ___ ∀ _ __ i ρ. In terms of the matrix, the diagonal must contain all 1’s. Each underline entry _ in ⎡ 1 ⎤ B ⊆ __1 _ the matrix of the reflexive relation on the right represents either a one or a zero. ⎢ ⎥ ⎢___1⎥ ⎢ ⎥ ⎣ ⎦

Irreflexive relations –Anirreflexiverelationρ is defined as ( b : (b ρ b)) or, alterna- 0 ___ ∀ ¬ _ __ tively, as i ρ = /0 .Intermsofthematrix,thediagonalmustcontainall0’s.Itispossible ⎡ 0 ⎤ B ∩ __0 _ for a relation to be neither reflexive nor irreflexive. The first example is one such relation. ⎢ ⎥ ⎢___0⎥ ⎢ ⎥ ⎣ ⎦ Symmetric relations –Asymmetricrelationρ is defined as ( b,c : b ρ c c ρ b) or, 1 ∀ ≡ alternatively, as ρ− = ρ.Intermsofthematrix,itmustbesymmetricaboutthediagonal. _ 111 For example, in the matrix on the right the 1 in the first row, third column represents ordered ⎡1 _ 00⎤ pair w,y ,andthe1inthethirdrow,firstcolumnrepresentsorderedpair y,w .The0in 10_ 0 ⟨ ⟩ ⟨ ⟩ the second row, third column represents the absence of x,y ,andthe0inthethirdrow, ⎢100_⎥ ⟨ ⟩ ⎢ ⎥ second column represents the absence of y,x . ⎢ ⎥ ⟨ ⟩ ⎣ ⎦ Antisymmetric relations –Anantisymmetricrelationρ is defined as ( b,c : b ρ c 1 ∀ ∧ c ρ b b = c) or, alternatively, as ρ ρ− iB.Intermsofthematrix,thediagonal _ ⇒ ∩ ⊆ 111 elements can be either 0 or 1. If b ρ b is true, then both the antecedent and consequent are ⎡0 _ 00⎤ true, and so the implication is true. If b ρ b is false, then the antecedent is false, and so the 00_ 0 ⎢ ⎥ implication is true. For the off-diagonal elements, where b = c,youcannothavebothb ρ c ⎢001_⎥ ̸ ⎢ ⎥ and c ρ b.However,youcanhaveneither. ⎣ ⎦

1 Visualizing relations Math 221, Discrete Structures

Asymmetric relations –Anasymmetricrelationρ is defined as ( b,c : b ρ c (c ρ b)) ∀ ⇒¬ or, alternatively, as ρ ρ 1 = /0 .Intermsofthematrix,thediagonalelementsmustbe0. ∩ − 0111 If b ρ b were true, then the antecedent would be true and the consequent would be false, 0000 and so the implication would be false. For the off-diagonal elements, where b = c,ifyou ⎡ ⎤ ̸ 0000 have b ρ c you cannot have c ρ b.Likeanantisymmetricrelation,youcanhaveneither.An ⎢ ⎥ ⎢0010⎥ is an with the added restriction that the diagonal ⎢ ⎥ elements must be 0. ⎣ ⎦ Theorem –Ifarelationisasymmetric,thenitisantisymmetric. Informal proof : 1 If a relation is asymmetric then, by the alternative definition of an asymmetric relation, ρ ρ− = /0 .ByTheorem 1 ∩ (11.60) /0 S,anasymmetricrelationsatisfiesρ ρ− iB.Butthisisthealternativedefinitionofanantisym- metric relation.⊆ Therefore an asymmetric relation∩ is also⊆ antisymmetric.

Theorem –Arelationisasymmetricifandonlyifitisbothantisymmetricandirreflexive. Informal proof : The proof is by mutual implication. First, suppose the the relation is asymmetric. Then it is antisymmetric by the previous theorem. It is also irreflex- ive because the diagonal elements must be 0 as described in “Asymmetric relations” above. Second, suppose the relation is both antisymmetric and irreflexive. Then it must satisfy the alternative defini- tion of an asymmetric relation ρ ρ 1 = /0 .Therecanbenooff-diagonalelementsintheintersectionbecause ∩ − antisymmetry requires ρ ρ 1 i and there are no off-diagonal elements in i .Therecanbenoon-diagonal ∩ − ⊆ B B elements in the intersection because irreflexivity forbids b,b to be in the set of ordered pairs of ρ. ⟨ ⟩ Theorem –Ifarelationisirreflexiveandtransitive,thenitisasymmetric(andthereforeantisymmetric). Informal proof : Suppose b,c is in an irreflexive and , where b = c.Then, c,b cannot be in the relation and ⟨ ⟩ ̸ ⟨ ⟩ so the relation must be asymmetric. For if c,b were in the relation, then, because b,c is also in the relation, ⟨ ⟩ ⟨ ⟩ b,b would have to be in the relation by transitivity. But, that is impossible, because the relation is irreflexive. ⟨ ⟩

2