discrete structure
Download
Skip this Video
Download Presentation
Discrete Structure

Loading in 2 Seconds...

play fullscreen
1 / 18

Discrete Structure - PowerPoint PPT Presentation


  • 94 Views
  • Uploaded on

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

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Discrete Structure' - kimi


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 writing Rn.
  • 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)}
ad