Springer Nature is making SARS-CoV-2 and COVID-19 research free. View research | View latest news | Sign up for updates

Algorithmic and Hardness Results for the Colorful Components Problems


In this paper we investigate the colorful components framework, motivated by applications emerging from comparative genomics. The general goal is to remove a collection of edges from an undirected vertex-colored graph \(G\) such that in the resulting graph \(G'\) all the connected components are colorful (i.e., any two vertices of the same color belong to different connected components). We want \(G'\) to optimize an objective function, the selection of this function being specific to each problem in the framework. We analyze three objective functions, and thus, three different problems, which are believed to be relevant for the biological applications: minimizing the number of singleton vertices, maximizing the number of edges in the transitive closure, and minimizing the number of connected components. Our main result is a polynomial-time algorithm for the first problem. This result disproves the conjecture of Zheng et al. that the problem is \( NP\)-hard (assuming \(P \ne NP\)). Then, we show that the second problem is \( APX\)-hard, thus proving and strengthening the conjecture of Zheng et al. that the problem is \( NP\)-hard. Finally, we show that the third problem does not admit polynomial-time approximation within a factor of \(|V|^{1/14 - \epsilon }\) for any \(\epsilon > 0\), assuming \(P \ne NP\) (or within a factor of \(|V|^{1/2 - \epsilon }\), assuming \(ZPP \ne NP\)).

This is a preview of subscription content, log in to check access.

We’re sorry, something doesn't seem to be working properly.

Please try refreshing the page. If that doesn't work, please contact support so we can address the problem.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5


  1. 1.

    It can be proven that in this case the transitive closure of \(G'\) has exactly \(12m\) edges, but that is not needed in the later part of the reasoning.


  1. 1.

    Ausiello, G., Protasi, M., Marchetti-Spaccamela, A., Gambosi, G., Crescenzi, P., Kann, V.: Complexity and Approximation: Combinatorial Optimization Problems and Their Approximability Properties, 1st ed. Springer, New York (1999)

  2. 2.

    Avidor, A., Langberg, M.: The multi-multiway cut problem. Theoretical Computer Science 377(1–3), 35–42 (2007)

  3. 3.

    Bellare, M., Goldreich, O., Sudan, M.: Free bits, PCPs, and nonapproximability—towards tight results. SIAM J. Comput. 27(3), 804–915 (1998)

  4. 4.

    Bruckner, S., Hüffner, F., Komusiewicz, C., Niedermeier, R.: Evaluation of ILP-based approaches for partitioning into colorful components. In: Bonifaci, V., Demetrescu, C., Marchetti-Spaccamela, A. (eds.) SEA, volume 7933 of Lecture Notes in Computer Science, pp. 176–187. Springer, Berlin (2013)

  5. 5.

    Bruckner, S., Hüffner, F., Komusiewicz, C., Niedermeier, R., Thiel, S., Uhlmann, J.: Partitioning into colorful components by minimum edge deletions. In: Kärkkäinen, J., Stoye, J., (eds.) CPM, volume 7354 of Lecture Notes in Computer Science, pp. 56–69. Springer, Berlin (2012)

  6. 6.

    Feige, U., Kilian, J.: Zero knowledge and the chromatic number. J. Comput. Syst. Sci. 57(2), 187–199 (1998)

  7. 7.

    He, G., Liu, J., Zhao, C.: Approximation algorithms for some graph partitioning problems. J. Graph Algorithms Appl. 4(2), 1–11 (2000)

  8. 8.

    Mushegian, A.R.: Foundations of Comparative Genomics. Elsevier, Amsterdam (2010)

  9. 9.

    Paz, A., Moran, S.: Non deterministic polynomial optimization problems and their approximations. Theor. Comput. Sci. 15(3), 251–277 (1981)

  10. 10.

    Sankoff, D.: OMG! Orthologs for multiple genomes—competing formulations—(keynote talk). In: Chen, J., Wang, J., Zelikovsky, A. (eds.) ISBRA, volume 6674 of Lecture Notes in Computer Science, pp. 2–3. Springer, Berlin (2011)

  11. 11.

    Savard, O.T., Swenson, K.M.: A graph-theoretic approach for inparalog detection. BMC Bioinform. 13(S-19), S16 (2012)

  12. 12.

    Zheng, C., Swenson, K.M., Lyons, E., Sankoff, D.: OMG! Orthologs in multiple genomes—competing graph-theoretical formulations. In: Przytycka, T.M., Sagot, M.-F. (eds.) WABI, volume 6833 of Lecture Notes in Computer Science, pp. 364–375. Springer, Berlin (2011)

Download references


The first author is supported by the Alexander von Humboldt Foundation. We would like to thank Guillaume Blin for introducing us to the problem and for useful discussions.

Author information

Correspondence to Alexandru Popa.

Additional information

A preliminary version of this paper has been published in proceedings of LATIN 2014.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Adamaszek, A., Popa, A. Algorithmic and Hardness Results for the Colorful Components Problems. Algorithmica 73, 371–388 (2015). https://doi.org/10.1007/s00453-014-9926-0

Download citation


  • Colorful components
  • Graph coloring
  • Exact polynomial-time algorithms
  • Hardness of approximation