COMP 2711H: Lecture 14

Date: 2024-10-02 01:19:04

Reviewed:

Topic / Chapter:

summary

❓Questions

Notes

Graph Theory
  • Disjoint cycle

    • theorem: if (connected) ,
      • edge set : disjoint union of cycles
    • proof: by induction
      • how do we define the size of graph?
      • (strong) induction on no. of edges:
      • base case : works
      • induction step: ,
        • for a vertex in cc
          • its neighbor's degree, also even
            • i.e. there exists at least another path to continue
          • however, it can't continue forever as 's finite
          • at some point, you will
        • thus, there must be at least one cycle
      • connected graph without cycle: tree
        • but tree: at least with two leaves
          • against initial assumption
        • it is connected, and it shouldn't be tree -> it has a cycle
        • cycle
      • after removal of all edges of
        • all vertex in : loses degree of
  • Eulerian circuit

    • Eulerian circuit: closed walk passing every edge exactly once
      • graph: Eulerian if it contains an Eulerian circuit
    • theorem: for connected, is Eulerian iff
      • Eulerian ->
        • let : closed walk covering all edges once
          • same vertex can appear multiple times in the middle, however
            • as it enters & leaves the node, it must have even degree
            • same for
      • -> Eulerian
        • let a cycle connected to multiple Eulerian circuit / graph
        • staring for a vertex cycle, it can have Eulerian walk on Eulerian circuit, and come back to starting point
      • 👨‍🏫 prove base case for yourself
    • Hamiltonian cycle: cycle visiting all vertices
      • 👨‍🏫 solution: an NP-hard problem
    • theorem: graph w/ edges
      • w/ subgraph
      • there exists a bipartite
    • proof idea: consider all subgraph of
      • and consider: largest bipartite subgraph
      • claim:
    • proof
      • claim, for
      • if it's not the case, then we can make largest
        • contradiction: as must be the largest subgraph
      • theorem:
  • Graphic sequence

    • given a seq.
      • is the graph w/ this degree sequence?
    • theorem: : degree seq of (not necessarily simple)
      • iff is even
    • if : trivial
graph TD
    a_0((a_0))
    a_1((a_1))-->a_1
    a_2((a_2))-->a_2
- and similarly go on
  • otherwise
    • no. of odd terms: must be even
    • then: we can have edge between such vertex,
      • and
      • which is solvable by above case
  • what if we want it to be a simple graph?
    • seq. : graphic if a graph based on it
  • Havel-Hakimi algorithm
    • choose vertex w. highest degree
  • theorem: a seq is graphic
    • iff
    • is graphic -> graphic: trivial
  • graphic -> is graphic
    • vertex : connected to red vertices
      • yet, we want it connected to blue vertices
    • then: find a vertex connected to desirable vertex
      • i.e. swap neighbors, or 2-switch
    • can always be found:
      • they never have the same degree
  • graphic iff Havel-Hakimi algorithm works
  • Tree and unique path

    • : tree iff there is a unique path between every pair od vertices
    • tree: no cycle, edges, connected
    • suppose : both -paths and
      • implies: closed -walk -> cycle
graph LR
    u((u))
    v((v))
    int_1(( ))
    int_2(( ))
    int_1-->int_2
    u--π1-->int_1
    int_2--π1-->v
    u--π2-->int_1
    int_2--π2-->v
  • : has no cycles
    • suppose
  • thus: initial statement can be used as fourth definition of tree
  • Tree

    • connected graph : tree iff all edges of : cuts
    • tree -> all edge being cut
      • as there is only one, unique -path, removing disconnects
        • thus is a cut
    • all edges being cut -> tree
      • no edge appears in a cycle
      • there is no cycle
    • proof 2 (more independent)
      • suppose : cycle in G
      • then an edge in cycle: not
  • Connect

    • theorem: every connected graph : w/ subgraph
      • s.t. is a tree
      • if : already a tree
      • else: eliminate all edges that are not cut, one by one
    • proof 2:
      • choose vertex
      • remove all edges except the shortest path from to all other vertex
      • properties of tree
        • connected
        • having edges
          • d
        • no cycles either
          • the level (distance from ): goes only up and up
          • can't form a cycle