Abstract 1 History of planar straight-line graph drawings 2 Truly integral Fáry embeddings of trees and cacti on a poly-size grid References Appendix A Poster

Drawing Trees and Cacti with Integer Edge Lengths on a Polynomial-Size Grid

Henry Förster ORCID Technical University of Munich, Germany Stephen Kobourov ORCID Technical University of Munich, Germany Jacob Miller ORCID Technical University of Munich, Germany Johannes Zink ORCID Technical University of Munich, Germany
Abstract

A strengthened version of Harborth’s well-known conjecture – known as Kleber’s conjecture – states that every planar graph admits a planar straight-line drawing where every edge has integer length and each vertex is restricted to the integer grid. Positive results for Kleber’s conjecture are known for planar 3-regular graphs, for planar graphs that have maximum degree 4, and for planar 3-trees. However, all but one of the existing results are existential and do not provide bounds on the required grid size. We provide polynomial-time algorithms for computing crossing-free straight-line drawings of trees and cactus graphs with integer edge lengths and integer vertex position on polynomial-size integer grids. We also give an historic overview of planar straight-line graph drawing results.

Keywords and phrases:
Harborth’s conjecture, tree drawings, cactus drawings, grid drawings
Category:
Poster Abstract
Copyright and License:
[Uncaptioned image] © Henry Förster, Stephen Kobourov, Jacob Miller, and Johannes Zink; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Mathematics of computing Trees
; Mathematics of computing Graph algorithms ; Theory of computation Graph algorithms analysis
Related Version:
Full Version: https://arxiv.org/abs/2509.04168
Editors:
Vida Dujmović and Fabrizio Montecchiani

1 History of planar straight-line graph drawings

Wagner in 1936 [17], Fáry in 1948 [7], and Stein in 1951 [14] proved independently that every planar graph has a crossings-free drawing with edges drawn by straight-line segments. After these first existential results, algorithms that do create such drawings were described by Tutte in 1963 [16], Chiba, Yamanouchi, and Nishizeki in 1984 [5], and Read in 1986 [12]. In the generated drawings, the ratio between longest and shortest edge can be exponential in the size of the graph. For readability, it helps to have vertices at integer coordinates on a polynomial-size grid. In 1990, two algorithms generating such drawings appeared. De Fraysseix, Pach and Polack [6] use canonical orders whereas Schnyder’s algorithm [13] uses a decomposition of the graph into three trees from which barycentric coordinates can be computed. For n vertices, both algorithms provide a straight-line drawing on the 𝒪(n)×𝒪(n) grid.

Can we also ensure that all edge lengths are integers? These two algorithms [6, 13] can (and do) produce irrational edge lengths. Harborth’s conjecture [9, 10] asks whether every planar graph has a crossings-free realization with straight-line segments of integer lengths, referred to integral Fáry embeddings [4]. A stronger version of Harborth’s conjecture, called Kleber’s conjecture, asks whether an integral Fáry embedding exists with all vertices on the integer grid [11]. We refer to these drawings as truly integral Fáry embeddings.

Sun [15] uses rigidity matrices to prove that all planar (2, 3)-sparse graphs admit integral Fáry embeddings. A graph G is (a, b)-sparse if every subgraph G of G has at most a|V(G)|b edges. (2, 3)-sparse graphs include series-parallel, outerplanar, and planar bipartite graphs. In 2024, Chang and Sun [4] show this result also for all planar 4-regular graphs.

Geelen, Guo, and McKinnon [8] show that every planar max-degree-3 graph admits a truly integral Fáry embedding. Biedl [3] observes that this technique can be applied to all planar (2, 1)-sparse graphs, which include all max-degree-4 graphs that are non-4-regular. Independently, Benediktovich [1] shows this result for max-degree-4 graphs that are non-4-regular and for planar 3-trees. The vertices have rational coordinates, thus, can be scaled to integers. However, they make use of a theorem by Berry [2] to position vertices on a rational point in an ε-disk around a real point, which doesn’t provide guarantees on the distance towards an integral point. If the drawing is scaled to provide a truly integral Fáry embedding, no bound on the area can be provided. To the best of our knowledge, the algorithm by Biedl [3] that produces quadratic truly integral Fáry embeddings for 3-regular planar graphs is the only algorithm in the literature that provides a polynomial upper bound on the area.

2 Truly integral Fáry embeddings of trees and cacti on a poly-size grid

We show that trees and cacti admit truly integral Fáry embeddings on the 𝒪(n2)×𝒪(n2) and 𝒪(n3)×𝒪(n3) integer grids, respectively. For binary trees, 𝒪(n2) follows from [3]; for constant-depth trees like stars, 𝒪(n2) follows from Theorem 1. To ensure integer edge lengths on an integer grid, we are restricted to using Pythagorean triples. Pythagorean triples are all triples of integers a,b,c which satisfy a2+b2=c2. A Pythagorean triple is primitive if a, b, and c are co-prime. The first k primitive Pythagorean triples 𝒫k can be computed in 𝒪(k3/2) time. We denote by 𝒫k the angle-sorted first k primitive Pythagorean triples.

Figure 1: Schematization of our recursive algorithm for drawing trees. Vertex r is placed at (0,0) and its subtree is drawn inside the light-gray cone; vi is drawn at its first assigned triple.

Let T=(V,E) be a (rooted) tree, which has n vertices, leaves, and depth d. Denote the root by r; if no root is given, pick r arbitrarily. If no rotation system is given, choose it arbitrarily. For a vertex vV, we denote by Tv the subtree of T rooted at vertex v and by L(Tv) the number of leaves in Tv. Place r at (0,0). Assign the first child v1 of r the first L(Tv1) primitive Pythagorean triples from 𝒫, assign the second child v2 of r the next L(Tv2) primitive Pythagorean triples from 𝒫, etc. Draw each child v of r at the coordinates (x,y) where (x,y,z) is the first primitive Pythagorean triple assigned to v. For each child v of r, for which v is not a leaf of T, we draw the subtree Tv recursively: in the recursive call, we assume that the coordinate system is centered at the position of v and we use exactly the primitive Pythagorean triples assigned to v; see Figure 1.

Correctness follows from the fact that we use distinct slopes (primitive Pythagorean triples) in distinct subtrees that are sorted such that they fan out. The realization as a linear-time algorithm is straight-forward, however, we add 𝒪(3/2) additional running time for computing primitive Pythagorean triples, which needs to be done only once.

Theorem 1.

Let T=(V,E) be a (rooted) tree, which has n vertices, leaves, and depth d. There is a truly integral Fáry embedding on a grid of size 2π23d×2π23d𝒪(n2)×𝒪(n2), which can be found in 𝒪(n+3/2) time.

With a special handling of cycles, in particular triangles, we can extend the algorithm from trees to cacti and obtain the following result.

Theorem 2.

Let C=(V,E) be a (rooted) cactus, which has n vertices, leaves, diameter d, o cycles out of which δ are triangles. There is a truly integral Fáry embedding on a grid of size (2π23(d+o)(+2o)+δ2(π23(+2o))2)×(2π23(d+o)(+2o)+δ2(π23(+2o))2)𝒪(n3)×𝒪(n3), which can be found in 𝒪(n+(+2o)3/2) time.

References

  • [1] Vladimir I. Benediktovich. On rational approximation of a geometric graph. Discret. Math., 313(20):2061–2064, 2013. doi:10.1016/J.DISC.2013.06.018.
  • [2] T.G. Berry. Points at rational distance from the vertices of a triangle. Acta Arithmetica, LXII(4):391–398, 1992. doi:10.4064/aa-62-4-391-398.
  • [3] Therese Biedl. Drawing some planar graphs with integer edge-lengths. In Proc. CCCG 2011, 2011. URL: http://www.cccg.ca/proceedings/2011/papers/paper36.pdf.
  • [4] Daniel J. Chang and Timothy Sun. Harborth’s conjecture for 4-regular planar graphs. In Proc. GD 2024, 2024. doi:10.4230/LIPICS.GD.2024.38.
  • [5] Norishige Chiba, Tadashi Yamanouchi, and Takao Nishizeki. Linear algorithms for convex drawings of planar graphs. Progress in graph theory, pages 153–173, 1984.
  • [6] Hubert De Fraysseix, János Pach, and Richard Pollack. How to draw a planar graph on a grid. Combinatorica, 10(1):41–51, 1990. doi:10.1007/bf02122694.
  • [7] István Fáry. On straight line representation of planar graphs. Acta Sci. Math.(Szeged), 11:229–233, 1948.
  • [8] Jim Geelen, Anjie Guo, and David McKinnon. Straight line embeddings of cubic planar graphs with integer edge lengths. J. Graph Theory, 58(3):270–274, 2008. doi:10.1002/jgt.20304.
  • [9] Heiko Harborth, Arnfried Kemnitz, Meinhard Möller, and Andreas Süssenbach. Ganzzahlige planare Darstellungen der platonischen Körper. Elem. Math., 45(5):118–122, 1987.
  • [10] Arnfried Kemnitz and Heiko Harborth. Plane integral drawings of planar graphs. Discrete Mathematics, 236(1-3):191–195, 2001. doi:10.1016/s0012-365x(00)00442-8.
  • [11] Michael Kleber. Encounter at far point. The Mathematical Intelligencer, 30:50–53, 2008. doi:10.1007/bf02985756.
  • [12] Ronald C. Read. A new method for drawing a planar graph given the cyclic order of the edges at each vertex. Faculty of Mathematics, University of Waterloo, 1986.
  • [13] Walter Schnyder. Embedding planar graphs on the grid. In Proc. SODA 1990, 1990. URL: https://dl.acm.org/doi/10.5555/320176.320191.
  • [14] Sherman K Stein. Convex maps. Proc. Am. Math. Soc., 2(3):464–466, 1951.
  • [15] Timothy Sun. Rigidity-theoretic constructions of integral fary embeddings. In Proc. CCCG 2011, 2011. URL: http://www.cccg.ca/proceedings/2011/papers/paper20.pdf.
  • [16] William Thomas Tutte. How to draw a graph. Proceedings of the London Mathematical Society, 3(1):743–767, 1963. doi:10.1112/plms/s3-13.1.743.
  • [17] Klaus Wagner. Bemerkungen zum Vierfarbenproblem. Jahresbericht der Deutschen Mathematiker-Vereinigung, 46:26–32, 1936.

Appendix A Poster