Definition

Let be a connected graph, and let be the layers produced by BFS starting at node . Exactly one of the following holds,

  1. No edge of joins two nodes of the same layer, and is bipartite.
  2. An edge of joins two nodes of the same layer, and contains an odd_legth cycle.