SlideShare uma empresa Scribd logo
1 de 17
Baixar para ler offline
Relations, Functions, and Matrices




                    Mathematical
                    Structures for
                  Computer Science
                               Chapter 4




    Section 4.1 © 2006 W.H. Freeman & Co.
     Copyright                               
   MSCS Slides
                                                         Relations   Relations, Functions and Matrices
Monday, March 22, 2010
Binary Relations
      ●   Certain ordered pairs of objects have relationships.
      ● The notation x ρ y implies that the ordered pair (x, y) satisfies the

          relationship ρ.
      ● Say S = {1, 2, 4}, then the Cartesian product of set S with itself is:

      	

 S × S = {(1,1), (1,2), (1,4), (2,1), (2,2), (2,4), (4,1), (4,2), (4,4)}
      ● Then the subset of S × S satisfying the relation x ρ y ↔ x = 1/2y, is:

          	

  	

     	

       {(1, 2), (2, 4)}
      ● DEFINITION: BINARY RELATION on a set S Given a set S, a

          binary relation on S is a subset of S × S (a set of ordered pairs of
          elements of S).
      ● A binary relation is always a subset with the property that:

      	

 	

  	

     	

       x ρ y ↔ (x, y) ∈ ρ
      ● What is the set where ρ on S is defined by x ρ y ↔ x + y is odd

          where S = {1, 2}?
             ■    The set for ρ is {(1,2), (2,1)}.
    Section 4.1                                      Relations                 2
Monday, March 22, 2010
Relations on Multiple Sets
        ●     DEFINITION: RELATIONS ON MULTIPLE SETS
              Given two sets S and T, a binary relation from S to T
              is a subset of S × T. Given n sets S1, S2, …., Sn for n >
              2, an n-ary relation on S1 × S2 × … × Sn is a subset of
              S1 × S2 × … × Sn.

        ●     S = {1, 2, 3} and T = {2, 4, 7}.
        ●     Then x ρ y ↔ x = y/2 is the set {(1,2), (2,4)}.
        ●     S = {2, 4, 6, 8} and T = {2, 3, 4, 6, 7}.
        ●     What is the set that satisfies the relation x ρ y ↔ x = (y
              + 2)/2.



    Section 4.1                           Relations                   3
Monday, March 22, 2010
Relations on Multiple Sets
        ●     DEFINITION: RELATIONS ON MULTIPLE SETS
              Given two sets S and T, a binary relation from S to T
              is a subset of S × T. Given n sets S1, S2, …., Sn for n >
              2, an n-ary relation on S1 × S2 × … × Sn is a subset of
              S1 × S2 × … × Sn.

        ●    S = {1, 2, 3} and T = {2, 4, 7}.
        ●    Then x ρ y ↔ x = y/2 is the set {(1,2), (2,4)}.
        ●    S = {2, 4, 6, 8} and T = {2, 3, 4, 6, 7}.
        ●    What is the set that satisfies the relation x ρ y ↔ x = (y
             + 2)/2.
        ●    The set is {(2,2), (4,6)}.


    Section 4.1                          Relations                    3
Monday, March 22, 2010
Types of Relationships
        ●     One-to-one: If each first component and each second component only appear
              once in the relation.
        ●     One-to-many: If a first component is paired with more than one second
              component.
        ●     Many-to-one: If a second component is paired with more than one first
              component.
        ●     Many-to-many: If at least one first component is paired with more than one
              second component and at least one second component is paired with more than
              one first component.




    Section 4.1                                   Relations                              4
Monday, March 22, 2010
Relationships: Examples
        ●     If S = {2, 5, 7, 9}, then identify the types of the
              following relationships:

        	

 {(5,2), (7,5), (9,2)}	

    	

               many-to-one
        	

 {(2,5), (5,7), (7,2)}	

    	

               one-to-one
        	

 {(7,9), (2,5), (9,9), (2,7)}	

               many-to-many




    Section 4.1                               Relations                  5
Monday, March 22, 2010
Properties of Relationships
        ●     DEFINITION: REFLEXIVE, SYMMETRIC, AND TRANSITIVE
              RELATIONS Let ρ be a binary relation on a set S. Then:
                    ■   ρ is reflexive means (∀x) (x∈S → (x,x)∈ρ)
                    ■   ρ is symmetric means:
        	

   	

        (∀x)(∀y) (x∈S Λ y∈S Λ (x,y) ∈ ρ → (y,x)∈ ρ)
                    ■   ρ is transitive means:
                        (∀x)(∀y)(∀z) (x∈S Λ y∈S Λ z∈S Λ (x,y)∈ρ Λ (y,z)∈ρ → (x,z)∈ρ)
                    ■    ρ is antisymmetric means:
        	

   	

   (∀x)(∀y) (x∈S Λ y∈S Λ (x,y) ∈ ρ Λ (y,x)∈ ρ → x = y)
        ●     Example: Consider the relation ≤ on the set of natural numbers N.
        ●     Is it reflexive? Yes, since for every nonnegative integer x, x ≤ x.
        ●     Is it symmetric? No, since x ≤ y doesn’t imply y ≤ x.
        ●     If this was the case, then x = y. This property is called antisymmetric.
        ●     Is it transitive? Yes, since if x ≤ y and y ≤ z, then x ≤ z.

    Section 4.1                                     Relations                          6
Monday, March 22, 2010
Closures of Relations
        ●         DEFINITION: CLOSURE OF A RELATION A binary relation ρ*
                  on set S is the closure of a relation ρ on S with respect to
                  property P if:
                  1.    ρ* has the property P
                  !     ρ ⊆ ρ*
                  !     ρ* is a subset of any other relation on S that includes ρ and has the
                        property P
        ●         Example: Let S = {1, 2, 3} and ρ = {(1,1), (1,2), (1,3), (3,1),
                  (2,3)}.
                  ■
                        This is not reflexive, transitive or symmetric.
                  ■     The closure of ρ with respect to reflexivity is {(1,1),(1,2),(1,3),
                        (3,1), (2,3), (2,2), (3,3)} and it contains ρ.
                  ■     The closure of ρ with respect to symmetry is
                  	

   {(1,1), (1,2), (1,3), (3,1), (2,3), (2,1), (3,2)}.
                  ■     The closure of ρ with respect to transitivity is
                  	

   {(1,1), (1,2), (1,3), (3,1), (2,3), (3,2), (3,3), (2,1), (2,2)}.
    Section 4.1                                        Relations                             7
Monday, March 22, 2010
Exercise: Closures of Relations
        ●     Find the reflexive, symmetric and transitive closure of
              the relation {(a,a), (b,b), (c,c), (a,c), (a,d), (b,d), (c,a),
              (d,a)} on the set S = {a, b, c, d}




    Section 4.1                             Relations                          8
Monday, March 22, 2010
Partial Ordering and Equivalence Relations

        ●     DEFINITION: PARTIAL ORDERING A binary relation on a
              set S that is reflexive, antisymmetric, and transitive is called a
              partial ordering on S.
        ●     If is a partial ordering on S, then the ordered pair (S,ρ) is called
              a partially ordered set (also known as a poset).
        ●     Denote an arbitrary, partially ordered set by (S, ≤); in any
              particular case, ≤ has some definite meaning such as “less than
              or equal to,” “is a subset of,” “divides,” and so on.
        ●     Examples:
                  ■   On N, x ρ y ↔ x ≤ y.
                  ■   On {0,1}, x ρ y ↔ x = y2 ⇒ ρ = {(0,0), (1,1)}.




    Section 4.1                                     Relations                        9
Monday, March 22, 2010
Hasse Diagram
        ●     Hasse Diagram: A diagram used to visually depict a
              partially ordered set if S is finite.
                  ■
                      Each of the elements of S is represented by a dot, called
                      a node, or vertex, of the diagram.
                  ■
                      If x is an immediate predecessor of y, then the node for
                      y is placed above the node for x and the two nodes are
                      connected by a straight-line segment.
                  ■
                      Example: Given the partial ordering on a set S = {a, b,
                      c, d, e, f} as {(a,a), (b,b), (c,c), (d,d), (e,e), (f, f), (a, b),
                      (a,c), (a,d), (a,e), (d,e)}, the Hasse diagram is:




    Section 4.1                                     Relations                          10
Monday, March 22, 2010
Equivalence Relation
        ●     DEFINITION: EQUIVALENCE RELATION A
              binary relation on a set S that is reflexive, symmetric,
              and transitive is called an equivalence relation on S.
        ●     Examples:
                  ■   On N, x ρ y ↔ x + y is even.
                  ■   On {1, 2, 3}, ρ = {(1,1), (2,2), (3,3), (1,2), (2,1)}.




    Section 4.1                                   Relations                    11
Monday, March 22, 2010
Partitioning a Set
        ●    DEFINITION: PARTITION OF A SET It is a collection of
             nonempty disjoint subsets of S whose union equals S.




        ●    For ρ an equivalence relation on set S and x ∈ S, then [x] is the
             set of all members of S to which x is related, called the
             equivalence class of x. Thus:
                    	

    	

     	

      [x] = {y | y ∈ S Λ x ρ y}
        ●    Hence, for ρ = {(a,a), (b,b), (c,c), (a,c), (c,a)}
                    	

    	

     	

      [a] = {a, c} = [c]

    Section 4.1                               Relations                          12
Monday, March 22, 2010
Congruence Modulo n
        ●     DEFINITION: CONGRUENCE MODULO n For
              integers x and y and positive integer n, x = y(mod n) if
              x−y is an integral multiple of n.
        ●     This binary relation is always an equivalence relation
        ●     Congruence modulo 4 is an equivalence relation on Z.
              Construct the equivalence classes [0], [1], [2], and [3].
        ●     Note that [0], for example, will contain all integers
              differing from 0 by a multiple of 4, such as 4, 8, 12,
              and so on. The distinct equivalence classes are:
                  ■
                      [0] = {... , 8, 4, 0, 4, 8,...}
                  ■
                      [1] = {... , 7, 3, 1, 5, 9,...}
                  ■
                      [2] = {... , 6, 2, 2, 6, 10,...}
                  ■
                      [3] = {... , 5, 1, 3, 7, 11,...}

    Section 4.1                                      Relations        13
Monday, March 22, 2010
Partial Ordering and Equivalence Relations




    Section 4.1                          Relations              14
Monday, March 22, 2010
Exercises

        1. Which of the following ordered pairs belongs to the binary
                  relation ρ on N?
                  ■   x ρ y ↔ x + y < 7; 	

       	

                  (1,3), (2,5), (3,3), (4,4)
                  ■   x ρ y ↔ 2x + 3y = 10; 	

       	

               (5,0), (2,2), (3,1), (1,3)
        2. Show the region on the Cartesian plane such that for a binary
                  relation ρ on R:
                  ■   x ρ y ↔ x2 + y2 ≤ 25
                  ■   xρy↔x≥y
        3. Identify each relation on N as one-to-one, one-to-many, many-
                  to-one or many-to-many:
                  ■   ρ = {(12,5), (8,4), (6,3), (7,12)}
                  ■   ρ = {(2,7), (8,4), (2,5), (7,6), (10,1)}
                  ■   ρ = {(1,2), (1,4), (1,6), (2,3), (4,3)}



    Section 4.1                                             Relations                                15
Monday, March 22, 2010
Exercises

        4.        S = {0, 1, 2, 4, 6}. Which of the following relations are
                  reflexive, symmetric, antisymmetric, and transitive. Find the
                  closures for each category for all of them:
                     ρ = {(0,0), (1,1), (2,2), (4,4), (6,6), (0,1), (1,2), (2,4), (4,6)}
                     ρ = {(0,0), (1,1), (2,2), (4,4), (6,6), (4,6), (6,4)}
                     ρ = {(0,1), (1,0), (2,4), (4,2), (4,6), (6,4)}
        5.        For the relation {(1,1), (2,2), (1,2), (2,1), (1,3), (3,1), (3,2),
                  (2,3), (3,3), (4,4), (5,5), (4,5), (5,4)}
                  ■
                      What is [3] and [4]?




    Section 4.1                                        Relations                            16
Monday, March 22, 2010

Mais conteúdo relacionado

Mais procurados

Chapter 1: First-Order Ordinary Differential Equations/Slides
Chapter 1: First-Order Ordinary Differential Equations/Slides Chapter 1: First-Order Ordinary Differential Equations/Slides
Chapter 1: First-Order Ordinary Differential Equations/Slides Chaimae Baroudi
 
PhD thesis presentation of Nguyen Bich Van
PhD thesis presentation of Nguyen Bich VanPhD thesis presentation of Nguyen Bich Van
PhD thesis presentation of Nguyen Bich VanNguyen Bich Van
 
Scse 1793 Differential Equation lecture 1
Scse 1793 Differential Equation lecture 1Scse 1793 Differential Equation lecture 1
Scse 1793 Differential Equation lecture 1Fairul Izwan Muzamuddin
 
Solving systems of equations algebraically 2
Solving systems of equations algebraically 2Solving systems of equations algebraically 2
Solving systems of equations algebraically 2Anthony_Maiorano
 
11.solution of a singular class of boundary value problems by variation itera...
11.solution of a singular class of boundary value problems by variation itera...11.solution of a singular class of boundary value problems by variation itera...
11.solution of a singular class of boundary value problems by variation itera...Alexander Decker
 
Power Series - Legendre Polynomial - Bessel's Equation
Power Series - Legendre Polynomial - Bessel's EquationPower Series - Legendre Polynomial - Bessel's Equation
Power Series - Legendre Polynomial - Bessel's EquationArijitDhali
 
OrthogonalFunctionsPaper
OrthogonalFunctionsPaperOrthogonalFunctionsPaper
OrthogonalFunctionsPaperTyler Otto
 
Solution of a singular class of boundary value problems by variation iteratio...
Solution of a singular class of boundary value problems by variation iteratio...Solution of a singular class of boundary value problems by variation iteratio...
Solution of a singular class of boundary value problems by variation iteratio...Alexander Decker
 
Probability and statistics - Discrete Random Variables and Probability Distri...
Probability and statistics - Discrete Random Variables and Probability Distri...Probability and statistics - Discrete Random Variables and Probability Distri...
Probability and statistics - Discrete Random Variables and Probability Distri...Asma CHERIF
 
Recurrence relations
Recurrence relationsRecurrence relations
Recurrence relationsIIUM
 

Mais procurados (19)

Chapter 1: First-Order Ordinary Differential Equations/Slides
Chapter 1: First-Order Ordinary Differential Equations/Slides Chapter 1: First-Order Ordinary Differential Equations/Slides
Chapter 1: First-Order Ordinary Differential Equations/Slides
 
MT102 Лекц 12
MT102 Лекц 12MT102 Лекц 12
MT102 Лекц 12
 
PhD thesis presentation of Nguyen Bich Van
PhD thesis presentation of Nguyen Bich VanPhD thesis presentation of Nguyen Bich Van
PhD thesis presentation of Nguyen Bich Van
 
Scse 1793 Differential Equation lecture 1
Scse 1793 Differential Equation lecture 1Scse 1793 Differential Equation lecture 1
Scse 1793 Differential Equation lecture 1
 
Solving systems of equations algebraically 2
Solving systems of equations algebraically 2Solving systems of equations algebraically 2
Solving systems of equations algebraically 2
 
11.solution of a singular class of boundary value problems by variation itera...
11.solution of a singular class of boundary value problems by variation itera...11.solution of a singular class of boundary value problems by variation itera...
11.solution of a singular class of boundary value problems by variation itera...
 
MT102 Лекц 9
MT102 Лекц 9MT102 Лекц 9
MT102 Лекц 9
 
21 3 ztransform
21 3 ztransform21 3 ztransform
21 3 ztransform
 
MT102 Лекц 11
MT102 Лекц 11MT102 Лекц 11
MT102 Лекц 11
 
Power Series - Legendre Polynomial - Bessel's Equation
Power Series - Legendre Polynomial - Bessel's EquationPower Series - Legendre Polynomial - Bessel's Equation
Power Series - Legendre Polynomial - Bessel's Equation
 
160280102051 c3 aem
160280102051 c3 aem160280102051 c3 aem
160280102051 c3 aem
 
OrthogonalFunctionsPaper
OrthogonalFunctionsPaperOrthogonalFunctionsPaper
OrthogonalFunctionsPaper
 
MT102 Лекц 13
MT102 Лекц 13MT102 Лекц 13
MT102 Лекц 13
 
Solution of a singular class of boundary value problems by variation iteratio...
Solution of a singular class of boundary value problems by variation iteratio...Solution of a singular class of boundary value problems by variation iteratio...
Solution of a singular class of boundary value problems by variation iteratio...
 
MT102 Лекц 15
MT102 Лекц 15MT102 Лекц 15
MT102 Лекц 15
 
Probability and statistics - Discrete Random Variables and Probability Distri...
Probability and statistics - Discrete Random Variables and Probability Distri...Probability and statistics - Discrete Random Variables and Probability Distri...
Probability and statistics - Discrete Random Variables and Probability Distri...
 
MT102 Лекц 16
MT102 Лекц 16MT102 Лекц 16
MT102 Лекц 16
 
MT102 Лекц-2
MT102 Лекц-2MT102 Лекц-2
MT102 Лекц-2
 
Recurrence relations
Recurrence relationsRecurrence relations
Recurrence relations
 

Destaque

Destaque (7)

CPSC 125 Ch 4 Sec 5
CPSC 125 Ch 4 Sec 5CPSC 125 Ch 4 Sec 5
CPSC 125 Ch 4 Sec 5
 
Computer science-and-information-technology
Computer science-and-information-technologyComputer science-and-information-technology
Computer science-and-information-technology
 
Lecture 06
Lecture 06Lecture 06
Lecture 06
 
Cpsc125 Ch4 Sec4
Cpsc125 Ch4 Sec4Cpsc125 Ch4 Sec4
Cpsc125 Ch4 Sec4
 
CPSC 125 Ch 4 Sec 4
CPSC 125 Ch 4 Sec 4CPSC 125 Ch 4 Sec 4
CPSC 125 Ch 4 Sec 4
 
Computer security
Computer security Computer security
Computer security
 
CPSC 125 Ch 3 Sec 3
CPSC 125 Ch 3 Sec 3CPSC 125 Ch 3 Sec 3
CPSC 125 Ch 3 Sec 3
 

Semelhante a Cpsc125 Ch4 Sec1

CPSC 125 Ch 3 Sec 1
CPSC 125 Ch 3 Sec 1CPSC 125 Ch 3 Sec 1
CPSC 125 Ch 3 Sec 1David Wood
 
Functions And Relations
Functions And RelationsFunctions And Relations
Functions And Relationsandrewhickson
 
Relation in Discrete Mathematics
Relation in Discrete Mathematics Relation in Discrete Mathematics
Relation in Discrete Mathematics NANDINI SHARMA
 
CPSC 125 Ch 2 Sec 5
CPSC 125 Ch 2 Sec 5CPSC 125 Ch 2 Sec 5
CPSC 125 Ch 2 Sec 5David Wood
 
Chapter 2: Relations
Chapter 2: RelationsChapter 2: Relations
Chapter 2: Relationsnszakir
 
Function and Relation.pdf
Function and Relation.pdfFunction and Relation.pdf
Function and Relation.pdfAngelaClarito1
 
Common Fixed Point Theorems in Compatible Mappings of Type (P*) of Generalize...
Common Fixed Point Theorems in Compatible Mappings of Type (P*) of Generalize...Common Fixed Point Theorems in Compatible Mappings of Type (P*) of Generalize...
Common Fixed Point Theorems in Compatible Mappings of Type (P*) of Generalize...mathsjournal
 
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...mathsjournal
 
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...mathsjournal
 
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...mathsjournal
 
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...mathsjournal
 
Distributionworkshop 2.pptx
Distributionworkshop 2.pptxDistributionworkshop 2.pptx
Distributionworkshop 2.pptxnagalakshmig4
 
A unique common fixed point theorem for four
A unique common fixed point theorem for fourA unique common fixed point theorem for four
A unique common fixed point theorem for fourAlexander Decker
 

Semelhante a Cpsc125 Ch4 Sec1 (20)

Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...
Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...
Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...
 
CPSC 125 Ch 3 Sec 1
CPSC 125 Ch 3 Sec 1CPSC 125 Ch 3 Sec 1
CPSC 125 Ch 3 Sec 1
 
Functions And Relations
Functions And RelationsFunctions And Relations
Functions And Relations
 
Properties of relations
Properties of relationsProperties of relations
Properties of relations
 
Relation in Discrete Mathematics
Relation in Discrete Mathematics Relation in Discrete Mathematics
Relation in Discrete Mathematics
 
CPSC 125 Ch 2 Sec 5
CPSC 125 Ch 2 Sec 5CPSC 125 Ch 2 Sec 5
CPSC 125 Ch 2 Sec 5
 
Chapter 2: Relations
Chapter 2: RelationsChapter 2: Relations
Chapter 2: Relations
 
Relations
RelationsRelations
Relations
 
Function and Relation.pdf
Function and Relation.pdfFunction and Relation.pdf
Function and Relation.pdf
 
Common Fixed Point Theorems in Compatible Mappings of Type (P*) of Generalize...
Common Fixed Point Theorems in Compatible Mappings of Type (P*) of Generalize...Common Fixed Point Theorems in Compatible Mappings of Type (P*) of Generalize...
Common Fixed Point Theorems in Compatible Mappings of Type (P*) of Generalize...
 
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
 
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
 
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
 
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
 
Sadat sumon
Sadat sumonSadat sumon
Sadat sumon
 
Distributionworkshop 2.pptx
Distributionworkshop 2.pptxDistributionworkshop 2.pptx
Distributionworkshop 2.pptx
 
fuzzy set
fuzzy setfuzzy set
fuzzy set
 
A unique common fixed point theorem for four
A unique common fixed point theorem for fourA unique common fixed point theorem for four
A unique common fixed point theorem for four
 
Relations
RelationsRelations
Relations
 
Relations
RelationsRelations
Relations
 

Mais de David Wood

Internet of Things (IoT) two-factor authentication using blockchain
Internet of Things (IoT) two-factor authentication using blockchainInternet of Things (IoT) two-factor authentication using blockchain
Internet of Things (IoT) two-factor authentication using blockchainDavid Wood
 
Returning to Online Privacy?
Returning to Online Privacy?Returning to Online Privacy?
Returning to Online Privacy?David Wood
 
Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...
Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...
Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...David Wood
 
BlockSW 2019 Keynote
BlockSW 2019 KeynoteBlockSW 2019 Keynote
BlockSW 2019 KeynoteDavid Wood
 
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221David Wood
 
Privacy in the Smart City
Privacy in the Smart CityPrivacy in the Smart City
Privacy in the Smart CityDavid Wood
 
Controlling Complexities in Software Development
Controlling Complexities in Software DevelopmentControlling Complexities in Software Development
Controlling Complexities in Software DevelopmentDavid Wood
 
Privacy Concerns related to Verifiable Claims
Privacy Concerns related to Verifiable ClaimsPrivacy Concerns related to Verifiable Claims
Privacy Concerns related to Verifiable ClaimsDavid Wood
 
Implementing the Verifiable Claims data model
Implementing the Verifiable Claims data modelImplementing the Verifiable Claims data model
Implementing the Verifiable Claims data modelDavid Wood
 
So You Wanna be a Startup CTO 20170301
So You Wanna be a Startup CTO 20170301So You Wanna be a Startup CTO 20170301
So You Wanna be a Startup CTO 20170301David Wood
 
Functional manipulations of large data graphs 20160601
Functional manipulations of large data graphs 20160601Functional manipulations of large data graphs 20160601
Functional manipulations of large data graphs 20160601David Wood
 
When Metaphors Kill
When Metaphors KillWhen Metaphors Kill
When Metaphors KillDavid Wood
 
Secularism in Australia
Secularism in AustraliaSecularism in Australia
Secularism in AustraliaDavid Wood
 
Meditations on Writing in Paradoxes, Oxymorons, and Pleonasms
Meditations on Writing in Paradoxes, Oxymorons, and PleonasmsMeditations on Writing in Paradoxes, Oxymorons, and Pleonasms
Meditations on Writing in Paradoxes, Oxymorons, and PleonasmsDavid Wood
 
Building a writer's platform with social media
Building a writer's platform with social mediaBuilding a writer's platform with social media
Building a writer's platform with social mediaDavid Wood
 
Summary of the Hero's Journey
Summary of the Hero's JourneySummary of the Hero's Journey
Summary of the Hero's JourneyDavid Wood
 
Open by Default
Open by DefaultOpen by Default
Open by DefaultDavid Wood
 
Lod Then, Now and Next 20110926
Lod Then, Now and Next 20110926Lod Then, Now and Next 20110926
Lod Then, Now and Next 20110926David Wood
 
Linked Data ROI 20110426
Linked Data ROI 20110426Linked Data ROI 20110426
Linked Data ROI 20110426David Wood
 
Introduction to Linked Data: RDF Vocabularies
Introduction to Linked Data: RDF VocabulariesIntroduction to Linked Data: RDF Vocabularies
Introduction to Linked Data: RDF VocabulariesDavid Wood
 

Mais de David Wood (20)

Internet of Things (IoT) two-factor authentication using blockchain
Internet of Things (IoT) two-factor authentication using blockchainInternet of Things (IoT) two-factor authentication using blockchain
Internet of Things (IoT) two-factor authentication using blockchain
 
Returning to Online Privacy?
Returning to Online Privacy?Returning to Online Privacy?
Returning to Online Privacy?
 
Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...
Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...
Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...
 
BlockSW 2019 Keynote
BlockSW 2019 KeynoteBlockSW 2019 Keynote
BlockSW 2019 Keynote
 
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
 
Privacy in the Smart City
Privacy in the Smart CityPrivacy in the Smart City
Privacy in the Smart City
 
Controlling Complexities in Software Development
Controlling Complexities in Software DevelopmentControlling Complexities in Software Development
Controlling Complexities in Software Development
 
Privacy Concerns related to Verifiable Claims
Privacy Concerns related to Verifiable ClaimsPrivacy Concerns related to Verifiable Claims
Privacy Concerns related to Verifiable Claims
 
Implementing the Verifiable Claims data model
Implementing the Verifiable Claims data modelImplementing the Verifiable Claims data model
Implementing the Verifiable Claims data model
 
So You Wanna be a Startup CTO 20170301
So You Wanna be a Startup CTO 20170301So You Wanna be a Startup CTO 20170301
So You Wanna be a Startup CTO 20170301
 
Functional manipulations of large data graphs 20160601
Functional manipulations of large data graphs 20160601Functional manipulations of large data graphs 20160601
Functional manipulations of large data graphs 20160601
 
When Metaphors Kill
When Metaphors KillWhen Metaphors Kill
When Metaphors Kill
 
Secularism in Australia
Secularism in AustraliaSecularism in Australia
Secularism in Australia
 
Meditations on Writing in Paradoxes, Oxymorons, and Pleonasms
Meditations on Writing in Paradoxes, Oxymorons, and PleonasmsMeditations on Writing in Paradoxes, Oxymorons, and Pleonasms
Meditations on Writing in Paradoxes, Oxymorons, and Pleonasms
 
Building a writer's platform with social media
Building a writer's platform with social mediaBuilding a writer's platform with social media
Building a writer's platform with social media
 
Summary of the Hero's Journey
Summary of the Hero's JourneySummary of the Hero's Journey
Summary of the Hero's Journey
 
Open by Default
Open by DefaultOpen by Default
Open by Default
 
Lod Then, Now and Next 20110926
Lod Then, Now and Next 20110926Lod Then, Now and Next 20110926
Lod Then, Now and Next 20110926
 
Linked Data ROI 20110426
Linked Data ROI 20110426Linked Data ROI 20110426
Linked Data ROI 20110426
 
Introduction to Linked Data: RDF Vocabularies
Introduction to Linked Data: RDF VocabulariesIntroduction to Linked Data: RDF Vocabularies
Introduction to Linked Data: RDF Vocabularies
 

Cpsc125 Ch4 Sec1

  • 1. Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Section 4.1 © 2006 W.H. Freeman & Co. Copyright MSCS Slides Relations Relations, Functions and Matrices Monday, March 22, 2010
  • 2. Binary Relations ● Certain ordered pairs of objects have relationships. ● The notation x ρ y implies that the ordered pair (x, y) satisfies the relationship ρ. ● Say S = {1, 2, 4}, then the Cartesian product of set S with itself is: S × S = {(1,1), (1,2), (1,4), (2,1), (2,2), (2,4), (4,1), (4,2), (4,4)} ● Then the subset of S × S satisfying the relation x ρ y ↔ x = 1/2y, is: {(1, 2), (2, 4)} ● DEFINITION: BINARY RELATION on a set S Given a set S, a binary relation on S is a subset of S × S (a set of ordered pairs of elements of S). ● A binary relation is always a subset with the property that: x ρ y ↔ (x, y) ∈ ρ ● What is the set where ρ on S is defined by x ρ y ↔ x + y is odd where S = {1, 2}? ■ The set for ρ is {(1,2), (2,1)}. Section 4.1 Relations 2 Monday, March 22, 2010
  • 3. Relations on Multiple Sets ● DEFINITION: RELATIONS ON MULTIPLE SETS Given two sets S and T, a binary relation from S to T is a subset of S × T. Given n sets S1, S2, …., Sn for n > 2, an n-ary relation on S1 × S2 × … × Sn is a subset of S1 × S2 × … × Sn. ● S = {1, 2, 3} and T = {2, 4, 7}. ● Then x ρ y ↔ x = y/2 is the set {(1,2), (2,4)}. ● S = {2, 4, 6, 8} and T = {2, 3, 4, 6, 7}. ● What is the set that satisfies the relation x ρ y ↔ x = (y + 2)/2. Section 4.1 Relations 3 Monday, March 22, 2010
  • 4. Relations on Multiple Sets ● DEFINITION: RELATIONS ON MULTIPLE SETS Given two sets S and T, a binary relation from S to T is a subset of S × T. Given n sets S1, S2, …., Sn for n > 2, an n-ary relation on S1 × S2 × … × Sn is a subset of S1 × S2 × … × Sn. ● S = {1, 2, 3} and T = {2, 4, 7}. ● Then x ρ y ↔ x = y/2 is the set {(1,2), (2,4)}. ● S = {2, 4, 6, 8} and T = {2, 3, 4, 6, 7}. ● What is the set that satisfies the relation x ρ y ↔ x = (y + 2)/2. ● The set is {(2,2), (4,6)}. Section 4.1 Relations 3 Monday, March 22, 2010
  • 5. Types of Relationships ● One-to-one: If each first component and each second component only appear once in the relation. ● One-to-many: If a first component is paired with more than one second component. ● Many-to-one: If a second component is paired with more than one first component. ● Many-to-many: If at least one first component is paired with more than one second component and at least one second component is paired with more than one first component. Section 4.1 Relations 4 Monday, March 22, 2010
  • 6. Relationships: Examples ● If S = {2, 5, 7, 9}, then identify the types of the following relationships: {(5,2), (7,5), (9,2)} many-to-one {(2,5), (5,7), (7,2)} one-to-one {(7,9), (2,5), (9,9), (2,7)} many-to-many Section 4.1 Relations 5 Monday, March 22, 2010
  • 7. Properties of Relationships ● DEFINITION: REFLEXIVE, SYMMETRIC, AND TRANSITIVE RELATIONS Let ρ be a binary relation on a set S. Then: ■ ρ is reflexive means (∀x) (x∈S → (x,x)∈ρ) ■ ρ is symmetric means: (∀x)(∀y) (x∈S Λ y∈S Λ (x,y) ∈ ρ → (y,x)∈ ρ) ■ ρ is transitive means: (∀x)(∀y)(∀z) (x∈S Λ y∈S Λ z∈S Λ (x,y)∈ρ Λ (y,z)∈ρ → (x,z)∈ρ) ■ ρ is antisymmetric means: (∀x)(∀y) (x∈S Λ y∈S Λ (x,y) ∈ ρ Λ (y,x)∈ ρ → x = y) ● Example: Consider the relation ≤ on the set of natural numbers N. ● Is it reflexive? Yes, since for every nonnegative integer x, x ≤ x. ● Is it symmetric? No, since x ≤ y doesn’t imply y ≤ x. ● If this was the case, then x = y. This property is called antisymmetric. ● Is it transitive? Yes, since if x ≤ y and y ≤ z, then x ≤ z. Section 4.1 Relations 6 Monday, March 22, 2010
  • 8. Closures of Relations ● DEFINITION: CLOSURE OF A RELATION A binary relation ρ* on set S is the closure of a relation ρ on S with respect to property P if: 1. ρ* has the property P ! ρ ⊆ ρ* ! ρ* is a subset of any other relation on S that includes ρ and has the property P ● Example: Let S = {1, 2, 3} and ρ = {(1,1), (1,2), (1,3), (3,1), (2,3)}. ■ This is not reflexive, transitive or symmetric. ■ The closure of ρ with respect to reflexivity is {(1,1),(1,2),(1,3), (3,1), (2,3), (2,2), (3,3)} and it contains ρ. ■ The closure of ρ with respect to symmetry is {(1,1), (1,2), (1,3), (3,1), (2,3), (2,1), (3,2)}. ■ The closure of ρ with respect to transitivity is {(1,1), (1,2), (1,3), (3,1), (2,3), (3,2), (3,3), (2,1), (2,2)}. Section 4.1 Relations 7 Monday, March 22, 2010
  • 9. Exercise: Closures of Relations ● Find the reflexive, symmetric and transitive closure of the relation {(a,a), (b,b), (c,c), (a,c), (a,d), (b,d), (c,a), (d,a)} on the set S = {a, b, c, d} Section 4.1 Relations 8 Monday, March 22, 2010
  • 10. Partial Ordering and Equivalence Relations ● DEFINITION: PARTIAL ORDERING A binary relation on a set S that is reflexive, antisymmetric, and transitive is called a partial ordering on S. ● If is a partial ordering on S, then the ordered pair (S,ρ) is called a partially ordered set (also known as a poset). ● Denote an arbitrary, partially ordered set by (S, ≤); in any particular case, ≤ has some definite meaning such as “less than or equal to,” “is a subset of,” “divides,” and so on. ● Examples: ■ On N, x ρ y ↔ x ≤ y. ■ On {0,1}, x ρ y ↔ x = y2 ⇒ ρ = {(0,0), (1,1)}. Section 4.1 Relations 9 Monday, March 22, 2010
  • 11. Hasse Diagram ● Hasse Diagram: A diagram used to visually depict a partially ordered set if S is finite. ■ Each of the elements of S is represented by a dot, called a node, or vertex, of the diagram. ■ If x is an immediate predecessor of y, then the node for y is placed above the node for x and the two nodes are connected by a straight-line segment. ■ Example: Given the partial ordering on a set S = {a, b, c, d, e, f} as {(a,a), (b,b), (c,c), (d,d), (e,e), (f, f), (a, b), (a,c), (a,d), (a,e), (d,e)}, the Hasse diagram is: Section 4.1 Relations 10 Monday, March 22, 2010
  • 12. Equivalence Relation ● DEFINITION: EQUIVALENCE RELATION A binary relation on a set S that is reflexive, symmetric, and transitive is called an equivalence relation on S. ● Examples: ■ On N, x ρ y ↔ x + y is even. ■ On {1, 2, 3}, ρ = {(1,1), (2,2), (3,3), (1,2), (2,1)}. Section 4.1 Relations 11 Monday, March 22, 2010
  • 13. Partitioning a Set ● DEFINITION: PARTITION OF A SET It is a collection of nonempty disjoint subsets of S whose union equals S. ● For ρ an equivalence relation on set S and x ∈ S, then [x] is the set of all members of S to which x is related, called the equivalence class of x. Thus: [x] = {y | y ∈ S Λ x ρ y} ● Hence, for ρ = {(a,a), (b,b), (c,c), (a,c), (c,a)} [a] = {a, c} = [c] Section 4.1 Relations 12 Monday, March 22, 2010
  • 14. Congruence Modulo n ● DEFINITION: CONGRUENCE MODULO n For integers x and y and positive integer n, x = y(mod n) if x−y is an integral multiple of n. ● This binary relation is always an equivalence relation ● Congruence modulo 4 is an equivalence relation on Z. Construct the equivalence classes [0], [1], [2], and [3]. ● Note that [0], for example, will contain all integers differing from 0 by a multiple of 4, such as 4, 8, 12, and so on. The distinct equivalence classes are: ■ [0] = {... , 8, 4, 0, 4, 8,...} ■ [1] = {... , 7, 3, 1, 5, 9,...} ■ [2] = {... , 6, 2, 2, 6, 10,...} ■ [3] = {... , 5, 1, 3, 7, 11,...} Section 4.1 Relations 13 Monday, March 22, 2010
  • 15. Partial Ordering and Equivalence Relations Section 4.1 Relations 14 Monday, March 22, 2010
  • 16. Exercises 1. Which of the following ordered pairs belongs to the binary relation ρ on N? ■ x ρ y ↔ x + y < 7; (1,3), (2,5), (3,3), (4,4) ■ x ρ y ↔ 2x + 3y = 10; (5,0), (2,2), (3,1), (1,3) 2. Show the region on the Cartesian plane such that for a binary relation ρ on R: ■ x ρ y ↔ x2 + y2 ≤ 25 ■ xρy↔x≥y 3. Identify each relation on N as one-to-one, one-to-many, many- to-one or many-to-many: ■ ρ = {(12,5), (8,4), (6,3), (7,12)} ■ ρ = {(2,7), (8,4), (2,5), (7,6), (10,1)} ■ ρ = {(1,2), (1,4), (1,6), (2,3), (4,3)} Section 4.1 Relations 15 Monday, March 22, 2010
  • 17. Exercises 4. S = {0, 1, 2, 4, 6}. Which of the following relations are reflexive, symmetric, antisymmetric, and transitive. Find the closures for each category for all of them:  ρ = {(0,0), (1,1), (2,2), (4,4), (6,6), (0,1), (1,2), (2,4), (4,6)}  ρ = {(0,0), (1,1), (2,2), (4,4), (6,6), (4,6), (6,4)}  ρ = {(0,1), (1,0), (2,4), (4,2), (4,6), (6,4)} 5. For the relation {(1,1), (2,2), (1,2), (2,1), (1,3), (3,1), (3,2), (2,3), (3,3), (4,4), (5,5), (4,5), (5,4)} ■ What is [3] and [4]? Section 4.1 Relations 16 Monday, March 22, 2010