Discrete structure
This presentation is the property of its rightful owner.
Sponsored Links
1 / 18

Discrete Structure PowerPoint PPT Presentation


  • 43 Views
  • Uploaded on
  • Presentation posted in: General

Discrete Structure. Li Tak Sing( 李德成 ). Chapter 4 Properties of Binary Relations. Three special properties For a binary relation R on a set A, we have the following definitions. R is reflexive if xRx for all x A. R is symmetric if xRy implies yRx for all x,y A

Download Presentation

Discrete Structure

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Discrete structure

Discrete Structure

Li Tak Sing(李德成)


Chapter 4 properties of binary relations

Chapter 4Properties of Binary Relations

  • Three special properties

    • For a binary relation R on a set A, we have the following definitions.

      • R is reflexive if xRx for all xA.

      • R is symmetric if xRy implies yRx for all x,y A

      • R is transitive if xRy and yRz implies xRz for all x,y,z A


Two opposite properties

Two opposite properties

  • For a binary relation R on a set A, we have the following definitions.

    • R is irreflexive if (x,x)R for all xA.

    • R is antisymmetric if xRy and yRx implies x=y for all x,yA.


Example

Example

  • R is a binary relation on N

  • aRb if (a+b) mod 2 = 0

  • R is reflexive because (a+a) mod 2 =0 for all a N

  • R is symmetric because if aRb, then (a+b) mod 2 = 0, then (b+a) mod 2 =0, then bRa

  • R is transitive, because if aRb and bRc, then (a+b) mod 2 =0 and (b+c) mod 2 =0, then (a+2b+c) mod 2 =0, then (a+c) mod 2 =0, then aRc


Example1

Example

  • Give examples of binary relations over the set {a,b,c,d} with the stated properties:

    • Reflexive and not symmetric and not transitive

    • Symmetric and not reflexive and not transitive

    • transitive and not reflexive and not symmetric


Composition of relations

Composition of relations

  • If R and S are binary relations, then the composition of R and S, which we denote by RS, is the following relation:RS={(a,c)|(a,b)R and (b,c) S for some element b}


More examples

More examples

  • For each of the following binary relations state which of the three properties, reflexive, symmetric and transitive are satisfied.

    • xRy iff |x-y| is odd, over the integers.

    • xRy iff x is a parent of y, over the set of people.


Grandparents

Grandparents

  • Given the isParentOf relation. So a isParentOf b represents the fact that a is the parent of b.

  • isGrandparentOf can then be defined in terms of isParentOf.isGrandparentOf=isParentOfisParentOf

  • So a isGrandparentOf b if there is c so that a isParentOf c and c isPrentOf b.


More examples1

More examples

  • Given the following binary relations over {a,b,c,d}.R={(a,a),(a,c),(b,a),(b,d),(c,b)}S={(a,b),(a,c),(c,b),(d,c)}

    • Find RS

    • Find SR


Representations

Representations

  • If R is a binary relation on A, then we'll denote the composition of R with itself n times by writingRn.

  • For example,

    • isGrandparentOf=isParentOf2

    • isGreatGrandParentOf=isParentOf3


Inheritance properties

Inheritance properties

  • If R is reflexive, then Rn is reflexive.

  • If R is symmetric, then Rn is symmetric.

  • If R is transitive, then Rn is transitive.


Example2

Example

  • Let R={(x,y)ZZ|x+y is odd}. We want to find out R2 and R3.


Closures

Closures

  • If R is a binary relation and p is some property, then the p closure of R is the smallest binary relation containing R that satisfies property p.


Reflexive closure

Reflexive closure

  • A reflexive closure of R is the smallest reflexive relation that contains R.

  • A reflexive closure of R is denoted as r(R)

  • R is a relation over {a,b,c} and R={(a,b),(b,c)}Then, r(R)={(a,a),(b,b),(c,c),(a,b),(b,c)}


Symmetric closure

Symmetric closure

  • A symmetric closure of R is the smallest symmetric relation that contains R.

  • A symmetric closure of R is denoted as s(R)

  • R={(a,b),(b,c)}, s(R)={(a,b),(b,a),(b,c),(c,b)}


Transitive closure

Transitive closure

  • A transitive closure of R is the smallest transitive relation that contains R. It is denoted as t(R).

  • R= ={(a,b),(b,c)}, then t(R)= {(a,b),(b,c),(a,c)}


Constructing closures

Constructing Closures

  • If R is a binary relation over a set A, then:

    • r(R)=RRo (Ro is the equality relation)

    • s(R)=R Rc (Rc is the converse relation)

    • t(R)=R R2 R3 R4....

    • If A is finite with n elements, then t(R)= R R2 R3 R4.... Rn


Example3

Example

  • Given the set A={a,b,c,d}. Draw a directed graph to represent the indicated closure for each of the following binary relations over A.

    • r(R), where R={(a,d)}

    • s(R) where R={(a,b), (c,d)}

    • t(R) where R={(a,b),(d,a),(d,c),(c,b)}


  • Login