{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Slide08 Relations - D iscrete Mathematics Discrete...

Info icon This preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Discrete Mathematics Discrete Mathematics (2009 Spring) Relations (Chapter 8, 5 hours) Chih-Wei Yi Dept. of Computer Science National Chiao Tung University May 25, 2009
Image of page 1

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

View Full Document Right Arrow Icon
Discrete Mathematics Chapter 8 Relations §8.1 Relations and Their Properties Binary Relations De°nition Let A and B be any two sets. A binary relation R from A to B , written R : A $ B , is a subset of A ° B . The notation aRb means ( a , b ) 2 R . If aRb , we may say ± a is related to b (by relation R )², or ± a relates to b (under relation R )². Example < : N $ N : ± f ( n , m ) j n < m g . a < b means ( a , b ) 2 < . A binary relation R corresponds to a predicate function P R : A ° B ! f T , F g de°ned over the 2 sets A and B .
Image of page 2
Discrete Mathematics Chapter 8 Relations §8.1 Relations and Their Properties Examples of Binary Relations Let A = f 0 , 1 , 2 g and B = f a , b g . Then R = f ( 0 , a ) , ( 0 , b ) , ( 1 , a ) , ( 2 , b ) g is a relation from A to B . For instance, we have 0 Ra , 0 Rb , etc.. Can we have visualized expressions of relations? Let A be the set of all cities, and let B be the set of the 50 states in the USA. De°ne the relation R by specifying that ( a , b ) belongs to R if city a is in state b . For instance, (Boulder,Colorado), (Bangor,Maine), (Ann Arbor,Michigan), (Middletown,New Jersey), (Middletown,New York), (Cupertino,California), and (Red Bank,New Jersey) are in R . ±eats² : ± f ( a , b ) j organism a eats food b g .
Image of page 3

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

View Full Document Right Arrow Icon
Discrete Mathematics Chapter 8 Relations §8.1 Relations and Their Properties Complementary Relations De°nition Let R : A $ B be any binary relation. Then, R : A $ B , the complement of R , is the binary relation de°ned by R : ± f ( a , b ) j ( a , b ) / 2 R g = ( A ° B ) ² R . Note this is just R if the universe of discourse is U = A ° B ; thus the name complement. The complement of R is R .
Image of page 4
Discrete Mathematics Chapter 8 Relations §8.1 Relations and Their Properties Inverse Relations De°nition Any binary relation R : A $ B has an inverse relation R ² 1 : B $ A , de°ned by R ² 1 : ± f ( b , a ) j ( a , b ) 2 R g . Examples 1 < ² 1 = f ( b , a ) j a < b g = f ( b , a ) j b > a g = > . 2 If R : People ! Foods is de°ned by " aRb , a eats b ", then bR ² 1 a , b is eaten by a .
Image of page 5

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

View Full Document Right Arrow Icon
Discrete Mathematics Chapter 8 Relations §8.1 Relations and Their Properties Examples Example Let A = f 1 , 2 , 3 , 4 , 5 g and R : A $ A : ± f ( a , b ) : a j b g . What are R and R ² 1 ? Solution R = ° ( 1 , 1 ) , ( 1 , 2 ) , ( 1 , 3 ) , ( 1 , 4 ) , ( 1 , 5 ) , ( 2 , 2 ) , ( 2 , 4 ) , ( 3 , 3 ) , ( 4 , 4 ) , ( 5 , 5 ) ±
Image of page 6
Discrete Mathematics Chapter 8 Relations §8.1 Relations and Their Properties Examples Example Let A = f 1 , 2 , 3 , 4 , 5 g and R : A $ A : ± f ( a , b ) : a j b g . What are R and R ² 1 ? Solution R = ° ( 1 , 1 ) , ( 1 , 2 ) , ( 1 , 3 ) , ( 1 , 4 ) , ( 1 , 5 ) , ( 2 , 2 ) , ( 2 , 4 ) , ( 3 , 3 ) , ( 4 , 4 ) , ( 5 , 5 ) ± R = 8 < : ( 2 , 1 ) , ( 2 , 3 ) , ( 2 , 5 ) , ( 3 , 1 ) , ( 3 , 2 ) , ( 3 , 4 ) , ( 3 , 5 ) , ( 4 , 1 ) , ( 4 , 2 ) , ( 4 , 3 ) , ( 4 , 5 ) , ( 5 , 1 ) , ( 5 , 2 ) , ( 5 , 3 ) , ( 5 , 4 ) 9 = ;
Image of page 7

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

View Full Document Right Arrow Icon
Discrete Mathematics Chapter 8 Relations §8.1 Relations and Their Properties Examples Example Let A = f 1 , 2 , 3 , 4 , 5 g and R : A $ A : ± f ( a , b ) : a j b g . What are R and R ² 1 ? Solution R = ° ( 1 , 1 ) , ( 1 , 2 ) , ( 1 , 3 ) , ( 1 , 4 ) , ( 1 , 5 ) , ( 2 , 2 ) , ( 2 , 4 ) , ( 3 , 3 ) , ( 4 , 4 ) , ( 5 , 5 ) ± R = 8 < : ( 2 , 1 ) , ( 2 , 3 ) , ( 2 , 5 ) , ( 3 , 1 ) , ( 3 , 2 ) , ( 3 , 4 ) , ( 3 , 5 ) , ( 4 , 1 ) , ( 4 , 2 ) , ( 4 , 3 ) , ( 4 , 5 ) , ( 5 , 1 ) , ( 5 , 2 ) , ( 5 , 3 ) , ( 5 , 4 ) 9 = ; R ² 1 = ° ( 1 , 1 ) , ( 2 , 1 ) , ( 3 , 1 ) , ( 4 , 1 ) , ( 5 , 1 ) , ( 2 , 2 ) , ( 4 , 2 ) , ( 3 , 3 ) , ( 4 , 4 ) , ( 5 , 5 ) ±
Image of page 8
Discrete Mathematics Chapter 8 Relations §8.1 Relations and Their Properties Combining Relations Since relations from A to B are subsets of A ° B , two relations from A to B can be combined through set operations.
Image of page 9

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

View Full Document Right Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern