Let G be a simple connected plane graph and let C-1 and C-2 be cycles in G bounding distinct faces f(1) and f(2). For a positive integer l, let r(l) denote the number of integers n such that -l <= n <= l, is divisible by 3, and n has the same parity as .e; in particular, r(4) = 1.
Let r(f1), (f2) (G) = Pi(f) r (vertical bar f vertical bar), where the product is over the faces f of G distinct from f(1) and f(2) , and let q(G) = 1+ Sigma(f:vertical bar f vertical bar not equal 4 )vertical bar f vertical bar where the sum is over all faces f of G (of length other than four). We give an algorithm with time complexity O(r(f1,f2) (G)q(G)vertical bar G vertical bar) which, given a 3-coloring psi of C-1 boolean OR C-2, either finds an extension of psi to a 3-coloring of G, or correctly decides no such extension exists.
The algorithm is based on a min-max theorem for a variant of integer 2-commodity flows, and consequently in the negative case produces an obstruction to the existence of the extension. As a corollary, we show that every triangle-free graph drawn in the torus with edge-width at least 21 is 3-colorable. (C) 2020 Elsevier Ltd.
All rights reserved.