Odd cycle transversals and the compression lemma #
An odd cycle transversal of a simple graph G is a set S of vertices whose deletion leaves a
bipartite graph (SimpleGraph.IsOddCycleTransversal): the subgraph induced on Sᶜ is
IsBipartite, that is, 2-colourable. Equivalently, some Boolean colouring of G is proper on
the edges outside S (SimpleGraph.isOddCycleTransversal_iff_exists_bool), or every closed walk of
odd length visits S (SimpleGraph.isOddCycleTransversal_iff_forall_odd_walk). The last form
explains the name: a closed walk of odd length contains an odd cycle on its vertices.
The compression lemma #
Iterative compression for odd cycle transversal [RSV04] [CyganEtAl2015, Section 4.4]
starts from an odd cycle transversal W with a colouring c₀ that is proper off W, and asks for
an odd cycle transversal of at most k vertices. Guess the part D ⊆ W of the new solution inside
W and a colouring σ of W that is proper off D. A vertex v ∉ W adjacent to w ∈ W \ D
must, if it survives, receive the colour !σ w. Relative to c₀, it keeps its colour when
σ w ≠ c₀ v (SimpleGraph.OddCycleTransversal.keepTerminals), and flips it when σ w = c₀ v
(SimpleGraph.OddCycleTransversal.flipTerminals). The edges of G - W join vertices of opposite
c₀-colours, so along a walk of G - W a vertex keeps its colour exactly when its neighbour does.
The guess extends to a solution D ∪ X with X ∩ W = ∅ exactly when X separates the keep
terminals from the flip terminals in G - W, that is, when W ∪ X separates them in G
(SimpleGraph.exists_isOddCycleTransversal_card_le_iff):
- given a solution
S, takeD = S ∩ W,σits colouring andX = S \ W(SimpleGraph.OddCycleTransversal.isSeparator_of_proper); - given a separator
X, every vertex outsideWkeeps or flips its colour according to a side labelling that is constant along the edges ofG - W - X, true on the keep terminals and false on the flip terminals (SimpleGraph.OddCycleTransversal.proper_of_side).
There are 3 ^ |W| guesses: each vertex of W is deleted or receives one of two colours. This
three-way count is the analysis of [Hueffner2009, Section 3]. The case D = ∅ corresponds to
[Hueffner2009, Lemma 2], which subdivides the edges at W first and phrases the guess as a valid
colouring of the neighbours of W; here σ colours W directly and no subdivision is needed.
The minimum separator of each guess is a minimum vertex cut, computed in
Cslib.Algorithms.Lean.IterativeCompression.OddCycleTransversal. The statement here is
combinatorial; W is any odd cycle transversal, and |W| = k + 1 only matters for the running
time.
Main definitions #
SimpleGraph.IsOddCycleTransversal: deletingSleaves a bipartite graph.SimpleGraph.OddCycleTransversal.keepTerminals,SimpleGraph.OddCycleTransversal.flipTerminals: the vertices outsideWwhose colour a guess(D, σ)forces to be kept or flipped.
Main results #
SimpleGraph.isOddCycleTransversal_iff_exists_bool: a colouring proper offS.SimpleGraph.isOddCycleTransversal_iff_forall_odd_walk: every odd closed walk visitsS.SimpleGraph.IsOddCycleTransversal.mono,SimpleGraph.IsOddCycleTransversal.anti,SimpleGraph.isOddCycleTransversal_univ: monotonicity in the set and the graph.SimpleGraph.isOddCycleTransversal_empty_iff:∅is an odd cycle transversal exactly whenGis bipartite.SimpleGraph.OddCycleTransversal.mem_keepTerminals,SimpleGraph.OddCycleTransversal.mem_flipTerminals: membership in the terminal sets.SimpleGraph.OddCycleTransversal.isSeparator_of_proper,SimpleGraph.OddCycleTransversal.proper_of_side: the two directions of the compression lemma.SimpleGraph.exists_isOddCycleTransversal_card_le_iff: the compression lemma.
References #
S is an odd cycle transversal of G: the subgraph induced on the complement of S is
bipartite.
S is an odd cycle transversal exactly when some Boolean colouring of G is proper on the
edges with both endpoints outside S.
S is an odd cycle transversal exactly when every closed walk of odd length visits S.
∅ is an odd cycle transversal exactly when G is bipartite.
The vertices outside W that keep their c₀-colour under the guess (D, σ): those with a
neighbour w ∈ W \ D such that σ w ≠ c₀ v.
The vertices outside W that flip their c₀-colour under the guess (D, σ): those with a
neighbour w ∈ W \ D such that σ w = c₀ v.
Compression lemma, solution to separator. Let c₀ be proper off W and c proper off
S. Take D = S ∩ W and any σ agreeing with c on W \ S. Then W ∪ S separates the keep
terminals from the flip terminals of (D, σ): along a walk of G - (W ∪ S) both colourings are
proper, so c v = c₀ v holds at one end exactly when it holds at the other.
Compression lemma, separator to solution. Let c₀ be proper off W, let σ be proper on
W \ D, and let side be constant along the edges of G - (W ∪ X), true on the keep terminals
outside X and false on the flip terminals outside X. Then any colouring c that follows σ on
W and keeps (side v = true) or flips (side v = false) the colour c₀ v outside W is proper
off D ∪ X.
Compression lemma [RSV04] [Hueffner2009, Lemma 2]
[CyganEtAl2015, Section 4.4]. Let W be a set with a colouring c₀ that is proper off W. Then
G has an odd cycle transversal of at most k vertices exactly when there are D ⊆ W, a
colouring σ proper on W \ D, and X disjoint from W such that W ∪ X separates the keep
terminals from the flip terminals of (D, σ) and |D| + |X| ≤ k. [Hueffner2009, Lemma 2] is the
disjoint case D = ∅, after subdividing the edges at W.