For a given graph, the Maximum $k$-Colorable Subgraph Problem is the problem of determining the largest set of vertices of the graph that can be colored using $k$ distinct colors such that adjacent vertices, if colored, are assigned different colors. This problem is NP-hard for general graphs.
[1] Lewis, J. M., and M. Yannakakis, The node-deletion problem for hereditary properties is NP-Complete, J. of Comp. System Sci., 20 (1980), pp. 219-230.
I know that the VertexChromaticNumber
or FindVertexColoring
is available in Mathematica, but I haven't come across the functionality mentioned above (perhaps it exists, but I haven't seen it)
For example, we consider a small graph with chromatic number 5.
g = Graph[ImportString["ORo?????ENDuFsW{QmF~~", "Graph6"],
GraphLayout -> "CircularEmbedding"];
VertexChromaticNumber[g]
FindVertexColoring[g, {White, Red, Green, Blue, Purple}];
Annotate[g, {VertexStyle -> Thread[VertexList[g] -> %]}]
If we use $k$ (where $k\le 4$) distinct colors, then can we determine the maximum $k$-colorable subgraph in $G$? I haven't found the corresponding algorithm yet (there might be one).