We consider the problem of coloring a planar graph with the minimum number of colors so that each color class avoids one or more forbidden graphs as subgraphs. We perform a detailed study of the computational complexity of this problem.We present a complete picture for the case with a single forbidden connected (induced or noninduced) subgraph. The 2-coloring problem is NP-hard if the forbidden subgraph is a tree with at least two edges, and it is polynomially solvable in all other cases. The 3-coloring problem is NP-hard if the forbidden subgraph is a path with at least one edge, and it is polynomially solvable in all other cases. We also derive results for several forbidden sets of cycles. In particular, we prove that it is NP-complete to decide if a planar graph can be 2-colored so that no cycle of length at most 5 is monochromatic.
Introduction.We denote by G = (V, E) a finite undirected and simple graph with |V | = n vertices and |E| = m edges. For any nonempty subset W ⊆ V , the subgraph of G induced by W is denoted by G[W ]. A clique of G is a nonempty subset C ⊆ V such that all the vertices of C are mutually adjacent. A nonempty subset I ⊆ V is independent if no two of its elements are adjacent. An r -coloring of the vertices of G is a partition V 1 , V 2 , . . . , V r of V ; the r sets V j are called the color classes of the r -coloring. An r -coloring is proper if every color class is an independent set. The chromatic number χ(G) is the minimum integer r for which a proper r -coloring of G exists.Evidently, an r -coloring is proper if and only if for every color class V j , the induced subgraph G[V j ] does not contain a subgraph isomorphic to P 2 . (We use P k to denote the path on k vertices.) This observation leads to a number of interesting generalizations of the classical graph coloring concept. One such generalization was suggested by Harary