Skip to main content

Improved Approximation Algorithms for Box Contact Representations


We study the following geometric representation problem: Given a graph whose vertices correspond to axis-aligned rectangles with fixed dimensions, arrange the rectangles without overlaps in the plane such that two rectangles touch if the graph contains an edge between them. This problem is called Contact Representation of Word Networks (Crown) since it formalizes the geometric problem behind drawing word clouds in which semantically related words are close to each other. Crown is known to be NP-hard, and there are approximation algorithms for certain graph classes for the optimization version, Max-Crown, in which realizing each desired adjacency yields a certain profit. We present the first O(1)-approximation algorithm for the general case, when the input is a complete weighted graph, and for the bipartite case. Since the subgraph of realized adjacencies is necessarily planar, we also consider several planar graph classes (namely stars, trees, outerplanar, and planar graphs), improving upon the known results. For some graph classes, we also describe improvements in the unweighted case, where each adjacency yields the same profit. Finally, we show that the problem is APX-complete on bipartite graphs of bounded maximum degree.

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7


  1. 1.

    Ackerman, E.: A note on 1-planar graphs. Discrete Appl. Math. 175, 104–108 (2014)

    MathSciNet  Article  MATH  Google Scholar 

  2. 2.

    Alon, N., Spencer, J.: The Probabilistic Method. Wiley, Hoboken (1992)

    MATH  Google Scholar 

  3. 3.

    Barth, L., Fabrikant, S.I., Kobourov, S., Lubiw, A., Nöllenburg, M., Okamoto, Y., Pupyrev, S., Squarcella, C., Ueckerdt, T., Wolff, A.: Semantic word cloud representations: hardness and approximation algorithms. In: Pardo, A., Viola, A. (eds) Proceedings of 11th Latin American Symposium Theoritical Information (LATIN’14), vol 8392 of Lecture Notes in Computer Science, pp 514–525. Springer, Heidelberg (2014)

  4. 4.

    Barth, L., Kobourov, S., Pupyrev, S.: Experimental comparison of semantic word clouds. In: Gudmundsson, J., Katajainen, J. (eds) Proceedings of 13th International Symposium on Experimental Algorithms (SEA’14), vol 8504 of Lecture Notes in Computer Science, pp 247–258. Springer, Heidelberg (2014)

  5. 5.

    Briest, P., Krysta, P., Vöcking, B.: Approximation techniques for utilitarian mechanism design. SIAM J. Comput. 40(6), 1587–1622 (2011)

    MathSciNet  Article  MATH  Google Scholar 

  6. 6.

    Buchsbaum, A.L., Gansner, E.R., Procopiuc, C.M., Venkatasubramanian, S.: Rectangular layouts and contact graphs. ACM Trans. Algorithms 4(1) (2008)

  7. 7.

    Chekuri, C., Khanna, S.: A PTAS for the multiple knapsack problem. In: Proceedings of 11th Annual ACM-SIAM Symposum Discrete Algorithms (SODA’00), pp 213–222. SIAM (2000)

  8. 8.

    Cohen, R., Katzir, L., Raz, D.: An efficient approximation for the generalized assignment problem. Inf. Process. Lett. 100(4), 162–166 (2006)

    MathSciNet  Article  MATH  Google Scholar 

  9. 9.

    Cui, W., Wu, Y., Liu, S., Wei, F., Zhou, M., Qu, H.: Context-preserving dynamic word cloud visualization. IEEE Comput. Graph. Appl. 30(6), 42–53 (2010)

    Article  Google Scholar 

  10. 10.

    Dwyer, T., Marriott, K., Stuckey, P.J.: Fast node overlap removal. In: Healy, P., Nikolov, N.S. (eds), Proc. 13th International Symposium on Graph Drawing (GD’05), vol 3843 of Lecture Notes in Computer Science, pp. 153–164. Springer, Heidelberg (2005)

  11. 11.

    Eppstein, D., Mumford, E., Speckmann, B., Verbeek, K.: Area-universal and constrained rectangular layouts. SIAM J. Comput. 41(3), 537–564 (2012)

    MathSciNet  Article  MATH  Google Scholar 

  12. 12.

    Erkan, G., Radev, D.R.: Lexrank: graph-based lexical centrality as salience in text summarization. J. Artif. Int. Res. 22(1), 457–479 (2004)

    Google Scholar 

  13. 13.

    Felsner, S.: Rectangle and square representations of planar graphs. In: Pach, J. (ed.) Thirty Essays on Geometric Graph Theory, pp. 213–248. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

  14. 14.

    Fleischer, L., Goemans, M.X., Mirrokni, V., Sviridenko, M.: Tight approximation algorithms for maximum separable assignment problems. Math. Oper. Res. 36(3), 416–431 (2011)

    MathSciNet  Article  MATH  Google Scholar 

  15. 15.

    Frederickson, G.N.: Fast algorithms for shortest paths in planar graphs, with applications. SIAM J. Comput. 16(6), 1004–1022 (1987)

    MathSciNet  Article  MATH  Google Scholar 

  16. 16.

    Gansner, E.R., Hu, Y.: Efficient, proximity-preserving node overlap removal. J. Graph Algorithms Appl. 14(1), 53–74 (2010)

    MathSciNet  Article  MATH  Google Scholar 

  17. 17.

    Hakimi, S.L., Mitchem, J., Schmeichel, E.F.: Star arboricity of graphs. Discrete Math. 149(1–3), 93–98 (1996)

    MathSciNet  Article  MATH  Google Scholar 

  18. 18.

    Li, H.: Word clustering and disambiguation based on co-occurrence data. J. Nat. Lang. Eng. 8(1), 25–42 (2002)

    Google Scholar 

  19. 19.

    Nash-Williams, C.: Decomposition of finite graphs into forests. J. Lond. Math. Soc. 39, 12 (1964)

    MathSciNet  Article  MATH  Google Scholar 

  20. 20.

    Nishizeki, T., Baybars, I.: Lower bounds on the cardinality of the maximum matchings of planar graphs. Discrete Math. 28(3), 255–267 (1979)

    MathSciNet  Article  MATH  Google Scholar 

  21. 21.

    Nöllenburg, M., Prutkin, R., Rutter, I.: Edge-weighted contact representations of planar graphs. J. Graph Algorithms Appl. 17(4), 441–473 (2013)

    MathSciNet  Article  MATH  Google Scholar 

  22. 22.

    Paulovich, F.V., Toledo, F.M.B., Telles, G.P., Minghim, R., Nonato, L.G.: Semantic wordification of document collections. Comput. Graph. Forum 31(3), 1145–1153 (2012)

    Article  Google Scholar 

  23. 23.

    Raisz, E.: The rectangular statistical cartogram. Geogr. Rev. 24(3), 292–296 (1934)

    Article  Google Scholar 

  24. 24.

    Viégas, F.B., Wattenberg, M., Feinberg, J.: Participatory visualization with Wordle. IEEE Trans. Visual. Comput. Graphics 15(6), 1137–1144 (2009)

    Article  Google Scholar 

  25. 25.

    Weiland, S.: Der Koalitionsvertrag im Schnellcheck (Quick overview of the [German] coalition agreement). Spiegel Online, Click on “Fotos”, 27 Nov. 2013

  26. 26.

    Wu, Y., Provan, T., Wei, F., Liu, S., Ma, K.-L.: Semantic-preserving word clouds by seam carving. Comput. Graph. Forum 30(3), 741–750 (2011)

    Article  Google Scholar 

Download references


We thank the anonymous reviewers for helping us to improve the presentation of our paper. We particularly thank the reviewer who contributed the idea to derandomize our algorithms for the general weighted case using Theorem 4.

Author information



Corresponding author

Correspondence to Philipp Kindermann.

Additional information

A preliminary version of this paper has appeared in Proc. 22nd Eur. Symp. Algorithms (ESA’14), volume 8737 of Lect. Notes Comput. Sci., pages 87–99, Springer-Verlag. Ph. Kindermann and A. Wolff acknowledge support by the ESF EuroGIGA project GraDR. S. Kobourov and S. Pupyrev are supported by NSF Grants CCF-1115971 and DEB 1053573.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Bekos, M.A., van Dijk, T.C., Fink, M. et al. Improved Approximation Algorithms for Box Contact Representations. Algorithmica 77, 902–920 (2017).

Download citation


  • Word clouds
  • Box contact representations
  • Approximation algorithms