Complexity of Coloring Graphs without Paths and Cycles

  • Pavol Hell
  • Shenwei Huang
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8392)


Let P t and C denote a path on t vertices and a cycle on ℓ vertices, respectively. In this paper we study the k-COLORING problem for (P t ,C )-free graphs. It has been shown by Golovach, Paulusma, and Song that when ℓ = 4 all these problems can be solved in polynomial time. By contrast, we show that in most other cases the k-COLORING problem for (P t ,C )-free graphs is NP-complete. Specifically, for ℓ = 5 we show that k-COLORING is NP-complete for (P t ,C 5)-free graphs when k ≥ 4 and t ≥ 7; for ℓ ≥ 6 we show that k-COLORING is NP-complete for (P t ,C )-free graphs when k ≥ 5, t ≥ 6; and additionally, we prove that 4-COLORING is NP-complete for (P t ,C )-free graphs when t ≥ 7 and ℓ ≥ 6 with ℓ ≠ 7, and that 4-COLORING is NP-complete for (P t ,C )-free graphs when t ≥ 9 and ℓ ≥ 6 with ℓ ≠ 9. It is known that, generally speaking, for large k the k-COLORING problem tends to remain NP-complete when one forbids an induced path P t with large t. Our findings mean that forbidding an additional induced cycle C (with ℓ > 4) does not help. We also revisit the problem of k-COLORING (P t ,C 4)-free graphs, in the case t = 6. (For t = 5 the k-COLORING problem is known to be polynomial even on just P 5-free graphs, for every k.) The algorithms of Golovach, Paulusma, and Song are not practical as they depend on Ramsey-type results, and end up using tree-decompositions with very high widths. We develop more practical algorithms for 3-COLORING and 4-COLORING on (P 6,C 4)-free graphs. Our algorithms run in linear time if a clique cutset decomposition of the input graph is given. Moreover, our algorithms are certifying algorithms. We provide a finite list of all minimal non-k-colorable (P 6,C 4)-free graphs, for k = 3 and k = 4. Our algorithms output one of these minimal obstructions whenever a k-coloring is not found. In fact, we prove that there are only finitely many minimal non-k-colorable (P 6,C 4)-free graphs for any fixed k; however, we do not have the explicit lists for higher k, and thus no certifying algorithms. (We note there are infinitely many non-k-colorable P 5-free, and hence P 6-free, graphs for any given k ≥ 4, according to a result of Hoàng, Moore, Recoskie, Sawada, and Vatshelle.)


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Bondy, J.A., Murty, U.S.R.: Graph Theory. Springer Graduate Texts in Mathematics, vol. 244 (2008)Google Scholar
  2. 2.
    Brandstädt, A., Hoàng, C.T.: On clique separators, nearly chordal graphs, and the Maximum Weight Stable Set Problem. Theoretical Computer Science 389, 295–306 (2007)CrossRefzbMATHMathSciNetGoogle Scholar
  3. 3.
    Broersma, H.J., Fomin, F.V., Golovach, P.A., Paulusma, D.: Three complexity results on coloring P k-free graphs. European Journal of Combinatorics (2012) (in press)Google Scholar
  4. 4.
    Broersma, H.J., Golovach, P.A., Paulusma, D., Song, J.: Updating the complexity status of coloring graphs without a fixed induced learn forest. Theoret. Comput. Sci. 414, 9–19 (2012)CrossRefzbMATHMathSciNetGoogle Scholar
  5. 5.
    Bruce, D., Hoàng, C.T., Sawada, J.: A certifying algorithm for 3-colorability of p 5-free graphs. In: Dong, Y., Du, D.-Z., Ibarra, O. (eds.) ISAAC 2009. LNCS, vol. 5878, pp. 594–604. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  6. 6.
    Chudnovsky, M., Maceli, P., Zhong, M.: Three-coloring graphs with no induced six-edge path I: the triangle-free case (in preparation)Google Scholar
  7. 7.
    Chudnovsky, M., Maceli, P., Zhong, M.: Three-coloring graphs with no induced six-edge path II: using a triangle (in preparation)Google Scholar
  8. 8.
    Chudnovsky, M., Robertson, N., Seymour, P., Thomas, R.: The strong perfect graph theorem. Annals of Mathematics 64, 51–229 (2006)CrossRefMathSciNetGoogle Scholar
  9. 9.
    Dabrowski, K., Golovach, P., Paulusma, D.: Colouring of graphs with Ramsey-type forbidden subgraphs (submitted)Google Scholar
  10. 10.
    Garey, M.R., Johnson, D.S.: Computers and Intractability: A Guide to the Theory of NP-Completeness. Freeman San Faranciso (1979)Google Scholar
  11. 11.
    Golovach, P.A., Paulusma, D., Song, J.: Coloring graphs without short cycles and long induced paths (2013),
  12. 12.
    Golumbic, M.C.: Algorithmic graph theory and perfect graphs, San Diego (1980)Google Scholar
  13. 13.
    Grötschel, M., Lovász, L., Schrijver, A.: Polynomial algorithms for perfect graphs. Ann. Discrete Math. 21, 325–356 (1984), Topics on Perfect GraphsGoogle Scholar
  14. 14.
    Hoàng, C.T., Kamiński, M., Lozin, V.V., Sawada, J., Shu, X.: Deciding k-colorability of P 5-free graphs in polynomial time. Algorithmica 57, 74–81 (2010)CrossRefzbMATHMathSciNetGoogle Scholar
  15. 15.
    Holyer, I.: The NP-completeness of edge coloring. SIAM J. Comput. 10, 718–720 (1981)CrossRefzbMATHMathSciNetGoogle Scholar
  16. 16.
    Huang, S.: Improved complexity results on k-coloring P t-free graphs. In: Chatterjee, K., Sgall, J. (eds.) MFCS 2013. LNCS, vol. 8087, pp. 551–558. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  17. 17.
    Kamiński, M., Lozin, V.V.: Coloring edges and vertices of graphs without short or long cycles. Contrib. Discrete. Mah. 2, 61–66 (2007)zbMATHGoogle Scholar
  18. 18.
    Král’, D., Kratochvíl, J., Tuza, Z., Woeginger, G.J.: Complexity of coloring graphs without forbidden induced subgraphs. In: Brandstädt, A., Le, V.B. (eds.) WG 2001. LNCS, vol. 2204, pp. 254–262. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  19. 19.
    Le, V.B., Randerath, B., Schiermeyer, I.: On the complexity of 4-coloring graphs without long induced paths. Theoret. Comput. Sci. 389, 330–335 (2007)CrossRefzbMATHMathSciNetGoogle Scholar
  20. 20.
    Leven, D., Galil, Z.: NP-completeness of finding the chromatic index of regular graphs. J. Algorithm 4, 35–44 (1983)CrossRefzbMATHMathSciNetGoogle Scholar
  21. 21.
    Randerath, B., Schiermeyer, I.: 3-Colorability ∈ P for P 6-free graphs. Discrete Appl. Math. 136, 299–313 (2004)CrossRefzbMATHMathSciNetGoogle Scholar
  22. 22.
    Randerath, B., Schiermeyer, I.: Vertex colouring and fibidden subgraphs-a survey. Graphs Combin. 20, 1–40 (2004)Google Scholar
  23. 23.
    Schaefer, T.J.: The complexity of satisfiability problems. In: Proc. STOC 1978, pp. 216–226 (1978)Google Scholar
  24. 24.
    Tarjan, R.E.: Decomposition by clique separators. Discrete Mathematics 55, 221–232 (1985)CrossRefzbMATHMathSciNetGoogle Scholar
  25. 25.
    Tuza, Z.: Graph colorings with local restrictions-a survey. Discuss. Math. Graph Theory 17, 161–228 (1997)CrossRefzbMATHMathSciNetGoogle Scholar
  26. 26.
    Woeginger, G.J., Sgall, J.: The complexity of coloring graphs without long induced paths. Acta Cybernet. 15, 107–117 (2001)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2014

Authors and Affiliations

  • Pavol Hell
    • 1
  • Shenwei Huang
    • 1
  1. 1.School of Computing ScienceSimon Fraser UniversityBurnabyCanada

Personalised recommendations