Discrete Structures

Lecture Notes, 6 Dec 2010

Last Update: 6 December 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

§9.5 to p. 640;
§9.6, esp. pp. 653–655:

Graphs (cont'd)

  1. Graphs can be used to model:

    1. computer networks

      1. including the Internet:

        • nodes = computers
          arcs = network connections


        • nodes = local networks
          arcs = network connections to the Internet

      2. and the World Wide Web:

      3. and social networks

    2. tournaments:

      • a•→•b for: a beats b

    3. road maps

    4. words and their meanings

      • Let each vertex represent a word,
        and let each edge connect a word with the words in its definition

      • See Massé 2008

    5. the human brain (or the mind (via a "semantic network"))

    6. anything where ∃ binary relation:

  2. Euler Paths & Circuits:

    • pronounced "OILer"

    1. Read about the 7 bridges of Königsberg:

      • The K-Bridge graph:

        • Let nodes represent land, arcs represent bridges:

    2. Defs:

    3. More Defs:

      1. A connected graph =def
        a graph such that ¬∃ 2 subgraphs with no common edge.

      2. A multigraph =def a graph with duplicate edges

        • i.e.) some pairs of vertices are connected by ≥2 edges

      3. Let G=(V,E) be a graph.
        Let v ∈ V.
        Then degree(v) =def
        the number of edges with v as an endpoint

        • i.e.) degree(v) = |{e ∈ E | ∃v′[e = {v,v&prime}]}|

    4. Thm 1:

        A connected multigraph has an Euler circuit
        each vertex has even degree.

      1. e.g.)

      2. ∴ the Königsberg Bridge graph has no Euler circuit!

      3. Neither does:

    5. Thm 2:

        A connected multigraph has an Euler path
        (but no Euler circuit)
        it has exactly 2 vertices of odd degree

  3. Traveling Salesman Problem:

    1. Salesman wants to visit n cities exactly once each
      & return to starting point by shortest path
      (e.g., to save gas or time)
      (possibly traveling over same road >1 times)

      1. This is called a Hamiltonian circuit:

        • travel through every vertex exactly once
          & return to starting point

        • inspired by a wooden puzzle devised by Hamilton

      2. Compare Euler circuit:

        • travel through every edge exactly once, & return

      3. See articles by Brian Hayes, especially Hayes 2008.

    2. Fact 1:

        There are no known necessary & sufficient conditions for Hamiltonian circuits
        (as there are for Euler circuits)

    3. Fact 2:

        Let graph G have n vertices.
        Let v0 be the starting vertex.
        ∴ ∃ ≤ (n–1)! different H-circuits to examine.

        • ∃ ≤ n–1 choices for v1
        • ∃ ≤ n–2 choices for v2, etc.

        But can travel H-circuit in reverse order:

        • same trip, only backwards

        ∴ "only" need to examine ≤ (n–1)!/2 H-circuits to find shortest.

        But n=25 → need to examine 24!/2 ≈ 3.1*1023 circuits (in the worst case)!

        At 1 nanosecond/circuit (= 10–9sec/circuit), need ∼10,000,000 years!!

        • (actually, 9,837,144 years, 321 days, 4 hours, 48 minutes,
          but who's counting?)

    4. This is computable in theory

      • You could easily write a program to find all Hamiltonian circuits and then find the shortest.

      but not computable in practice

      • What does that mean exactly? Next time!

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.