Discrete Structures

Lecture Notes, 29 Nov 2010

Last Update: 30 November 2010

Note: NEW or UPDATED material is highlighted


Note: A username and password may be required to access certain documents. Please contact Bill Rapaport.


Index to all lecture notes
…Previous lecture


§§7.1–7.2: Recurrence Relations (cont'd)


  1. Answer to the example from last lecture:

    1. UPDATED
      Consider this sequence:

        a0 = C0 = 0
        a1 = C1 = 1

        an = 3an–1 – 2an–2, ∀ n ≥ 2

    2. Execution of our algorithm:

      • I/P: an = 3an–1 – 2an–2

      1. Char Eqn: r² – 3r + 2 = 0

      2. Solve for r:

        • r1 = (3 + √(9 – 4*2))/2 = (3+√1)/2 = 2

        • r2 = (3 – √(9 – 4*2))/2 = (3–√1)/2 = 1

      3. Find αi:

        • a0 = α1*20 + α2*10 = α1 + α2 = 0

          ∴ α1 = –α2

        • a1 = α1*2¹ + α2*1¹ = 2α1 + α2 = 1

          ∴ 2(–α2) + α2 = 1

          ∴ –α2 = 1

          ∴ α2 = –1

          ∴ α1 = 1

      • O/P:

          ∴ an = α1r1n + α2r2n
                   = 1*2n + (–1)*1n
                   = 2n – 1

    3. You should try this for the other initial conditions shown in the table in the previous lecture to make sure that you get the same answers that I did.


§8.1 and §8.5: Relations


  1. In language, including languages from math & CS (such as programming languages), there are:

    1. noun phrases:

      • individual terms & descriptions, including proper names

        • e.g.) 'Fido', 'Prof. Rapaport', '2'

      • general terms and descriptions

        • e.g.) 'dog', 'professor', 'real number'

    2. verb phrases:

      • e.g.) 'sees', 'runs', 'divides', '<'

    3. adjective phrases & prepositional phrases:

      • e.g.) 'is red', 'is even'

    1. We can model these mathematically as follows:

      1. objects in the domain: model individual NPs
      2. sets of objects: model general NPs, intransitive VPs, adjective phrases, properties
      3. n-ary relations (Cartesian products of sets): model transitive VPs, relational properties, prepositions


    1. Def:

        Let A,B be sets.
        Then R is a binary relation on A and B
          =def
                  R ⊆ A × B

    2. Notation:

        Let a ∈ A, b ∈ B.

        set-theoretical notation:(a,b) ∈ R
         
        FOL notation:"R(a,b)" for: (a,b) ∈ R
        "¬R(a,b)" for: (a,b) ∉ R
         
        mathematical notation:"aRb" for (a,b) ∈ R

    3. E.g.) Let

        C = {c | c is a US city}
        S = {s | s is a US state}

        Then:

          R = {(c,s) ∈ C×S | c is a city in state s}
          is a binary relation.

        e.g.) (Buffalo, NY) ∈ R

        i.e.) R(Buffalo, NY)

        We could also have a 3-place ("ternary") relation Z ⊆ C×S×ZIP s.t. (Buffalo, NY, 14260) ∈ Z
        or: Z(Buffalo, NY, 14260)

    4. E.g.)

    5. E.g.) The Semantic Web:

      1. Let #Flipper be the Uniform Resource Identifier (URI)
        for Flipper the Dolphin.

        Let #isa be the URI for {(x,y) ∈ U×U | x is a y},
        where U = universe (i.e., domain).

        Let #Dolphin be the URI for the category of dolphins.

      2. Then "#isa(#Flipper, #Dolphin)" represents
        "Flipper is a dolphin".

      3. In addition to making "Flipper" a link,
        could also have semantic information about Flipper,
        to help search engines find Flipper when searching for "dolphin".

      4. The computer languages for expressing this are based on FOL.

      5. For more info, see the 2 articles linked online at "Relations"


  2. Relations have properties:

    1. Def:

        Let A be a set.
        Let R ⊆ A × A be a relation.

        Then:

        1. R is reflexive =def (∀a ∈ A)R(a,a)
        2. R is symmetric =def (∀a,b ∈ A)[R(a,b) → R(b,a)]
        3. R is non-symmetric =def ¬(R is symmetric)

            ≡ ¬(∀a,b ∈ A)[R(a,b) → R(b,a)]
            ≡ (∃a,b ∈ A)[R(a,b) ∧ ¬R(b,a)]

        4. R is anti-symmetric =def
            (∀a,b ∈ A)[ ( R(a,b) ∧ R(b,a) ) → a=b]
        5. R is transitive =def
            (∀a,b,c ∈ A)[ ( R(a,b) ∧ R(b,c) ) → R(a,c)]
        6. R is an equivalence relation =def
            R is reflexive ∧ R is symmetric ∧ R is transitive

    2. E.g.)

        rel'nref?sym?anti-sym?trans?equiv?
        ××
        ××
        <××
        vacuously!
        ×
        >××
        vacuously!
        ×
        =


Next lecture…


Text copyright © 2010 by William J. Rapaport (rapaport@buffalo.edu)
Cartoon links and screen-captures appear here for your enjoyment. They are not meant to infringe on any copyrights held by the creators. For more information on any cartoon, click on it, or contact me.
http://www.cse.buffalo.edu/~rapaport/191/F10/lecturenotes-20101129.html-20101130