Yao Lirong's Blog

Graph (Recitation)

2019/11/20

From Recitation: Euler paths, planar graphs, and Hamiltonian paths

Edge Classification

We have an edge e=(v,child), where v is always grey

  • Tree edge:

    1
    2
    if (child.color==white)
    e = TreeEdge;
  • Back edge:

    1
    2
    if (child.color==grey)
    e = BackEdge;
  • Forward edge:

    1
    2
    if (child.color==black && v.timeStamp<child.timeStamp)
    e = ForwardEdge;
  • Cross edge:

    1
    2
    if (child.color==black && v.timeStamp > child.timeStamp)
    e = ForwardEdge;
CATALOG
  1. 1. Edge Classification