1 / 17

Fall 2014 COMP 2300 Discrete Structures for Computation

Chapter 8.1 Relations. Fall 2014 COMP 2300 Discrete Structures for Computation. Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University. Let A and B be sets. A relation R from A to B is a subset .

Download Presentation

Fall 2014 COMP 2300 Discrete Structures for Computation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 8.1 Relations Fall 2014COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and PhysicsNorth Carolina Central University

  2. Let A and B be sets. A relation R from A to B is a subset . • Given an ordered pair , x is related to y by R, written if and only if . The set A is called the domain of R and the set B is called its co-domain. • Ex. Relation (from Chap 1.3)

  3. Define a relation L from R to R as follows: For all real numbers x and y, • Is • Is • Is • Is Less-than Relation for Real Numbers

  4. Define a relation L from R to R as follows: For all real numbers x and y, • Is No, since 57 > 53. • Is Yes, since -17 < -14. • Is No, since 143 = 143. • Is Yes, since -35 < 1. Less-than Relation for Real Numbers

  5. Define a relation L from R to R as follows: For all real numbers x and y, • Draw the graph of L as a subset of the Cartesian plane Less-than Relation for Real Numbers

  6. Define a relation L from R to R as follows: For all real numbers x and y, • Draw the graph of L as a subset of the Cartesian plane A: For each value of x, all the points (x, y) with y>x are on the graph. So the graph consists of all the points above the line x = y. Less-than Relation for Real Numbers

  7. Let X={a, b, c}. Then, Define a relation S from P(X)to Z as follows: For all sets A and B in P(X) (i.e., for all subsets A and B of X), • Is • Is • Is • Is A Relation on a Power Set

  8. Let X={a, b, c}. Then, Define a relation S from P(X)to Z as follows: For all sets A and B in P(X) (i.e., for all subsets A and B of X), • Is Yes, both sets have two elements. • Is Yes, has one element and has zero elements, and • Is No, {b, c} has two elements and {a, b, c} has three elements and 2 < 3. • Is Yes, both sets have one element. A Relation on a Power Set

  9. Let R be a relation from A to B. Define the inverse relation from B to A as follows: • The definition can be written operationally as follows: The Inverse of a Relation

  10. Let A = {2, 3, 4} and B = {2, 6, 8} and let R be the “divides” relation from A to B: For all • State explicitly which ordered pairs are in and , and draw arrow diagrams for and . • Describe in words. The Inverse of a Finite Relation

  11. Let A = {2, 3, 4} and B = {2, 6, 8} and let R be the “divides” relation from A to B: For all • State explicitly which ordered pairs are in and , and draw arrow diagrams for and . 2 2 2 2 2 2 The Inverse of a Finite Relation 3 3 6 6 6 3 4 4 8 8 8 4

  12. Let A = {2, 3, 4} and B = {2, 6, 8} and let R be the “divides” relation from A to B: For all • Describe in words. For all , The Inverse of a Finite Relation

  13. Define a relation R from R to R as follows: For allDraw the graphs of and in the Cartesian plane. Is a function? The Inverse of an Infinite Relation

  14. A relation on a set Ais a relation from A to A. • Let A = {3, 4, 5, 6, 7, 8} and define a relation R on A as follows: For all Directed Graph of Relation

  15. A more formal way to refer to the kind of relation defined in Section 1.3 is to call it a binary relation because it is a subset of a Cartesian product of two sets. • An n-ary relation to be a subset of a Cartesian product of n sets, where n is any integer grater than or equal to two. n-ary Relation

  16. A more formal way to refer to the kind of relation defined in Section 1.3 is to call it a binary relation because it is a subset of a Cartesian product of two sets. • Roughly, an n-ary relation to be a subset of a Cartesian product of n sets, where n is any integer greater than or equal to two. n-ary Relation

  17. Given sets , an n-ary relation R on is a subset of . The special cases of 2-ary, 3-ary, and 4-ary relations are called binary, ternary, and quaternary relations, respectively. • Example: Patient Database at a Hospital • (Patient_ID, Patient_Name, Admission_Date, Diagnosis) • (011985, John Schmidt, 020710, asthema) • (574329, Tak Kurosawa, 0114910, penumonia) n-ary Relations and Relational Databases

More Related