Exact algorithms for a discrete metric labeling problem

We are given a edge-weighted undirected graph G = (V,E) and a set of labels/colors C = {1, 2, . . . p}. A nonempty subset Cv ⊆ C is associated with each vertex v ∈ V . A coloring of the vertices is feasible if each vertex v is colored with a color of Cv. A coloring uniquely defines a subset E ′ ⊆ E of edges having different colored endpoints. The problem of finding a feasible coloring which defines a minimum weight E ′ is, in general, NP-complete. In this work we first propose polynomial time algorithms for some special cases, namely when the input graph is a tree, a cactus or with bounded treewidth. Then, an implicit enumeration scheme for finding an optimal coloring in the general case is described and computational results are presented.