I'm interested in coloring a graph, but with slightly different objectives than the standard problem. It seems like the focus of most graph-coloring algorithms (DSATUR etc) is to minimize the number of color classes used.
My goal, in contrast, is to maximize the number of color classes of fixed size N.
As a concrete example, say I have a graph with 100
nodes, and I'd like to color the graph with color classes of size N = 30
. With an optimal algorithm and the right graph, I could find 3 such groups that color 90 total nodes, with 10 nodes left over. A lesser algorithm might only produce 2 such groups, with 40 nodes left over that cannot be colored with a size-30 color class.
I figure I can solve this problem with a Greedy Algorithm, but it won't be optimal. Or I could model this in a constraint solver, but it might not employ some clever graph-specific tricks that could come in handy.
Does this specific problem have a name? Or an established algorithm to solve it? Thank you!
EDIT:
It was rightfully pointed out that my question is ambiguous! I can explain much more thoroughly, my apologies for the confusion.
First, let me define the size of a color class. I've seen this terminology elsewhere but might be using it incorrectly. The size of a color class is the number of nodes assigned to that color. I will denote this: size(C_i) = <number of nodes colored C_i>
.
Now, to define a fixed size color class. This is a color class with size N
. To use the example above, I'm interested in colorings with colors such that size(C_i) = 30
.
As far as the optimization objective: I want to color a graph to maximize the number of size-30 color classes. If you'll permit me some Python pseudocode:
n_size_30_colors = len([c for c in colors if size(c) == 30])
maximize(n_size_30_colors)
To complete the example, take these two possible colorings of a graph with 100 nodes. Each number represents the number of nodes colored by that color:
Coloring 1: {55, 25, 20} (n_size_30_colors = 0)
Coloring 2: {30, 30, 20, 20} (n_size_30_colors = 2)
Coloring 3: {30, 30, 30, 10} (n_size_30_colors = 3)
Even though Coloring 1 uses fewer colors, Coloring 3 is optimal because it returns the most size-30 color classes. The size-55 color class in Coloring 1 is "wasteful" in that those 25 extra nodes are not useful; an optimal solution for this problem would distribute those nodes to other color classes, hopefully yielding more size-30 colors.
I hope this clarifies things somewhat, and thanks again!