Greedy colorings of words - Rautenbach, Dieter; Szigeti, Zoltán (Discrete Applied Mathematics, 2012)
In the Binary Paint Shop Problem proposed by Epping et al. (2004) [4] one has to find a 0/1-coloring of the letters of a word in which every letter from some alphabet appears twice, such that the two occurrences of each letter are colored differently and the total number of color changes is minimized. Meunier and Sebő (2009) [5] and Amini et al. (2010) [1] gave sufficient conditions for the optimality of a natural greedy algorithm for this problem. Our result is a best possible generalization of their results. We prove that the greedy algorithm optimally colors every suitable subword of a given instance word w if and only if w contains none of the three words (a,b,a,c,c,b), (a,d,d,b,c,c,a,b), and (a,d,d,c,b,c,a,b) as a subword. Furthermore, we relate this to the fact that every member of a family of hypergraphs associated with w is evenly laminar.