Unit 7 - Relations

Unit 7 - Relations - Relations Definitions & Notation A...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Relations – A binary relation from A to B is a subset of A x B – A binary relation on A is a subset of A x A – A binary relation is defined by Enumerating elements Relations definition: x r y x + y is odd – Binary relations can be one-to-one one-to-many many-to-one many-to-many – An n-ary relation on S 1 ,S 2 ,…,S n is a subset of S 1 x S 2 x S 3 x … x S n S i are called the domains n is called the degree – Let r be a binary relation on set S Property Definition reflexive x(x S (x,x) r) symmetric x y(x S y S (x,y) r (y,x) r) transitive x y z(x S y S z S (x,y) r (y,z) r (x,z) r) antisymmetric x y(x S y S (x,y) r (y,x) r x = y) Don’t confuse antisymmetric with “not symmetric”! Likewise irreflexive and “not reflexive” Properties of Relations
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 – Closure Definition: A binary relation r * on a set S is the closure of a relation r on S with respect to property p if r * has property p r r * r * is a subset of every other relation on S that includes r and has property p . – Composite Definition: Let r be a relation from A to B and s be a relation from B to C . The composite ( r ° s ) is the relation consisting of ordered pairs ( a,c ) where a A , c C , and for which there exists an element b B such that ( a,b ) r and ( b,c ) s . Definition: Let r be a relation on set A . The powers r n , n = 1,2, … are define recursively by r 1 = r r i+1 = r i ° r Relations built from Relations – Example: Let r be the relation on the set of all people in the world that contains ( a , b ) if a has met b . What is r n ? Those pairs ( a , b ) such that there are people x 1 ,x 2 ,…,x n-1 such that a has met x 1 , x 1 has met x 2 , …, and x n-1 has met b . What is r *? Those pairs ( a,b ) such that there is a sequence of people, starting with a and ending with b , in which each person in the sequence has met the next person in the sequence. Who cares? Wait for graphs! What is the difference? Relations built from Relations Partial Ordering Definition: A relation r on a set S is a partial ordering if it is reflexive, antisymmetric, and transitive. ( S
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/19/2008 for the course CS 250 taught by Professor Michaelr.wick during the Spring '08 term at Wisc Eau Claire.

Page1 / 6

Unit 7 - Relations - Relations Definitions & Notation A...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online