Introduction

Tropical plane curves C are dual to regular subdivisions of their Newton polygon P. The tropical curve C is smooth if that subdivision is a unimodular triangulation Δ, i.e. it consists of triangles whose only lattice points are its three vertices. The genus g=g(C) is the number of interior lattice points of P. Each bounded edge of C has a well-defined lattice length. The curve C contains a subdivision of a metric graph of genus g with vertices of valency ≥3 as in [5], and this subdivision is unique for g≥2. The underlying graph G is planar and has g distinguished cycles, one for each interior lattice point of P. We call G the skeleton of C. It is the smallest subspace of C to which C admits a deformation retract.

While the metric on G depends on C, the graph is determined by Δ. For an illustration, see Figure 1. The triangulation Δ on the left defines a family of smooth tropical plane curves of degree four. Such a curve has genus g=3. Its skeleton G is shown on the right.

Figure 1
figure 1

Unimodular triangulation, tropical quartic, and skeleton.

For basics on tropical geometry and further references, the reader is referred to [19,26]. Let \(\mathbb {M}_{g}\) denote the moduli space of metric graphs of genus g. The moduli space \(\mathbb {M}_{g}\) is obtained by gluing together finitely many orthants \(\mathbb {R}_{\geq 0}^{m}\), m≤3g−3, one for each combinatorial type of graph, modulo the identifications corresponding to graph automorphisms. These automorphisms endow the moduli space \(\mathbb {M}_{g}\) with the structure of a stacky fan. We refer to [7,11] for the definition of \(\mathbb {M}_{g}\), combinatorial details, and applications in algebraic geometry. The maximal cones of \(\mathbb {M}_{g}\) correspond to trivalent graphs of genus g. These have 2g−2 vertices and 3g−3 edges, so \(\mathbb {M}_{g}\) is pure of dimension 3g−3. The number of trivalent graphs for g=2,3,…,10 is 2,5,17,71,388,2592,21096,204638,2317172; see [6] and [11, Prop. 2.1].

Fix a (convex) lattice polygon P with \(g = \# (\text {int}(P) \cap \mathbb {Z}^{2})\). Let \(\mathbb {M}_{P}\) be the closure in \(\mathbb {M}_{g}\) of the set of metric graphs that are realized by smooth tropical plane curves with Newton polygon P. For a fixed regular unimodular triangulation Δ of P, let \(\mathbb {M}_{\Delta } \) be the closure of the cone of metric graphs from tropical curves dual to Δ. These curves all have the same skeleton G, and \(\mathbb {M}_{\Delta }\) is a convex polyhedral cone in the orthant \(\mathbb {R}_{\geq 0}^{3g-3}\) of metrics on G. Working modulo automorphisms of G, we identify \(\mathbb {M}_{\Delta }\) with its image in the stacky fan \(\mathbb {M}_{g}\).

Now, fix the skeleton G but vary the triangulation. The resulting subset of \(\mathbb {R}_{\geq 0}^{3g-3}\) is a finite union of closed convex polyhedral cones, so it can be given the structure of a polyhedral fan. Moreover, by appropriate subdivisions, we can choose a fan structure that is invariant under the symmetries of G, and hence the image in the moduli space \(\mathbb {M}_{g}\) is a stacky fan:

$$ {\small{\begin{aligned} \mathbb{M}_{P,G} \quad := \ \bigcup_{\Delta\ \text{triangulation of P} \atop \text{with skeleton } G} \mathbb{M}_{\Delta}. \end{aligned}}} $$
((1))

We note that \(\mathbb {M}_{P}\) is represented inside \(\mathbb {M}_{g}\) by finite unions of convex polyhedral cones:

$$ {\small{\begin{aligned} \mathbb{M}_{P} \quad = \bigcup_{G\ \text{trivalent graph}\atop \text{of genus } g} \!\!\! M_{P,G} \quad = \ \ \bigcup_{\Delta\ \text{regular unimodular} \atop \text{triangulation of } P} \!\!\!\! \mathbb{M}_{\Delta}. \end{aligned}}} $$
((2))

The moduli space of tropical plane curves of genus g is the following stacky fan inside \(\mathbb {M}_{g}\):

$$ {\small{\begin{aligned} \mathbb{M}_{g}^{\text{planar}} \ := \ \, \bigcup_{P} \,\mathbb{M}_{P}. \end{aligned}}} $$
((3))

Here, P runs over isomorphism classes of lattice polygons with g interior lattice points. The number of such classes is finite by Proposition 2.3.

This paper presents a computational study of the moduli spaces \(\mathbb {M}_{g}^{\text {planar}}\). We construct the decompositions in Equations 2 and 3, explicitly. Our first result reveals the dimensions:

Theorem 1.1.

For all g≥2, there exists a lattice polygon P with g interior lattice points such that \(\mathbb {M}_{P}\) has the dimension expected from classical algebraic geometry, namely,

$$ \dim\left(\mathbb{M}_{g}^{\text{planar}}\right) \quad = \quad \dim(\mathbb{M}_{P}) \quad = \quad \left\{ \begin{array}{lll} \,\, 3 && \text{if} \quad g = 2, \\ \,\, 6 && \text{if} \quad g = 3, \\ \,\, 16 && \text{if} \quad g = 7, \\ \,\, 2g+1 && \text{otherwise}. \end{array}\right. $$
((4))

In each case, the cone \(\,\mathbb {M}_{\Delta }\) of honeycomb curves supported on P attains this dimension.

Honeycomb curves are introduced in Section ‘Honeycombs’. That section furnishes the proof of Theorem 1.1. The connection between tropical and classical curves will be explained in Section ‘Algebraic geometry’. The number 2g+1 in Equation 4 is the dimension of the classical moduli space of trigonal curves of genus g, whose tropicalization is related to our stacky fan \(\mathbb {M}_{g}^{\text {planar}}\). Our primary source for the relevant material from algebraic geometry is the article [10] by Castryck and Voight. Our paper can be seen as a refined combinatorial extension of theirs. For related recent work that incorporates also immersions of tropical curves, see Cartwright et al. [8].

We begin in Section ‘Combinatorics and computations’ with an introduction to the relevant background from geometric combinatorics. The objects in Equations 1 to 3 are carefully defined, and we explain our algorithms for computing these explicitly, using the software packages TOPCOM [28] and polymake [2,16].

Our main results in this paper are Theorems 5.1, 6.3, 7.1, and 8.5. These concern g=3,4,5, and they are presented in Sections ‘Genus three’ through ‘Genus five and beyond’. The proofs of these theorems rely on the computer calculations that are described in Section ‘Combinatorics and computations’. In Section ‘Genus three’, we study plane quartics as in Figure 1. Their Newton polygon is the size four triangle T 4. This models non-hyperelliptic genus 3 curves in their canonical embedding. We compute the space \(\mathbb {M}_{T_{4}}\). Four of the five trivalent graphs of genus 3 are realized by smooth tropical plane curves.

In Section ‘Hyperelliptic curves’, we show that all metric graphs arising from hyperelliptic polygons of given genus arise from a single polygon, namely, the hyperelliptic triangle. We determine the space \(\mathbb {M}^{\text {planar}}_{3,\text {hyp}}\), which together with \(\mathbb {M}_{T_{4}}\) gives \(\mathbb {M}^{\text {planar}}_{3}\). Section ‘Genus four’ deals with curves of genus g=4. Here, Equation 3 is a union over four polygons, and precisely 13 of the 17 trivalent graphs G are realized in Equation 2. The dimensions of the cones \(\mathbb {M}_{P,G}\) range between 4 and 9. In Section ‘Genus five and beyond’, we study curves of genus g=5. Here, 38 of the 71 trivalent graphs are realizable. Some others are ruled out by the sprawling condition in Proposition 8.3. We end with a brief discussion of g≥6 and some open questions.

Combinatorics and computations

The methodology of this paper is computations in geometric combinatorics. In this section, we fix notation, supply definitions, present algorithms, and give some core results. For additional background, the reader is referred to the book by De Loera, Rambau, and Santos [13].

Let P be a lattice polygon, and let \(A=P\cap \mathbb {Z}^{2}\) be the set of lattice points in P. Any function \(h:A\to \mathbb {R}\) is identified with a tropical polynomial with Newton polygon P, namely,

$$H(x,y) \,\,\,\, = \,\,\, \bigoplus_{(i,j) \in A } h(i,j) \odot x^{i} \odot y^{j}. $$

The tropical curve C defined by this min-plus polynomial consists of all points \((x,y) \in \mathbb {R}^{2}\) for which the minimum among the quantities i·x+j·y+h(i,j) is attained at least twice as (i,j) runs over A. The curve C is dual to the regular subdivision Δ of A defined by h. To construct Δ, we lift each lattice point aA to the height h(a) then take the lower convex hull of the lifted points in \(\mathbb {R}^{3}\). Finally, we project back to \(\mathbb {R}^{2}\) by omitting the height. The maximal cells are the images of the facets of the lower convex hull under the projection. The set of all height functions h which induce the same subdivision Δ is a relatively open polyhedral cone in \(\mathbb {R}^{A}\). This is called the secondary cone and is denoted Σ(Δ). The collection of all secondary cones Σ(Δ) is a complete polyhedral fan in \(\mathbb {R}^{A}\), the secondary fan of A.

A subdivision Δ is a triangulation if all maximal cells are triangles. The maximal cones in the secondary fan Σ(Δ) correspond to the regular triangulations Δ of A. Such a cone is the product of a pointed cone of dimension # A−3 and a 3-dimensional subspace of \(\mathbb {R}^{A}\).

We are interested in regular triangulations Δ of P that are unimodular. This means that each triangle in Δ has area 1/2, or, equivalently, that every point in \(A = P \cap \mathbb {Z}^{2}\) is a vertex of Δ. We derive an inequality representation for the secondary cone Σ(Δ) as follows. Consider any four points a=(a 1,a 2), b=(b 1,b 2), c=(c 1,c 2) and d=(d 1,d 2) in A such that the triples (c,b,a) and (b,c,d) are clockwise-oriented triangles of Δ. Then, we require

$$ \det\left(\begin{array}{llll} 1 & 1 & 1 & 1 \\ a_{1} & b_{1} & c_{1} & d_{1} \\ a_{2} & b_{2} & c_{2} & d_{2} \\ h(a) & h(b) & h(c) & h(d) \end{array}\right) \,\, \geq \,\,0. $$
((5))

This is a linear inequality for \(h \in \mathbb {R}^{A}\). It can be viewed as a ‘flip condition’, determining which of the two diagonals of a quadrilateral are in the subdivision. We have one such inequality for each interior edge bc of Δ. The set of solutions to these linear inequalities is the secondary cone Σ(Δ). From this, it follows that the lineality space Σ(Δ)∩−Σ(Δ) of the secondary cone is 3-dimensional. It is the space Lin(A) of functions \(h \in \mathbb {R}^{A}\) that are restrictions of affine-linear functions on \(\mathbb {R}^{2}\). We usually identify Σ(A) with its image in \(\mathbb {R}^{A} /\text {Lin}(A)\), which is a pointed cone of dimension # A−3. That pointed cone has finitely many rays, and we represent these by vectors in \(\mathbb {R}^{A}\).

Suppose that Δ has E interior edges and g interior vertices. We consider two linear maps

$$ \mathbb{R}^{A} \,\,\buildrel{\lambda}\over{\longrightarrow} \,\, \mathbb{R}^{E} \,\, \buildrel{\kappa}\over{\longrightarrow} \,\, \mathbb{R}^{3g-3}. $$
((6))

The map λ takes h and outputs the vector whose bc coordinate equals Equation 5. This determinant is nonnegative: it is precisely the length of the edge of the tropical curve C that is dual to bc. Hence, λ(h) is the vector whose coordinates are the lengths of the bounded edges of C, and κ(λ(h)) is the vector whose 3g−3 coordinates are the lengths of the edges of the skeleton G.

Remark 2.1.

The (lattice) length of an edge of C with slope p/q, where p,q are relatively prime integers, is the Euclidean length of the edge divided by \(\sqrt {p^{2}+q^{2}}\). This lets one quickly read off the lengths from a picture of C without having to compute the determinant (Equation 5).

Each edge e of the skeleton G is a concatenation of edges of C. The second map κ adds up the corresponding lengths. Thus, the composition (Equation 6) is the linear map with e th coordinate

$$\qquad (\kappa \circ \lambda)(h)_{e} \,\,\, = \sum_{bc\,:\, \text{the dual of } bc \atop \text{contributes to } e} \!\!\! \lambda(h)_{bc} \qquad \qquad \text{for all edges } e\ \, \text{of}\ \, G. $$

By definition, the secondary cone is mapped into the nonnegative orthant under λ. Hence,

$$ \Sigma(\Delta) \,\,\buildrel{\lambda}\over{\longrightarrow} \,\, \mathbb{R}_{\geq 0}^{E} \,\, \buildrel{\kappa}\over{\longrightarrow} \,\, \mathbb{R}_{\geq 0}^{3g-3}. $$
((7))

Our discussion implies the following result on the cone of metric graphs arising from Δ:

Proposition 2.2.

The cone \(\,\mathbb {M}_{\Delta }\) is the image of the secondary cone Σ(Δ) under κλ.

Given any lattice polygon P, we seek to compute the moduli space \(\mathbb {M}_{P}\) via the decompositions in Equation 2. Our line of attack towards that goal can now be summarized as follows:

  1. 1.

    compute all regular unimodular triangulations of \(A = P \cap \mathbb {Z}^{2}\) up to symmetry;

  2. 2.

    sort the triangulations into buckets, one for each trivalent graph G of genus g;

  3. 3.

    for each triangulation Δ with skeleton G, compute its secondary cone \(\Sigma (\Delta) \subset \mathbb {R}^{A}\);

  4. 4.

    for each secondary cone Σ(Δ), compute its image \(\mathbb {M}_{\Delta }\) in the moduli space \(\mathbb {M}_{g}\) via Equation 7;

  5. 5.

    merge the results to get the fans \(\mathbb {M}_{P,G} \subset \mathbb {R}^{3g-3}\) in (1) and the moduli space \(\mathbb {M}_{P}\) in Equation 2.

Step 1 is based on computing the secondary fan of A. There are two different approaches to doing this. The first, more direct, method is implemented in Gfan [20]. It starts out with one regular triangulation of Δ, e.g. a placing triangulation arising from a fixed ordering of A. This comes with an inequality description for Σ(Δ), as in Equation 5. From this, Gfan computes the rays and the facets of Σ(Δ). Then, Gfan proceeds to an adjacent secondary cone Σ(Δ ) by producing a new height function from traversing a facet of Σ(Δ). Iterating this process results in a breadth-first search through the edge graph of the secondary polytope of A.

The second method starts out the same. But it passes from Δ to a neighboring triangulation Δ that need not be regular. It simply performs a purely combinatorial restructuring known as a bistellar flip. The resulting breadth-first search is implemented in TOPCOM [28]. Note that a bistellar flip corresponds to inverting the sign in one of the inequalities in Equation 5.

Neither algorithm is generally superior to the other, and sometimes it is difficult to predict which one will perform better. The flip algorithm may suffer from wasting time by also computing non-regular triangulations, while the polyhedral algorithm is genuinely costly since it employs exact rational arithmetic. The flip algorithm also uses exact coordinates but only in a preprocessing step which encodes the point configuration as an oriented matroid. Both algorithms can be modified to enumerate all regular unimodular triangulations up to symmetry only. For our particular planar instances, we found TOPCOM to be more powerful.

We start Step 2 by computing the dual graph of a given Δ. The nodes are the triangles and the edges record incidence. Hence, each node has degree 1, 2, or 3. We then recursively delete the nodes of degree 1. Next, we recursively contract edges which are incident with a node of degree 2. The resulting trivalent graph G is the skeleton of Δ. It often has loops and multiple edges. In this process, we keep track of the history of all deletions and contractions.

Steps 3 and 4 are carried out using polymake [16]. Here, the buckets or even the individual triangulations can be treated in parallel. The secondary cone Σ(Δ) is defined in \(\mathbb {R}^{A}\) by the linear inequalities λ(h)≥0 in Equation 5. From this, we compute the facets and rays of Σ(Δ). This is essentially a convex hull computation. In order to get unique rays modulo Lin(A), we fix h=0 on the three vertices of one particular triangle. Since the cones are rather small, the choice of the convex hull algorithm does not matter much. For details on state-of-the-art convex hull computations and an up-to-date description of the polymake system, see [2].

For Step 4, we apply the linear map κλ to all rays of the secondary cone Σ(Δ). Their images are vectors in \(\mathbb {R}^{3g-3}\) that span the moduli cone \(\mathbb {M}_{\Delta } = (\kappa \circ \lambda)(\Sigma (\Delta))\). Via a convex hull computation as above, we compute all the rays and facets of \(\mathbb {M}_{\Delta } \).

The cones \(\mathbb {M}_{\Delta }\) are generally not full-dimensional in \(\mathbb {R}^{3g-3}\). The points in the relative interior are images of interior points of Σ(Δ). Only these represent smooth tropical curves. However, it can happen that another cone \(\mathbb {M}_{\Delta '}\) is a face of \(\mathbb {M}_{\Delta }\). In that case, the metric graphs in the relative interior of that face are also realizable by smooth tropical curves.

Step 5 has not been fully automatized yet, but we carry it out in a case-by-case manner. This will be described in detail for curves of genus g=3 in Sections ‘Genus three’ and ‘Hyperelliptic curves’.

We now come to the question of what lattice polygons P should be the input for Step 1. Our point of departure towards answering that question is the following finiteness result.

Proposition 2.3.

For every fixed genus g≥1, there are only finitely many lattice polygons P with g interior lattice points, up to integer affine isomorphisms in \(\mathbb {Z}^{2}\).

Proof and Discussion.

Scott [29] proved that \(\#\left (\partial P\cap \mathbb {Z}^{2}\right) \leq 2g+7\), and this bound is sharp. This means that the number of interior lattice points yields a bound on the total number of lattice points in P. This result was generalized to arbitrary dimensions by Hensley [18]. Lagarias and Ziegler [24] improved Hensley’s bound and further observed that there are only finitely many lattice polytopes with a given total number of lattice points, up to unimodular equivalence [24, Theorem 2]. Castryck [9] gave an algorithm for finding all lattice polygons of a given genus, along with the number of lattice polygons for each genus up to 30. We remark that the assumption g≥1 is essential, as there are lattice triangles of arbitrarily large area and without any interior lattice point.

Proposition 2.3 ensures that the union in Equation 3 is finite. However, from the full list of polygons P with g interior lattice points, only very few will be needed to construct \(\mathbb {M}_{g}^{\text {planar}}\). To show this, and to illustrate the concepts seen so far, we now discuss our spaces for g≤2.

Example 2.4.

For g=1, only one polygon P is needed in Equation 3, and only one triangulation Δ is needed in Equation 2. We take P=conv{(0,0),(0,3),(3,0)}, since every smooth genus 1 curve is a plane cubic, and we let Δ be the honeycomb triangulation from Section ‘Honeycombs’. The skeleton G is a cycle whose length is the tropical j-invariant [5, §7.1]. We can summarize this as follows:

$$ \mathbb{M}_{\Delta} \,\,=\,\, \mathbb{M}_{P,G} \,\, = \,\, \mathbb{M}_{P} \,\, = \,\, \mathbb{M}_{1}^{\text{planar}} \,\, = \,\, \mathbb{M}_{1} \,\, = \,\, \mathbb{R}_{\geq 0}. $$
((8))

All inclusions in Equation 12 are equalities for this particular choice of (P,Δ).

Example 2.5.

In classical algebraic geometry, all smooth curves of genus g=2 are hyperelliptic, and they can be realized with the Newton polygon P=conv{(0,0),(0,2),(6,0)}. There are two trivalent graphs of genus 2, namely, the theta graph and the dumbbell graph . The moduli space \(\mathbb {M}_{2}\) consists of two quotients of the orthant \(\mathbb {R}^{3}_{\geq 0}\), one for each graph, glued together. For nice drawings, see Figures three and four in [11]. Figure 2 shows three unimodular triangulations Δ 1, Δ1′, and Δ 2 of P such that almost all metric graphs in \(\mathbb {M}_{2}\) are realized by a smooth tropical curve C dual to Δ 1, Δ1′, or Δ 2. We say ‘almost all’ because here, the three edges of G 1 cannot have all the same length [8, Proposition 4.7]. The triangulations Δ 1 and Δ1′ both give G 1 as a skeleton. If abc denote the edge lengths on G 1, then the curves dual to Δ 1 realize all metrics with ab>c, and the curves dual to Δ1′ realize all metrics with a>b=c. The triangulation Δ 2 gives G 2 as a skeleton, and the curves dual to it achieve all possible metrics. Since our 3-dimensional cones are closed by definition,

$$ {}\left(\mathbb{M}_{\Delta_{1}} \!\cup \mathbb{M}_{\Delta'_{1}}\right) \cup \,\mathbb{M}_{\Delta_{2}} = \mathbb{M}_{P,G_{1}} \,\cup \, \mathbb{M}_{P,G_{2}} = \mathbb{M}_{P} = \mathbb{M}_{2}^{\text{planar}} = \mathbb{M}_{2}. $$
((9))
Figure 2
figure 2

The triangulations Δ 1 , Δ 1 , and Δ 2 .

In Section ‘Hyperelliptic curves’, we extend this analysis to hyperelliptic curves of genus g≥3. See Figure three in [11]. The graphs G 1 and G 2 represent the chains for g=2. For information on hyperelliptic skeletons, see [12].

With g=1,2 out of the way, we now assume g≥3. We follow the approach of Castryck and Voight [10] in constructing polygons P that suffice for the union (Equation 3). We write P int for the convex hull of the g interior lattice points of P. This is the interior hull of P. The relationship between the polygons P and P int is studied in polyhedral adjunction theory [14].

Lemma 2.6.

Let PQ be lattice polygons with P int=Q int. Then \(\mathbb {M}_{P}\) is contained in \(\mathbb {M}_{Q}\).

Proof.

By [13], Lemma 4.3.5, a triangulation Δ of any point set S can be extended to a triangulation Δ of any superset S S. If Δ is regular, then so is Δ . Applying this result to a regular triangulation of P which uses all lattice points in P yields a regular triangulation of Q which uses all lattice points in Q. The triangulations of a lattice polygon which use all lattice points are precisely the unimodular ones (This is a special property of planar triangulations.). We conclude that every tropical curve C dual to Δ is contained in a curve C dual to Δ , except for unbounded edges of C. The skeleton and its possible metrics remain unchanged, since P int=Q int. We therefore have the equality of moduli cones \(\mathbb {M}_{\Delta } = \mathbb {M}_{\Delta '}\). The unions for P and Q in Equation 2 show that \(\mathbb {M}_{P} \subseteq \mathbb {M}_{Q}\).

This lemma shows that we only need to consider maximal polygons, i.e. those P that are maximal with respect to inclusion for fixed P int. If P int is 2-dimensional, then this determines P uniquely. Namely, suppose that \(P_{\text {int}} = \{(x,y) \in \mathbb {R}^{2} \,:\, a_{i} x + b_{i} y \leq c_{i} \,\text {for} \,\, i = 1,2,\ldots,s \}\), where \(\gcd (a_{i},b_{i},c_{i})=1\) for all i. Then, P is the polygon \(\,\{(x,y) \in \mathbb {R}^{2} \,:\, a_{i} x + b_{i} y \leq c_{i}+1 \,\,\text {for} \,\, i = 1,2,\ldots,s \}\). If P is a lattice polygon, then it is a maximal lattice polygon. However, it can happen that P has non-integral vertices. In that case, the given P int is not the interior of any lattice polygon.

The maximal polygon P is not uniquely determined by P int when P int is a line segment. For each g≥2, there are g+2 distinct hyperelliptic trapezoids to be considered. We shall see in Theorem 6.1 that for our purposes, it suffices to use the triangle conv{(0,0),(0,2),(2g+2,0)}.

Here is the list of all maximal polygons we use as input for the pipeline described above.

Proposition 2.7.

Up to isomorphism, there are precisely 12 maximal polygons P such that P int is 2-dimensional and \(3 \leq g = \# (P_{\text {int}} \cap \mathbb {Z}^{2}) \leq 6\). For g=3, there is a unique type, namely, T 4= conv{(0,0),(0,4),(4,0)}. For g=4, there are three types:

$$ \begin{array}{cc}{Q}_1^{(4)}={R}_{3,3}=\operatorname{conv}\left\{\left(0,0\right),\left(0,3\right),\left(3,0\right),\left(3,3\right)\right\},& {Q}_2^{(4)}=\operatorname{conv}\left\{\left(0,0\right),\left(0,3\right),\left(6,0\right)\right\},\\ {}{Q}_3^{(4)}=\operatorname{conv}\left\{\left(0,2\right),\left(2,4\right),\left(4,0\right)\right\}.\end{array} $$

For g=5, there are four types of maximal polygons:

$$ \begin{array}{cc}{Q}_1^{(5)}=\operatorname{conv}\left\{\left(0,0\right),\left(0,4\right),\left(4,2\right)\right\},& {Q}_2^{(5)}=\operatorname{conv}\left\{\left(2,0\right),\left(5,0\right),\left(0,5\right),\left(0,2\right)\right\},\\ {}{Q}_3^{(5)}=\operatorname{conv}\left\{\left(2,0\right),\left(4,2\right),\left(2,4\right),\left(0,2\right)\right\},& {Q}_4^{(5)}=\operatorname{conv}\left\{\left(0,0\right),\left(0,2\right),\left(2,0\right),\left(4,4\right)\right\}.\end{array} $$

For g=6, there are four types of maximal polygons:

$$ \begin{array}{cc}{Q}_1^{(6)}={T}_5=\operatorname{conv}\left\{\left(0,0\right),\left(0,5\right),\left(5,0\right)\right\},& \kern0.90em {Q}_2^{(6)}=\operatorname{conv}\left\{\left(0,0\right),\left(0,7\right),\left(3,0\right),\left(3,1\right)\right\},\\ {}{Q}_3^{(6)}={R}_{3,4}=\operatorname{conv}\left\{\left(0,0\right),\left(0,4\right),\left(3,0\right),\left(3,4\right)\right\},& \kern0.90em {Q}_4^{(6)}=\operatorname{conv}\left\{\left(0,0\right),\left(0,4\right),\left(2,0\right),\left(4,2\right)\right\}.\end{array} $$

The notation we use for polygons is as follows. We write \(Q^{(g)}_{i}\) for maximal polygons of genus g, but we also use a systematic notation for families of polygons, including the triangles T d = conv{(0,0),(0,d),(d,0)} and the rectangles R d,e = conv{(0,0),(d,0),(0,e),(d,e)}.

Proposition 2.7 is found by exhaustive search, using Castryck’s method in [9]. We started by classifying all types of lattice polygons with precisely g lattice points. These are our candidates for P int. For instance, for g=5, there are six such polygons. Four of them are the interior hulls of the polygons \(Q^{(5)}_{i}\) with i=1,2,3,4. The other two are the triangles

$$ \operatorname{conv}\left\{\left(1,1\right),\left(1,4\right),\left(2,1\right)\right\}\kern2em \mathrm{and}\kern2em \operatorname{conv}\left\{\left(1,1\right),\left(2,4\right),\left(3,2\right)\right\}. $$

However, neither of these two triangles arises as P int for any lattice polygon P. For each genus g, we construct the stacky fans \(\mathbb {M}_{g}^{\text {planar}}\) by computing each of the spaces \(\mathbb {M}_{Q^{(g)}_{i}}\) and then subdividing their union appropriately. This is then augmented in Section ‘Hyperelliptic curves’ by the spaces \(\mathbb {M}_{P}\) where P int is not 2-dimensional, but is instead a line segment.

Algebraic geometry

In this section, we discuss the context from algebraic geometry that lies behind our computations and combinatorial analyses. Let K be an algebraically closed field that is complete with respect to a surjective non-archimedean valuation \( \kern0.3em \operatorname{val}:{K}^{\ast}\to \mathbb{R} \). Every smooth complete curve over K defines a metric graph G. This is the Berkovich skeleton of the analytification of as in [5]. By our hypotheses, every metric graph G of genus g arises from some curve over K. This defines a surjective tropicalization map from (the K-valued points in) the moduli space of smooth curves of genus g to the moduli space of metric graphs of genus g:

$$ \operatorname{trop}:\kern0.3em {\mathcal{M}}_g\kern0.3em \to \kern0.3em {\mathbb{M}}_g. $$
((10))

Both spaces have dimension 3g−3 for g≥2. The map (Equation 10) is referred to as ‘naive set-theoretic tropicalization’ by Abramovich, Caporaso, and Payne [1]. We point to that article and its bibliography for the proper moduli-theoretic settings for our combinatorial objects.

Consider plane curves defined by a Laurent polynomial \(f=\sum _{(i,j)\in \mathbb {Z}^{2}}c_{\textit {ij}}x^{i}y^{j}\in K\left [x^{\pm },y^{\pm }\right ]\) with Newton polygon P. For τ a face of P, we let \(f|_{\tau }=\sum _{(i,j)\in \tau }c_{\textit {ij}}x^{i}y^{j}\) and say that f is non-degenerate if f| τ has no singularities in (K )2 for any face τ of P. Non-degenerate polynomials are useful for studying many subjects in algebraic geometry, including singularity theory [23], the theory of sparse resultants [17], and topology of real algebraic curves [27].

Let P be any lattice polygon in \(\mathbb {R}^{2}\) with g interior lattice points. We write \(\mathcal {M}_{P}\) for the Zariski closure (inside the non-compact moduli space \(\mathcal {M}_{g}\)) of the set of curves that appear as non-degenerate plane curves over K with Newton polygon P. This space was introduced by Koelman [22]. In analogy to Equation 3, we consider the union over all relevant polygons:

$$ \mathcal{M}_{g}^{\text{planar}} \,\,\, := \,\,\,\, \bigcup_{P} \,\mathcal{M}_{P}. $$
((11))

This moduli space was introduced and studied by Castryck and Voight in [10]. That article was a primary source of inspiration for our study. In particular, [10], Theorem 2.1 determined the dimensions of the spaces \(\mathcal {M}_{g}^{\text {planar}}\) for all g. Whenever we speak about the ‘dimension expected from classical algebraic geometry’, as we do in Theorem 1.1, this refers to the formulas for \(\dim (\mathcal {M}_{P})\) and \(\dim \left (\mathcal {M}_{g}^{\text {planar}}\right)\) that were derived by Castryck and Voight.

By the Structure Theorem for Tropical Varieties [26, §3.3], these dimensions are preserved under the tropicalization map (Equation 10). The images \( \operatorname{trop}\left({\mathcal{M}}_P\right) \) and \( \operatorname{trop}\left(\underset{g}{\overset{\mathrm{planar}}{\mathcal{M}}}\right) \) are stacky fans that live inside \(\mathbb {M}_{g} = {\text {trop}}(\mathcal {M}_{g})\) and have the expected dimension. Furthermore, all maximal cones in \({\text {trop}}(\mathcal {M}_{P})\) have the same dimension since \(\mathcal {M}_{P}\) is irreducible (in fact, unirational).

We summarize the objects discussed so far in a diagram of surjections and inclusions:

((12))

For g≥3, the inclusions between the second row and the third row are strict, by a wide margin. This is the distinction between tropicalizations of plane curves and tropical plane curves. One main objective of this paper is to understand how the latter sit inside the former.

For example, consider g=3 and T 4= conv{(0,0),(0,4),(4,0)}. Disregarding the hyperelliptic locus, equality holds in the second row:

$$ \kern0.3em \operatorname{trop}\left({\mathcal{M}}_{T_4}\right)\kern0.60em =\kern0.60em \operatorname{trop}\left(\underset{3}{\overset{\mathrm{planar}}{\mathcal{M}}}\right)\kern0.60em =\kern0.60em \operatorname{trop}\left({\mathcal{M}}_3\right)\kern0.60em =\kern0.60em {\mathbb{M}}_3. $$
((13))

This is the stacky fan in [11], Figure one. The space \(\mathbb {M}_{T_{4}}=\mathbb {M}^{\text {planar}}_{3,\text {nonhyp}}\) of tropical plane quartics is also 6-dimensional, but it is smaller. It fills up less than 30% of the curves in \(\mathbb {M}_{3}\); see Corollary 5.2. Most metric graphs of genus 3 do not come from plane quartics.

For g=4, the canonical curve is a complete intersection of a quadric surface with a cubic surface. If the quadric is smooth, then we get a curve of bidegree (3,3) in \(\mathbb {P}^{1} \times \mathbb {P}^{1}\). This leads to the Newton polygon R 3,3= conv{(0,0),(3,0),(0,3),(3,3)}. Singular surfaces lead to families of genus 4 curves of codimensions 1 and 2 that are supported on two other polygons [10, §6]. As we shall see in Theorem 7.1, \(\mathbb {M}_{P}\) has the expected dimension for each of the three polygons P. Furthermore, \(\mathbb {M}^{\text {planar}}_{4}\) is strictly contained in \( \operatorname{trop}\left(\underset{4}{\overset{\mathrm{planar}}{\mathcal{M}}}\right) \). Detailed computations that reveal our spaces for g=3,4,5 are presented in Sections ‘Genus three’, ‘Hyperelliptic curves’, ‘Genus four’, and ‘Genus five and beyond’.

We close this section by returning once more to classical algebraic geometry. Let \(\mathcal {T}_{g}\) denote the trigonal locus in the moduli space \(\mathcal {M}_{g}\). It is well known that \(\mathcal {T}_{g}\) is an irreducible subvariety of dimension 2g+1 when g≥5. For a proof, see [15, Proposition 2.3]. A recent theorem of Ma [25] states that \(\mathcal {T}_{g}\) is a rational variety for all g.

We note that Ma’s work, as well as the classical approaches to trigonal curves, are based on the fact that canonical trigonal curves of genus g are realized by a certain special polygon P. This is either the rectangle in Equation 17 or the trapezoid in Equation 18. These polygons appear in [10], Section 12, where they are used to argue that \(\mathcal {T}_{g}\) defines one of the irreducible components of \(\mathcal {M}_{g}^{\text {planar}}\), namely, \(\mathcal {M}_{P}\). The same P appear in the next section, where they serve to prove one inequality on the dimension in Theorem 1.1. The combinatorial moduli space \(\mathbb {M}_{P}\) is full-dimensional in the tropicalization of the trigonal locus. The latter space, denoted \( \operatorname{trop}\left({\mathcal{T}}_g\right) \), is contained in the space of trigonal metric graphs, by Baker’s Specialization Lemma [3, §2].

In general, \(\mathcal {M}_{g}^{\text {planar}}\) has many irreducible components other than the trigonal locus \(\mathcal {T}_{g}\). As a consequence, there are many skeleta in \(\mathbb {M}_{g}^{\text {planar}}\) that are not trigonal in the sense of metric graph theory. This is seen clearly in the top dimension for g=7, where \(\dim (\mathcal {T}_{7}) = 15\) but \(\dim \left (\mathcal {M}_{7}^{\text {planar}}\right) = 16\). The number 16 comes from the family of trinodal sextics in [10, §12].

Honeycombs

We now prove Theorem 1.1. This will be done using the special family of honeycomb curves. The material in this section is purely combinatorial. No algebraic geometry will be required.

We begin by defining the polygons that admit a honeycomb triangulation. These polygons depend on four integer parameters a,b,c, and d that satisfy the constraints

$$ 0 \,\leq \, c \,\leq \,a,b \, \leq \, d \,\leq \, a+b. $$
((14))

To such a quadruple (a,b,c,d), we associate the polygon

$$H_{a,b,c,d} \quad = \quad \left\{ (x,y) \in \mathbb{R}^{2}\,:\, 0 \leq x \leq a \,\,{\text{and}} \,\, 0 \leq y \leq b \,\, \text{and} \,\, c \leq x+y \leq d \right\}. $$

If all six inequalities in Equation 14 are non-redundant, then H a,b,c,d is a hexagon. Otherwise, it can be a pentagon, quadrangle, triangle, segment, or just a point. The number of lattice points is

$$\#\left(H_{a,b,c,d} \,\cap \, \mathbb{Z}^{2}\right) \,\,\, = \,\,\, ad+bd-\frac{1}{2}\left(a^{2}+b^{2}+c^{2}+d^{2}\right) +\frac{1}{2}(a+b-c+d) + 1, $$

and, by Pick’s Theorem, the number of interior lattice points is

$$ g\kern0.60em =\kern0.60em \#\left({\left({H}_{a,b,c,d}\right)}_{\operatorname{int}}\kern0.3em \cap \kern0.3em {\mathbb{Z}}^2\right)\kern0.60em =\kern0.60em ad+bd-\frac{1}{2}\left({a}^2+{b}^2+{c}^2+{d}^2\right)-\frac{1}{2}\left(a+b-c+d\right)+1. $$

The honeycomb triangulation Δ subdivides H a,b,c,d into 2a d+2b d−(a 2+b 2+c 2+d 2) unit triangles.

It is obtained by slicing H a,b,c,d with the vertical lines {x=i} for 0<i<a, the horizontal lines {y=j} for 0<j<b, and the diagonal lines {x+y=k} for c<k<d. The tropical curves C dual to Δ look like honeycombs, as seen in the middle of Figure 3. The corresponding skeleta G are called honeycomb graphs.

Figure 3
figure 3

The honeycomb triangulation of H 5,4,2,5 , the tropical curve, and its skeleton.

If P=H a,b,c,d , then its interior \( {P}_{\operatorname{int}} \) is a honeycomb polygon as well. Indeed, a translate of \(P_{\text{int}}\) can be obtained from P by decreasing the values of a,b,c,d by an appropriate amount.

Example 4.1.

Let P=H 5,4,2,5. Note that \( {P}_{\operatorname{int}}={H}_{3,3,1,2}+\left(1,1\right) \). The honeycomb triangulation Δ of P is illustrated in Figure 3, together with a dual tropical curve and its skeleton. The bounded edge lengths in the tropical curve are labelled a through w. These lengths induce the edge lengths on the skeleton, via the formulas α=a+b+c+d, β=e+f, γ=g+h+i+j, δ=k+l+m, and ε=n+o+p. This is the map \(\kappa : \mathbb {R}^{23} \rightarrow \mathbb {R}^{12}\) in Equation 6.

The cone \(\lambda (\Sigma (\Delta)) \subset \mathbb {R}^{23}_{\geq 0}\) has dimension 13 and is defined by the ten linear equations

$${} \begin{array}{ccccc} \underline{a}+b=d+r & \quad \underline{e}+f=t+v & \quad \underline{g}+h = j+ u & \quad \underline{k}+l = t+w & \quad \underline{n}+o = q+v \\ \underline{b}+c=r+q & \quad \underline{f}+s=v+r &\quad \underline{h}+i = u+ s & \quad \underline{l}+m = t+u & \quad \underline{o}+p = v+w \\ \end{array} $$
((15))

It has 31 extreme rays. Among their images under κ, only 17 are extreme rays of the moduli cone \(\mathbb {M}_{\Delta }\). We find that \(\mathbb {M}_{\Delta } = \kappa (\lambda (\Sigma (\Delta)))\) has codimension one in \(\mathbb {R}^{12}\). It is defined by the non-negativity of the 12 edge lengths, by the equality β=t+v, and by the inequalities

$$\begin{array}{c} q+r\leq \alpha, \quad s+u\leq \gamma, \quad \max\{t+w,t+u\}\leq \delta\leq 2t+u+w, \\ \max\{q+v,v+w\}\leq \varepsilon\leq q+2v+w, \quad r\leq s+t, \quad s\leq r+v. \end{array} $$

The number \(\text {dim}(\mathbb {M}_{\Delta }) = 11\) is explained by the following lemma.

Lemma 4.2.

Let Δbe the honeycomb triangulation of P=H a,b,c,d . Then,

$$ \dim \left({\mathbb{M}}_{\varDelta}\right)\kern0.60em =\kern0.60em \#\left({P}_{\operatorname{int}}\cap {\mathbb{Z}}^2\right)\kern0.3em +\kern0.3em \#\left(\partial {P}_{\operatorname{int}}\cap {\mathbb{Z}}^2\right)\kern0.3em +\kern0.3em \#\operatorname{vertices}\left({P}_{\mathrm{int}}\right)\kern0.3em -\kern0.3em 3. $$

Proof.

The honeycomb graph G consists of \( g=\#\left({P}_{\operatorname{int}}\cap {\mathbb{Z}}^2\right) \) hexagons. The hexagons associated with lattice points on the boundary of \( {P}_{\operatorname{int}} \) have vertices that are 2-valent in G. Such 2-valent vertices get removed, so these boundary hexagons become cycles with fewer than six edges. In the orthant \(\mathbb {R}_{\geq 0}^{3g-3}\) of all metrics on G, we consider the subcone of metrics \(\mathbb {M}_{\Delta }\) that arise from Δ. This is the image under κ of the transformed secondary cone λ(Σ(Δ)).

The cone λ(Σ(Δ)) is defined in \(\mathbb {R}^{E}_{\geq 0}\) by 2g linearly independent linear equations, namely, two per hexagon. These state that the sum of the lengths of any two adjacent edges equals that of the opposite sum. For instance, in Example 4.1, each of the five hexagons contributes two linear equations, listed in the columns of Equation 15. These equations can be chosen to have distinct leading terms, underlined in Equation 15. In particular, they are linearly independent.

Now, under the elimination process that represents the projection κ, we retain

  • two linear equations for each lattice point in the interior of \( {P}_{\operatorname{int}} \);

  • one linear equation for each lattice point in the relative interior of an edge of \( {P}_{\operatorname{int}} \);

  • no linear inequality from the vertices of \( {P}_{\operatorname{int}} \).

That these equations are independent follows from the triangular structure, as in Equation 15. Inside the linear space defined by these equations, the moduli cone \(\mathbb {M}_{\Delta }\) is defined by various linear inequalities all of which, are strict when the graph G comes from a tropical curve C in the interior of Σ(Δ).

This implies that the codimension of \(\mathbb {M}_{\Delta }\) inside the orthant \(\mathbb {R}_{\geq 0}^{3g-3}\) equals

$$ \operatorname{codim}\left({\mathbb{M}}_{\varDelta}\right)\kern0.90em =\kern1.20em \left(\#\left(\partial {P}_{\operatorname{int}}\cap {\mathbb{Z}}^2\right)\kern0.3em -\kern0.3em \#\operatorname{vertices}\left({P}_{\operatorname{int}}\right)\right)\kern0.3em +\kern0.3em 2\cdotp \#\left(\operatorname{int}\left({P}_{\operatorname{int}}\right)\cap {\mathbb{Z}}^2\right). $$
((16))

This expression can be rewritten as

$$ \kern0.3em g\kern0.3em +\kern0.3em \#\left(\operatorname{int}\left({P}_{\operatorname{int}}\right)\cap {\mathbb{Z}}^2\right)\kern0.3em -\kern0.3em \#\operatorname{vertices}\left({P}_{\operatorname{int}}\right)\kern1em =\kern1em 2g\kern0.3em -\kern0.3em \#\left(\partial {P}_{\operatorname{int}}\cap {\mathbb{Z}}^2\right)\kern0.3em -\kern0.3em \#\operatorname{vertices}\left({P}_{\mathrm{int}}\right). $$

Subtracting this codimension from 3g−3, we obtain the desired formula.

Proof of Theorem 1.1.

For the classical moduli space \(\mathcal {M}_{g}^{\text {planar}}\), the formula in Equation 4 was proved in [10]. That dimension is preserved under tropicalization. The inclusion of \(\mathbb {M}_{g}^{\text {planar}}\) in \( \operatorname{trop}\left(\underset{g}{\overset{\mathrm{planar}}{\mathcal{M}}}\right) \), in Equation 12, implies that the right-hand side in Equation 4 is an upper bound on \(\dim \left (\mathbb {M}_{g}^{\text {planar}}\right)\).

To prove the lower bound, we choose P to be a specific honeycomb polygon with honeycomb triangulation Δ. Our choice depends on the parity of the genus g. If g=2h is even, then we take the rectangle

$$ R_{3,h+1} \,=\, H_{3,h+1,0,h+4} \,=\, \text{conv}\{ (0,0),(0,h+1),(3,0),(3,h+1) \}. $$
((17))

The interior hull of R 3,h+1 is the rectangle

$$ {\left({R}_{3,h+1}\right)}_{\operatorname{int}}\kern0.60em =\kern0.3em \operatorname{conv}\left\{\left(1,1\right),\left(1,h\right),\left(2,1\right),\left(2,h\right)\right\}\kern0.60em \cong \kern0.60em {R}_{1,h-1}. $$

All g=2h lattice points of this polygon lie on the boundary. From Lemma 4.2, we see that \({\dim }(\mathbb {M}_{\Delta }) = g + g + 4-3 = 2g+1\). If g=2h+1 is odd, then we take the trapezoid

$$ {H}_{3,h+3,0,h+3}\kern0.3em =\kern0.3em \operatorname{conv}\left\{\left(0,0\right),\left(0,h+3\right),\left(3,0\right),\left(3,h\right)\right\}. $$
((18))

The convex hull of the interior lattice points in H 3,h+3,0,h+3 is the trapezoid

$$ {\left({H}_{3,h+3,0,h+3}\right)}_{\operatorname{int}}\kern0.3em =\kern0.3em \operatorname{conv}\left\{\left(1,1\right),\left(1,h+1\right),\left(2,1\right),\left(2,h\right)\right\}. $$

All g=2h+1 lattice points of this polygon lie on its boundary, and again \({\dim }(\mathbb {M}_{\Delta }) = 2g+1\).

For all g≥4 with g≠7, this matches the upper bound obtained from [10]. We conclude that \(\,\dim (\mathbb {M}_{P}) = \dim (\mathbb {M}_{g}) = 2g+1\,\) holds in all of these cases. For g=7, we take P=H 4,4,2,6. Then, \( {P}_{\operatorname{int}} \) is a hexagon with g=7 lattice points. From Lemma 4.2, we find dim(M Δ )=7+6+6−3=16, so this matches the upper bound. Finally, for g=3, we will see \(\text {dim}(M_{T_{4}}) = 6\) in Section ‘Genus three’. The case g=2 follows from the discussion in Example 2.5.

There are two special families of honeycomb curves: those arising from the triangles T d for d≥4 and rectangles R d,e for d,e≥3. The triangle T d corresponds to curves of degree d in the projective plane \(\mathbb {P}^{2}\). Their genus is g=(d−1)(d−2)/2. The case d=4,g=3 will be our topic in Section ‘Genus three’. The rectangle R d,e corresponds to curves of bidegree (d,e) in \(\mathbb {P}^{1} \times \mathbb {P}^{1}\). Their genus is g=(d−1)(e−1). The case d=e=3,g=4 appears in Section ‘Genus four’.

Proposition 4.3.

Let P be the triangle T d with d≥4 or the rectangle R d,e with d,e≥3. The moduli space \(\mathbb {M}_{P}\) of tropical plane curves has the expected dimension inside \(\mathbb {M}_{g}\), namely,

$$ \dim \left({\mathbb{M}}_{T_d}\right)\kern0.3em =\kern0.3em \frac{1}{2}{d}^2+\frac{3}{2}d-8\kern1em and\kern1em \operatorname{codim}\left({\mathbb{M}}_{T_d}\right)\kern0.3em =\kern0.3em \left(d-2\right)\left(d-4\right),\kern0.60em whereas $$
$$ \dim \left({\mathbb{M}}_{R_{d,e}}\right)\kern0.3em =\kern0.3em de+d+e-6\kern1em and\kern1em \operatorname{codim}\left({\mathbb{M}}_{R_{d,e}}\right)\kern0.3em =\kern0.3em 2\left(de-2d-2e+3\right). $$

In particular, the honeycomb triangulation defines a cone \(\mathbb {M}_{\Delta }\) of this maximal dimension.

Proof.

For our standard triangles and rectangles, the formula (Equation 16) implies

$$ \begin{array}{ccc}\operatorname{codim}\left({\mathbb{M}}_{T_d}\right)& =& 3\left(d-3\right)\kern0.60em -\kern0.60em 3\kern0.60em +\kern0.60em 2\cdotp \frac{1}{2}\left(d-4\right)\left(d-5\right),\\ {}\operatorname{codim}\left({\mathbb{M}}_{R_{d,e}}\right)& =& 2\left(\left(d-2\right)+\left(e-2\right)\right)\kern0.3em -4\kern0.3em +\kern0.3em 2\cdotp \left(d-3\right)\left(e-3\right).\end{array} $$

Subtracting from \(3g-3 = \dim (\mathbb {M}_{g})\), we get the desired formulas for \(\dim (\mathbb {M}_{P})\).

The above dimensions are those expected from algebraic geometry. Plane curves with Newton polygon T d form a projective space of dimension \(\frac {1}{2}(d+2)(d+1)-1\) on which the 8-dimensional group PGL(3) acts effectively, while those with R d,e form a space of dimension (d+1)(e+1)−1 on which the 6-dimensional group PGL(2)2 acts effectively. In each case, \(\dim (\mathcal {M}_{P})\) equals the dimension of the family of all curves minus the dimension of the group.

Genus three

In classical algebraic geometry, all non-hyperelliptic smooth curves of genus 3 are plane quartics. Their Newton polygon T 4= conv{(0,0),(0,4),(4,0)} is the unique maximal polygon with g=3 in Proposition 2.7. In this section, we compute the moduli space \( \mathbb {M}_{T_{4}}\), and we characterize the dense subset of metric graphs that are realized by smooth tropical quartics. In the next section, we study the hyperelliptic locus \(\mathbb {M}^{\text {planar}}_{g,\text {hyp}}\) for arbitrary g, and we compute it explicitly for g=3. The full moduli space is then obtained as

$$ \mathbb{M}^{\text{planar}}_{3} \quad =\quad \mathbb{M}_{T_{4}} \,\cup \, \mathbb{M}^{\text{planar}}_{3,\text{hyp}}. $$
((19))

Just like in classical algebraic geometry, \(\text {dim}\left (\mathbb {M}_{T_{4}}\right) = 6\) and \(\text {dim}\left (\mathbb {M}^{\text {planar}}_{3,\text {hyp}}\right) = 5\).

The stacky fan \(\mathbb {M}_{3}\) of all metric graphs has five maximal cones, as shown in [11], Figure four. These correspond to the five (leafless) trivalent graphs of genus 3, pictured in Figure 4. Each graph is labeled by the triple ( b c), where is the number of loops, b is the number of bi-edges, and c is the number of cut edges. Here, , b, and c are single digit numbers, so there is no ambiguity to this notation. Our labeling and ordering is largely consistent with [6].

Figure 4
figure 4

The five trivalent graphs of genus 3, with letters labeling each graph’s six edges.

Although \(\mathbb {M}_{T_{4}}\) has dimension 6, it is not pure due to the realizable metrics on (111). It also misses one of the five cones in \(\mathbb {M}_{3}\): the graph (303) cannot be realized in \(\mathbb {R}^{2}\) by Proposition 8.3. The restriction of \(\mathbb {M}_{T_{4}}\) to each of the other cones is given by a finite union of convex polyhedral subcones, characterized by the following piecewise-linear formulas:

Theorem 5.1.

A graph in \(\mathbb {M}_{3}\) arises from a smooth tropical quartic if and only if it is one of the first four graphs in Figure 4, with edge lengths satisfying the following, up to symmetry:

  • (000) is realizable if and only if max{x,y}≤u, max{x,z}≤v and max{y,z}≤w, where

    • at most two of the inequalities can be equalities, and

    • if two are equalities, then either x,y,z are distinct and the edge (among u,v,w) that connects the shortest two of x,y,z attains equality, or max{x,y,z} is attained exactly twice, and the edge connecting those two longest does not attain equality.

  • (020) is realizable if and only if vu, yz, and w+ max{v,y}≤x, and if the last inequality is an equality, then: v=u implies v<y<z, and y=z implies y<v<u.

  • (111) is realizable if and only if w<x and

    $$\begin{array}{*{20}l} &\hspace*{24pt}(\,v+w = x \hbox{ and } v<u\,) \ \, \hbox{or}\ \, (\,v+w< x\leq v+3w \hbox{ and } v\leq u\,) \hbox{ or } \\ &\hspace*{65pt} (\,v+3w < x\leq v+4w \hbox{ and } v\leq u\leq 3v/2\,) \hbox{ or } \\ \!\! &(\,v+3w < x\leq v+4w \hbox{ and } 2v=u\,)\ \, \hbox{or}\ \, (\,v+4w< x\leq v+5w \hbox{ and } v=u\,). \end{array} $$
    ((20))
  • (212) is realizable if and only if w<x≤2w.

To understand the qualifier ‘up to symmetry’ in Theorem 5.1, it is worthwhile to read off the automorphisms from the graphs in Figure 4. The graph (000) is the complete graph on four nodes. Its automorphism group is the symmetric group of order 24. The automorphism group of the graph (020) is generated by the three transpositions (u v), (y z), (w x) and the double transposition (u y)(v z). Its order is 16. The automorphism group of the graph (111) has order 4, and it is generated by (u v) and (w x). The automorphism group of the graph (212) is generated by (u z)(v y) and (w x) and has order 4. The automorphism group of the graph (303) is the symmetric group of order 6. Each of the five graphs contributes an orthant \(\mathbb {R}_{\geq 0}^{6}\) modulo the action of that symmetry group to the stacky fan \(\mathbb {M}_{3}\).

Proof of Theorem 5.1.

This is based on explicit computations as in Section ‘Combinatorics and computations’. The symmetric group S 3 acts on the triangle T 4. We enumerated all unimodular triangulations of T 4 up to that symmetry. There are 1,279 (classes of) such triangulations, and of these precisely 1,278 are regular. The unique non-regular triangulation is a refinement of [26], Figure 2.3.9. For each regular triangulation, we computed the graph G and the polyhedral cone \(\mathbb {M}_{\Delta }\). Each \(\mathbb {M}_{\Delta }\) is the image of the 12-dimensional secondary cone of Δ. We found that \(\mathbb {M}_{\Delta }\) has dimension 3, 4, 5, or 6, depending on the structure of the triangulation Δ. A census is given by Table 1. For instance, 450 of the 1,278 triangulations Δ have the skeleton G=(020). Among these 450, we found that 59 have \(\text {dim}(\mathbb {M}_{\Delta }) = 4\), 216 have \(\text {dim}(\mathbb {M}_{\Delta }) = 5\), and 175 have \(\text {dim}(\mathbb {M}_{\Delta }) = 6\).

Table 1 Dimensions of the 1,278 moduli cones \(\mathbb {M}_{\Delta }\) within \(\mathbb {M}_{T_{4}}\)

For each of the 1,278 regular triangulations Δ, we checked that the inequalities stated in Theorem 5.1 are valid on the cone \(\,\mathbb {M}_{\Delta } = (\kappa \circ \lambda)(\Sigma (\Delta))\). This proves that the dense realizable part of \(\mathbb {M}_{T_{4}}\) is contained in the polyhedral space described by our constraints.

For the converse direction, we need to go through the four cases and construct a planar tropical realization of each metric graph that satisfies our constraints. We shall now do this.

All realizable graphs of type (000), except for lower dimensional families, arise from a single triangulation Δ, shown in Figure 5 with its skeleton. The cone \(\mathbb {M}_{\Delta }\) is 6-dimensional. Its interior is defined by x< min{u,v}, y< min{u,w}, and z< min{v,w}. Indeed, the parallel segments in the outer edges can be arbitrarily long, and each outer edge be as close as desired to the maximum of the two adjacent inner edges. This is accomplished by putting as much length as possible into a particular edge and pulling extraneous parts back.

Figure 5
figure 5

A triangulation that realizes almost all realizable graphs of type (000).

There are several lower dimensional collections of graphs that we must show are achievable:

(i) y<x=u, max{x,z}<v, max{y,z}<w; (dim=5)

(ii) y=x=u, max{x,z}<v, max{y,z}<w; (dim=4)

(iii) z<y<x<v, u=x, w=y; (dim=4)

(iv) z<y<x<u, v=x, w=y; (dim=4)

(v) z<y=x=v=w<u. (dim=3)

In Figure 6, we show triangulations realizing these five special families. Dual edges are labeled

$$(1,1)\buildrel{x}\over{\--}(1,2)\buildrel{y}\over{\--}(2,1)\buildrel{z}\over{\--}(1,1).</p><p class="noindent">$$
Figure 6
figure 6

Triangulations giving all metrics in the cases (i) through (v) for the graph (000).

Next, we consider type (020). Again, except for some lower dimensional cases, all graphs arise from single triangulation, pictured in Figure 7. The interior of \(\mathbb {M}_{\Delta }\) is given by v<u, y<z and w+ max{v,y}<x. There are several remaining boundary cases, all of whose graphs are realized by the triangulations in Figure 8:

Figure 7
figure 7

A triangulation that realizes almost all realizable graphs of type (020).

Figure 8
figure 8

Triangulations giving all metrics in the cases (i) through (iv) for the graph (020).

(i) v<u, y<z, w+ max{v,y}=x; (dim=5)

(ii) u=v, y<z, w+ max{v,y}<x; (dim=5)

(iii) u=v, y=z, w+ max{v,y}<x; (dim=4)

(iv) u=v, v<y<z, w+ max{v,y}=x. (dim=4)

Type (111) is the most complicated. We begin by realizing the metric graphs that lie in \(\text {int}(\mathbb {M}_{T_{4},(111)})\). These arise from the second and third cases in the disjunction (Equation 20).

We assume w<x. The triangulation to the left in Figure 9 realizes all metrics on (111) satisfying v+w<x<v+3w and v<u. The dilation freedom of u, y, and z is clear. To see that the edge x can have length arbitrarily close to v+3w, simply dilate the double-arrowed segment to be as long as possible, with some very small length given to the next two segments counterclockwise. Shrinking the double-arrowed segment as well as the vertical segment of x brings the length close to v+w. The triangulation to the right in Figure 9 realizes all metrics satisfying v+3w<x<v+4w and v<u<3v/2. Dilation of x is more free due to the double-arrowed segment of slope 1/2, while dilation of u is more restricted.

Figure 9
figure 9

Triangulations of type (111) realizing v + w < x < v +2 x and v < u (on the left) and v +3 w < x < v +4 w and v < u <3 v /2 (on the right).

Many triangulations are needed in order to deal with low-dimensional cases. In Figure 10, we show triangulations that realize each of the following families of type (111) graphs:

Figure 10
figure 10

Triangulations of type (111) that realize the boundary cases (i) through (vii).

(i) v+w<x<v+5w, v=u; (dim=5)

(ii) v+w<x<v+4w, 2v=u; (dim=5)

(iii) v+w=x, v<u; (dim=5)

(iv) x=v+3w, v<u; (dim=5)

(v) x=v+4w, v<u≤3v/2; (dim=5)

(vi) x=v+5w, v=u; (dim=4)

(vii) x=v+4w, 2v=u. (dim=4)

All graphs of type (212) can be achieved with the two triangulations in Figure 11. The left gives all possibilities with w<x<2w, and the right realizes x=2w. The edges u, v, y, z are completely free to dilate. This completes the proof of Theorem 5.1.

Figure 11
figure 11

Triangulations giving graphs of type (212) giving w < x <2 w and x =2 w .

The space \(\mathbb {M}_{T_{4}}\) is not pure dimensional because of the graphs (111) with u=v and v+4w<x<v+5w. These appear in the 5-dimensional \(\mathbb {M}_{\Delta }\) where Δ is the leftmost triangulation in Figure 10, but \(\mathbb {M}_{\Delta }\) is not contained in the boundary of any 6-dimensional \(\mathbb {M}_{\Delta '}\).

We close this section by suggesting an answer to the following question: What is the probability that a random metric graph of genus 3 can be realized by a tropical plane quartic?

To examine this question, we need to endow the moduli space \(\mathbb {M}_{3}\) with a probability measure. Here, we fix this measure as follows. We assume that the five trivalent graphs G are equally likely, and all non-trivalent graphs have probability 0. The lengths on each trivalent graph G specify an orthant \(\mathbb {R}^{6}_{\geq 0}\). We fix a probability measure on \(\mathbb {R}^{6}_{\geq 0}\) by normalizing so that u+v+w+x+y+z=1, and we take the uniform distribution on the resulting 5-simplex. With this probability measure on the moduli space \(\mathbb {M}_{3}\), we are asking for the ratio of volumes

$$ \operatorname{vol}\left(\underset{3}{\overset{\mathrm{planar}}{\mathbb{M}}}\right)/\operatorname{vol}\left({\mathbb{M}}_3\right). $$
((21))

This ratio is a rational number, which we computed from our data in Theorem 5.1.

Corollary 5.2.

The rational number in (21) is 31/105. This means that, in the measure specified above, about 29.5% of all metric graphs of genus 3 come from tropical plane quartics.

Proof and Explanation.

The graph (303) is not realizable, since none of the 1,278 regular unimodular triangulations of the triangle T 4 has this type. So, its probability is zero. For the other four trivalent graphs in Figure 4, we compute the volume of the realizable edge lengths, using the inequalities in Theorem 5.1. The result of our computations is the table

A non-trivial point in verifying these numbers is that Theorem 5.1 gives the constraints only up to symmetry. We must apply the automorphism group of each graph in order to obtain the realizable region in its 5-simplex \(\{(u,v,w,x,y,z) \in \mathbb {R}^{6}_{\geq 0} : u+v+w+x+y+z = 1 \}\). Since we are measuring volumes, we are here allowed to replace the regions described in Theorem 5.1 by their closures. For instance, consider type (020). After taking the closure, and after applying the automorphism group of order 16, the realizability condition becomes

$$ \max \bigl(\min(u,v), \min(y,z) \bigr) \,\, \leq \,\, | x-w|. $$
((22))

The probability that a uniformly sampled random point in the 5-simplex satisfies equation 22 is equal to 8/15. The desired probability (Equation 21) is the average of the five numbers in the table.

Notice that asking for those probabilities only makes sense since the dimension of the moduli space agrees with the number of skeleton edges. In view of Equation 4, this occurs for the three genera g=2,3,4. For g≥5, the number of skeleton edges exceeds the dimension of the moduli space. Hence, in this case, the probability that a random metric graph can be realized by a tropical plane curve vanishes a priori. For g=2, that probability is one; see Example 2.5. For g=4, that probability is less than 0.5% by Corollary 7.2 below.

Hyperelliptic curves

A polygon P of genus g is hyperelliptic if \( {P}_{\operatorname{int}} \) is a line segment of length g−1. We define the moduli space of hyperelliptic tropical plane curves of genus g to be

$$\mathbb{M}^{\text{planar}}_{g,\text{hyp}} \,\, \, := \,\,\, \bigcup_{P} \mathbb{M}_{P}, $$

where the union is over all hyperelliptic polygons P of genus g. Unlike when the interior hull P int is 2-dimensional, there does not exist a unique maximal hyperelliptic polygon P with given P int. However, there are only finitely many such polygons up to isomorphism. These are

$$E_{k}^{(g)} \,\,:= \,\, \text{conv}\{(0,0),(0,2),(g+k,0),(g+2-k,2)\} \qquad \hbox{for}\,\,\, 1\leq k\leq g+2.$$

These hyperelliptic polygons interpolate between the rectangle \(E_{1}^{(g)} = R_{g+1,2}\) and the triangle \(E_{g+2}^{(g)}\). The five maximal hyperelliptic polygons for genus g=3 are pictured in Figure 12.

Figure 12
figure 12

The five maximal hyperelliptic polygons of genus 3.

This finiteness property makes a computation of \(\mathbb {M}^{\text {planar}}_{g, \text {hyp}}\) feasible: compute \(\mathbb {M}_{E_{k}^{(g)}}\) for all k, and take the union. By [21, Proposition 3.4], all triangulations of hyperelliptic polygons are regular, so we need not worry about non-regular triangulations arising in the TOPCOM computations described in Section ‘Combinatorics and computations’. We next show that it suffices to consider the triangle:

Theorem 6.1.

For each genus g≥2, the hyperelliptic triangle \(E^{(g)}_{g+2}\) satisfies

$$ \mathbb{M}_{E^{(g)}_{g+2}} \,\,=\,\,\mathbb{M}^{\text{planar}}_{g,\text{hyp}} \,\, \subseteq \,\, \mathbb{M}_{g}^{\text{chain}}\cap \mathbb{M}_{g}^{\text{planar}}. $$
((23))

The equality holds even before taking closures of the spaces of realizable graphs. The spaces on the left-hand side and right-hand side of the inclusion in Equation 23 both have dimension 2g−1.

Before proving our theorem, we define \(\mathbb {M}_{g}^{\text {chain}}\). This space contains all metric graphs that arise from triangulating hyperelliptic polygons. Start with a line segment on g−1 nodes where the g−2 edges have arbitrary non-negative lengths. Double each edge so that the resulting parallel edges have the same length and attach two loops of arbitrary lengths at the endpoints. Now, each of the g−1 nodes is 4-valent. There are two possible ways to split each node into two nodes connected by an edge of arbitrary length. Any metric graph arising from this procedure is called a chain of genus g. Although there are 2g−1 possible choices in this procedure, some give isomorphic graphs. There are 2g−2+2⌊(g−2)/2⌋ combinatorial types of chains of genus g. In genus 3, the chains are (020), (111), and (212) in Figure 4; and in genus 4, they are (020), (021), (111), (122), (202), and (223) in Section ‘Genus four’.

By construction, there are 2g−1 degrees of freedom for the edge lengths in a chain of genus g, so each such chain defines an orthant \(\mathbb {R}_{\geq 0}^{2g-1}\). We write \(\mathbb {M}^{\text {chain}}_{g}\) for the stacky subfan of \(\mathbb {M}_{g}\) consisting of all chains. Note that \(\mathbb {M}_{g}^{\text {chain}}\) is strictly contained in the space \(\mathbb {M}^{\text {hyp}}_{g}\) of all hyperelliptic metric graphs, seen in [12]. Hyperelliptic graphs arise by the same construction from any tree with g−1 nodes, whereas for chains that tree must be a line segment.

The main claim in Theorem 6.1 is that any metric graph arising from a maximal hyperelliptic polygon \(E_{k}^{(g)}\) also arises from the hyperelliptic triangle \(E^{(g)}_{g+2}\). Given a triangulation Δ of \(E_{k}^{(g)}\), our proof constructs a triangulation Δ of \(E^{(g)}_{g+2}\) that gives rise to the same collection of metric graphs, so that \(\mathbb {M}_{\Delta }=\mathbb {M}_{\Delta '}\), with equality holding even before taking closures. Before our proof, we illustrate this construction with the following example.

Example 6.2.

Let Δ be the triangulation of R 4,2 pictured on the left in Figure 13 along with a metric graph Γ arising from it. The possible metrics on Γ are determined by the slopes of the edges emanating from the vertical edges. For instance, consider the constraints on v and y imposed by the width w (which equals x). If most of the w and x edges are made up of the segments emanating from v, we find y close to v+2w. If instead most of the w and x edges are made up of the segments emanating from y, we find y close to v−2w. Interpolating gives graphs achieving v−2w<y<v+2w. This only depends on the difference of the slopes emanating either left or right from the edges v and y: the same constraints would be imposed if the slopes emanating from v to the right were 2 and 0 rather than 1 and −1. Boundary behavior determines constraints on u and z, namely v<u and y<z.

Figure 13
figure 13

Triangulations of R 4,2 and \(E^{(3)}_{5}\) , giving rise to skeletons with the same metrics.

Also pictured in Figure 13 is a triangulation Δ of \(E^{(3)}_{5}\). The skeleton Γ arising from Δ has the same combinatorial type as Γ, and the slopes emanating from the vertical edges have the same differences as in Γ. Combined with similar boundary behavior, this shows that Γ and Γ have the exact same achievable metrics. In other words, \(\mathbb {M}_{\Delta }=\mathbb {M}_{\Delta '}\), with equality even before taking closures of the realizable graphs.

We now explain how to construct Δ from Δ, an algorithm spelled out explicitly for general g in the proof of Theorem 6.1. We start by adding edges from (0,2) to the interior lattice points (since any unimodular triangulation of \(E_{5}^{(3)}\) must include these edges) and then add additional edges based on the combinatorial type of Δ, as pictured in Figure 14.

Figure 14
figure 14

The start of Δ .

Next, we add edges connecting the interior lattice points to the lower edge of the triangle. We will ensure that the outgoing slopes from the vertical edges in the Γ have the same difference as in Γ. For i=1,2,3, we connect (i,1) to all points between (2i+a i ,0) and (2i+b i ,0) where a i is the difference between the reciprocals of the slopes of the leftmost edges from (i,1) to the upper and lower edges of R 4,2 in Δ, and b i is defined similarly but with the rightmost edges. Here, we take the reciprocal of to be 0. In the dual tropical curve, this translates to slopes emanating from vertical edges in the tropical curve having the same difference as from Δ.

We compute \(a_{1}=\frac {1}{-1}-\frac {1}{1}=-2\) and \(b_{1}=\frac {1}{\infty }-\frac {1}{\infty }=0\). Since 2·1+a 1=0 and 2·1+b 1=2, we add edges from (1,1) to (0,0), to (0,2), and to all points in between, in this case just (0,1). We do similarly for the other two interior lattice points, as pictured in the first three triangles in Figure 15. The fourth triangle includes the edges (0,1)−(1,1) and (3,1)−(4,1), which ensures the same constraints as from Δ on the first and third loops of the corresponding metric graph.

Figure 15
figure 15

Several steps leading up to Δ , on the right.

Proof of Theorem 6.1.

The inclusion \(\mathbb {M}^{\text {planar}}_{g,\text {hyp}} \subseteq \mathbb {M}_{g}^{\text {chain}}\) holds because every unimodular triangulation of a hyperelliptic polygon is dual to a chain graph. Such a chain has 2g−1 edges, and hence \(\text {dim}\left (\mathbb {M}_{g}^{\text {chain}}\right) = 2g-1\). We also have \(\text {dim}\left (\mathbb {M}^{\text {planar}}_{g,\text {hyp}}\right) \geq 2g-1\) because Lemma 4.2 implies \(\text {dim}\left (\mathbb {M}_{R_{g+1,2}}\right) = 2g-1\). Hence, the inclusion implies the dimension statement.

It remains to prove the equality \(\mathbb {M}_{E^{(g)}_{g+2}} = \mathbb {M}^{\text {planar}}_{g,\text {hyp}}\). Given any triangulation Δ of a hyperelliptic polygon \(E_{k}^{(g)}\), we shall construct a triangulation Δ of \(E_{g+2}^{(g)}\) such that \(\mathbb {M}_{\Delta }=\mathbb {M}_{\Delta '}\). Our construction will show that the equality even holds at the level of smooth tropical curves.

We start constructing Δ by drawing g edges from (0,2) to the interior lattice points. The next g−1 edges of Δ are those that give it the same skeleton as Δ. This means that Δ has the edge (i,1)−(i+1,1) whenever that edge is in Δ, and Δ has the edge (0,2)−(2i+1,0) whenever (i,1)−(i+1,1) is not an edge in Δ. Here, i=1,…,g−1.

Next, we will include edges in Δ that give the same constraints on vertical edge lengths as Δ. This is accomplished by connecting the point (i,1) to (2i+a i ,0), to (2i+b i ,0), and to all points in between, where a i and b i are defined as follows. Let a i be the difference between the reciprocals of the slopes of the leftmost edges from (i,1) to the upper and lower edges of \(E_{k}^{(g)}\) in Δ. Here, we take the reciprocal of to be 0. Let b i be defined similarly but with the rightmost edges. These new edges in Δ do not cross due to constraints on the slopes in Δ. Loop widths and differences in extremal slopes determine upper and lower bounds on the lengths of vertical edges. These constraints on the g−2 interior loops mostly guarantee \(\mathbb {M}_{\Delta }=\mathbb {M}_{\Delta '}\). To take care of the 1st and g th loops, we must complete the definition of Δ . Let (n,0) be the leftmost point of the bottom edge of \(E^{(g)}_{g+2}\) connected to (1,1) so far in Δ .

  • If n=0, then Δ includes the edge (0,1)−(1,1).

  • If n≥2, then Δ includes (0,1)−(1,1) and all edges (0,1)−(0,m) with 0≤mn.

  • If n=1 and (0,1)−(1,1) is an edge of Δ, then Δ includes (0,1)−(1,1) and (0,1)−(1,0).

  • If n=1 and (0,1)−(1,1) is not an edge Δ, then Δ includes (0,2)−(1,0) and (0,1)−(1,0).

Perform a symmetric construction around (g,1). These edge choices will give the same constraints on the 1st and g th loops as those imposed by Δ. This completes the proof.

We now return to genus g=3, our topic in Section ‘Genus three’, and we complete the computation of \(\mathbb {M}^{\text {planar}}_{3}\).

By Equation 19 and Theorem 6.1, it suffices to compute the 5-dimensional space \(\mathbb {M}_{E_{g+2}^{(g)}}\). An explicit computation as in Section ‘Combinatorics and computations’ reveals that the rectangle \(E^{(3)}_{1} = R_{4,2}\) realizes precisely the same metric graphs as the triangle \(E^{(3)}_{5}\). With this, Theorem 6.1 implies \(\mathbb {M}^{\text {planar}}_{3,\text {hyp}} = \mathbb {M}_{R_{4,2}}\). To complete the computation in Section ‘Genus three’, it thus suffices to analyze the rectangle R 4,2.

It was proved in [4] that \(\mathbb {M}_{R_{4,2}}\) and \(\mathbb {M}_{T_{4}}\) have disjoint interiors. Moreover, \(\mathbb {M}_{R_{4,2}}\) is not contained in \(\mathbb {M}_{T_{4}}\). This highlights a crucial difference between Equations 13 and 19. The former concerns the tropicalization of classical moduli spaces, so the hyperelliptic locus lies in the closure of the non-hyperelliptic locus. The analogous statement is false for tropical plane curves. To see that \(\mathbb {M}_{T_{4}}\) does not contain \(\mathbb {M}_{R_{4,2}}\), consider the (020) graph with all edge lengths equal to 1. By Theorems 5.1 and 6.3, this metric graph is in \(\mathbb {M}_{R_{4,2}}\) but not in \(\mathbb {M}_{T_{4}}\). What follows is the hyperelliptic analogue to the non-hyperelliptic Theorem 5.1.

Theorem 6.3.

A graph in \(\mathbb {M}_{3}\) arises from R 4,2 if and only if it is one of the graphs (020), (111), or (212) in Figure 4, with edge lengths satisfying the following, up to symmetry:

  • (020) is realizable if and only if w=x, vu, vyz, and

    $$\begin{array}{*{20}l} &\hspace*{52pt} (y < v + 2w\,) \hbox{ or}\ \, (y =v + 2w \hbox{ and } y<z\,) \\ &\hbox{or}\ \, (y < v+3w \hbox{ and } u\leq 2v\,) \hbox{ or }\ \, (y = v+3w \hbox{ and } u\leq 2v \hbox{ and } y< z\,) \\ &\hspace*{2pt} \hbox{or}\ \, (y < v+4w \hbox{ and } u=v\,)\ \, \hbox{or}\ \, (\,y = v +4w \hbox{ and } u=v \hbox{ and } y< z\,). \end{array} $$
    ((24))
  • (111) is realizable if and only if w=x and min{u,v}≤w.

  • (212) is realizable if and only if w=x.

Proof.

This is based on an explicit computation as described in Section ‘Combinatorics and computations’. The hyperelliptic rectangle R 4,2 has 3,105 unimodular triangulations up to symmetry. All triangulations are regular. For each such triangulation, we computed the graph G and the polyhedral cone \(\mathbb {M}_{\Delta }\). Each \(\mathbb {M}_{\Delta }\) has dimension 3, 4, or 5, with census given on the left in Table 2. For each cone \(\mathbb {M}_{\Delta }\), we then checked that the inequalities stated in Theorem 6.3 are satisfied. This proves that the dense realizable part of \(\mathbb {M}_{R_{4,2}}\) is contained in the polyhedral space described by our constraints.

Table 2 Dimensions of the moduli cones \(\mathbb {M}_{\Delta }\) for R 4,2 and \(E^{(3)}_{5}\)

For the converse direction, we construct a planar tropical realization of each metric graph that satisfies our constraints. For the graph (020), we consider 11 cases:

  • y<v+2w, uv, yz; (dim=5)

  • y=v+2w, uv, yz; (dim=5)

  • (y<v+3w, v<u<2v, yz) or (y<v+2w, uv, y<z<2y); (dim=5)

  • (y<v+3w, u=2v, yz) or (y<v+2w, uv, z=2y); (dim=4)

  • (y<v+3w, v<u<2v, y=z) or (y<v+4w, u=v, y<z<2z); (dim=4)

  • (y<v+3w, u=2v, y=z) or (y<v+4w, u=v, z=2y); (dim=3)

  • y=v+3w, v<u<2v, yz; (dim=4)

  • y=v+3w, u=2v, yz; (dim=3)

  • (y<v+4w, u=v, yz) or (y<v+2w, y=z, uv); (dim=3)

  • y<v+4w, u=v, y=z; (dim=3)

  • y=v+4w, u=v, yz. (dim=3)

The disjunction of (i),(ii),…,(xi) is equivalent to Equation 24. Triangulations giving all metric graphs satisfying each case are pictured in Figure 16. Next to the first triangulation is a metric graph arising from it.

Figure 16
figure 16

Triangulations giving all realizable hyperelliptic metrics for the graph (020).

Next, we deal with graph (111). Here, we need two triangulations, one for uv and one for u=v. They are pictured in Figure 17. The left gives uv, and the middle gives u=v.

Figure 17
figure 17

Triangulations realizing hyperelliptic metrics for the graphs (111) and (212).

Finally, for the graph (212), the single triangulation on the right in Figure 17 suffices.

Genus four

In this section, we compute the moduli space of tropical plane curves of genus 4. This is

$$\mathbb{M}_{4}^{\text{planar}} \,\,= \,\, \mathbb{M}_{Q^{(4)}_{1}} \,\cup \, \mathbb{M}_{Q^{(4)}_{2}} \, \cup \, \mathbb{M}_{Q^{(4)}_{3}} \,\, \cup \,\,\mathbb{M}^{\text{planar}}_{4,\text{hyp}}, $$

where \(Q^{(4)}_{i}\) are the three genus 4 polygons in Proposition 2.7. They are shown in Figure 18.

Figure 18
figure 18

The three non-hyperelliptic genus 4 polygons and a triangulation.

There are 17 trivalent genus 4 graphs, of which 16 are planar. These were first enumerated in [6] and are shown in Figure 19. All have six vertices and nine edges. The labels ( b c) are as in Section ‘Genus three’: is the number of loops, b the number of bi-edges, and c the number of cut edges. This information is enough to uniquely determine the graph with the exception of (000), where ‘A’ indicates the honeycomb graph and ‘B’ the complete bipartite graph K 3,3.

Figure 19
figure 19

The 17 trivalent graphs of genus 4. All are planar except for (000)B.

Up to their respective symmetries, the square \(Q^{(4)}_{1} = R_{3,3}\) has 5,941 unimodular triangulations, the triangle \(Q^{(4)}_{2}\) has 1,278 unimodular triangulations, and the triangle \(Q^{(4)}_{3}\) has 20 unimodular triangulations. We computed the cone \(\mathbb {M}_{\Delta }\) for each triangulation Δ, and we ran the pipeline of Section ‘Combinatorics and computations’. We summarize our findings as the main result of this section:

Theorem 7.1.

Of the 17 trivalent graphs, precisely 13 are realizable by tropical plane curves. The moduli space \(\,\mathbb {M}_{4}^{\text {planar}}\,\) is 9-dimensional, but it is not pure: the left decomposition in Equation 2 has components (Equation 1) of dimensions 7, 8 and 9. That decomposition is explained in Table 3.

Table 3 The number of triangulations for the graphs of genus 4 and their moduli dimensions

The four non-realizable graphs are (000)B, (213), (314), and (405). This is obvious for (000)B, because K 3,3 is not planar. The other three are similar to the genus 3 graph (303) and are ruled out by Proposition 8.3 below. The 13 realizable graphs G appear in the rows in Table 3. The first three columns correspond to the polygons \(Q^{(4)}_{1}\), \(Q^{(4)}_{2}\), and \(Q^{(4)}_{3}\). Each entry is the number of regular unimodular triangulations Δ of \(Q^{(4)}_{i}\) with skeleton G. The entry is blank if no such triangulation exists. Six of the graphs are realized by all three polygons, five are realized by two polygons, and two are realized by only one polygon. For instance, the graph (303) comes from a unique triangulation of the triangle \(Q^{(4)}_{3}\), shown on the right in Figure 18. Neither \(Q^{(4)}_{1}\) nor \(Q^{(4)}_{2}\) can realize this graph.

Our moduli space \(\mathbb {M}^{\text {planar}}_{4}\) has dimension 9. We know this already from Proposition 4.3, where the square \(Q^{(4)}_{1}\) appeared as R 3,3. In classical algebraic geometry, that square serves as the Newton polygon for canonical curves of genus 4 lying on a smooth quadric surface. In Table 3, we see that all realizable graphs except for (303) arise from triangulations of R 3,3. However, only five graphs allow for the maximal degree of freedom. Corresponding triangulations are depicted in Figure 20.

Figure 20
figure 20

Triangulations Δ of \(Q^{(4)}_{1}\) with \(\dim (\mathbb {M}_{\Delta })=9\) .

The last three columns in Table 3 list the dimensions of the moduli space \(\mathbb {M}_{Q^{(4)}_{i},G}\), which is the maximal dimension of any cone \(\mathbb {M}_{\Delta }\) where Δ triangulates \(Q^{(4)}_{i}\) and has skeleton G. More detailed information is furnished in Table 4. The three subtables (one each for i=1,2,3) explain the decomposition (Equation 1) of each stacky fan \(\mathbb {M}_{Q^{(4)}_{i},G}\). The row sums in Table 4 are the first three columns in Table 3. For instance, the graph (030) arises in precisely 23 of the 1,278 triangulations Δ of the triangle \(Q^{(4)}_{2}\). Among the corresponding cones \(\mathbb {M}_{\Delta }\), three have dimension 6, twelve have dimension 7, and eight have dimension 8.

Table 4 All cones \(\mathbb {M}_{\Delta }\) from triangulations Δ of the three genus 4 polygons in Figure 18

Equipped with these data, we can now extend the probabilistic analysis of Corollary 5.2 from genus 3 to genus 4. As before, we assume that all 17 trivalent graphs are equally likely and we fix the uniform distribution on each 8-simplex that corresponds to one of the 17 maximal cones in the 9-dimensional moduli space \(\mathbb {M}_{4}\). The five graphs that occur with positive probability are those with \(\dim \left (\mathbb {M}_{Q^{(4)}_{1},G}\right) = 9\). Full-dimensional realizations were seen in Figure 20. The result of our volume computations is the following table:

In contrast to the exact computation in Corollary 5.2, our probability computations for genus 4 rely on a Monte Carlo simulation, with 1 million random samples for each graph.

Corollary 7.2.

Less than 0.5% of all metric graphs of genus 4 come from plane tropical curves. More precisely, the fraction is approximately \( \kern0.3em \operatorname{vol}\left(\underset{4}{\overset{\mathrm{planar}}{\mathbb{M}}}\right)/\operatorname{vol}\left({\mathbb{M}}_4\right)=0.004788 \).

By Theorem 6.1, \(\,\mathbb {M}^{\text {planar}}_{4,\text {hyp}} = \mathbb {M}_{E^{(g)}_{g+2}}\). This space is 7-dimensional, with six maximal cones corresponding to the chains (020), (021), (111), (122), (202), and (223). The graphs (213), (314), and (405) are hyperelliptic if given the right metric, but beyond not being chain graphs, these are not realizable in the plane even as combinatorial types by Proposition 8.3.

Genus five and beyond

The combinatorial complexity of trivalent graphs and of regular triangulations increases dramatically with g, and one has to be judicious in deciding what questions to ask and what computations to attempt. One way to start is to rule out families of trivalent graphs G that cannot possibly contribute to \(\mathbb {M}^{\text {planar}}_{g}\). Clearly, non-planar graphs G are ruled out. We begin this section by identifying another excluded class. Afterwards, we examine our moduli space for g=5, and we check which graphs arise from the polygons \(Q^{(5)}_{i}\) in Proposition 2.7.

Definition 8.1.

A connected, trivalent, leafless graph G is called sprawling if there exists a vertex s of G such that G∖{s} consists of three distinct components.

Remark 8.2.

Each component of G∖{s} must have genus at least one; otherwise, G would not have been leafless. The vertex s need not be unique. The genus 3 graph (303) in Figure 4 is sprawling, as are the genus 4 graphs (213), (314), and (405) in Figure 19.

Proposition 8.3.

Sprawling graphs are never the skeletons of smooth tropical plane curves.

This was originally proven in [8], Prop. 4.1. We present our own proof for completeness.

Proof.

Suppose the skeleton of a smooth tropical plane curve C is a sprawling graph G with separating vertex s. After a change of coordinates, we may assume that the directions emanating from s are (1,1), (0,−1), and (−1,0). The curve C is dual to a unimodular triangulation Δ of a polygon \(P\subset \mathbb {R}^{2}\). Let TΔ be the triangle dual to s. We may take T=conv{(0,0),(0,1),(1,0)} after an appropriate translation of P. Let P 1,P 2,P 3 be the subpolygons of P corresponding to the components of G∖{s}. After relabeling, we have P 1P 2={(0,1)}, P 1P 3={(0,0)}, and P 2P 3={(1,0)}. Each P i has at least one interior lattice point, since each component of G∖{s} must have genus at least 1.

Let α,β,γ,δ be the angles between the triangle T and the boundary edges of P emanating from the vertices of T, as pictured in Figure 21. Since P is convex, we know α+β≤3π/4, γ<π/2, and δ<3π/4. As P 1 contains at least one interior lattice point, and γ<π/2, we must also have that α>π/2; otherwise, P 1⊂(,0]×[ 0,1], which has no interior lattice points. Similarly, as P 2 has at least one interior lattice point and δ<3π/4, we must have β>π/4. But we now have that α+β>π/2+π/4=3π/4, a contradiction. Thus, the skeleton of C cannot be a sprawling graph, as originally assumed.

Figure 21
figure 21

The triangle T with angles formed between it and the boundary edges of P .

Remark 8.4.

If G is sprawling, then \(\mathbb {M}^{\text {planar}}_{g}\cap \mathbb {M}_{G} \not =\emptyset \) because edge lengths can become zero on the boundary. However, it is only in taking closures of spaces of realizable graphs that this intersection becomes nonempty.

We will now consider the moduli space of tropical plane curves of genus 5. That space is

$$\mathbb{M}_{5}^{\text{planar}} \,\,= \,\, \mathbb{M}_{Q^{(5)}_{1}} \,\cup \, \mathbb{M}_{Q^{(5)}_{2}} \, \cup \, \mathbb{M}_{Q^{(5)}_{3}} \, \cup \, \mathbb{M}_{Q^{(5)}_{4}} \,\, \cup \,\, \mathbb{M}^{\text{planar}}_{5,\text{hyp}}, $$

where \(Q^{(5)}_{1}\), \(Q^{(5)}_{2}\), \(Q^{(5)}_{3}\), \(Q^{(5)}_{4}\) are the four genus 5 polygons in Proposition 2.7. They are shown in Figure 22. Modulo their respective symmetries, the numbers of unimodular triangulations of these polygons are: 508 for \(Q^{(5)}_{1}\); 147,908 for \(Q^{(5)}_{2}\); 162 for \(Q^{(5)}_{3}\); and 968 for \(Q^{(5)}_{4}\).

Figure 22
figure 22

The genus 5 polygons \(Q^{(5)}_{1}\) , \(Q^{(5)}_{2}\) , \(Q^{(5)}_{3}\) and \(Q^{(5)}_{4}\) .

We applied the pipeline described in Section ‘Combinatorics and computations’ to all these triangulations. The outcome of our computations is the following result which is the genus 5 analogue to Theorem 7.1.

Theorem 8.5.

Of the 71 trivalent graphs of genus 5, precisely 38 are realizable by smooth tropical plane curves. The four polygons satisfy \(\dim \left (\mathbb {M}_{Q^{(5)}_{i}}\right)=9,11,10,10\) for i=1,2,3,4.

All but one of the 38 realizable graphs arise from \(Q^{(5)}_{1}\) or \(Q^{(5)}_{2}\). The remaining graph, realized only by a single triangulation of \(Q^{(5)}_{4}\), is illustrated in Figure 23. This is reminiscent of the genus 4 graph (303), which was realized only by the triangulation of \(Q_{3}^{(4)}\) in Figure 18. The other 37 graphs are realized by at least two of the polygons \(Q^{(5)}_{1}, \ldots, Q^{(5)}_{4}, E^{(5)}_{7}\).

Figure 23
figure 23

A genus 5 graph, and the unique triangulation that realizes it.

Among the 71 trivalent graphs of genus 5, there are four non-planar graphs and 15 sprawling graphs, with none both non-planar and sprawling. This left us with 52 possible candidates for realizable graphs. We ruled out the remaining 14 by the explicit computations described in Section ‘Combinatorics and computations’. Three of these 14 graphs are shown in Figure 24. At present, we do not know any general rule that discriminates between realizable and non-realizable graphs.

Figure 24
figure 24

Some non-realizable graphs of genus 5.

The process we have carried out for genus g=3, 4, and 5 can be continued for g≥6. As the genus increases so does computing time, so it may be prudent to limit the computations to special cases of interest. For g=6, we might focus on the triangle \(Q^{(6)}_{1}=T_{5}\). This is of particular interest as it is the Newton polygon of a smooth plane quintic curve. This triangle has 561,885 regular unimodular triangulations up to symmetry.

Although T 5 is interesting as the Newton polygon of plane quintics, it has the downside that \(\mathbb {M}_{T_{5}}\) is not full-dimensional inside \(\mathbb {M}_{6}^{\text {planar}}\). Proposition 4.3 implies that \(\dim \left (\mathbb {M}_{T_{5}}\right)=12\), while \( \dim \left (\mathbb {M}_{6}^{\text {planar}}\right)=13\), and this dimension is attained by the rectangle R 3,4 as in Equation 17.

This might lead us to focus on full-dimensional polygons of genus g. By this, we mean polygons P whose moduli space \(\mathbb {M}_{P}\) has the dimension in Equation 4. For each genus from 3 to 5, our results show that there is a unique full-dimensional polygon, namely, T 4, R 3,3, and \(Q_{2}^{(5)}\). The proof of Theorem 1.1 furnishes an explicit example for each genus g≥6: take the rectangle in Equation 17 or the trapezoid in Equation 18 if g≠7; or the hexagon H 4,4,2,6 if g=7. Calculations show that there are exactly two full-dimensional maximal polygons for g=6, namely, \(Q_{3}^{(6)}=R_{3,4}\) and \(Q_{4}^{(6)}\) from Proposition 2.7.

We conclude with several open questions.

Question 8.6.

Let P be a maximal lattice polygon with at least two interior lattice points.

  • What is the relationship between \(\mathbb {M}_{P}\) and \(\mathcal {M}_{P}\)? In particular, does the equality \(\mbox{dim}(\mathbb {M}_{P}) = \text {dim}(\mathcal {M}_{P})\) hold for all P?

  • How many P with g interior lattice points give a full-dimensional \(\mathbb {M}_{P}\) inside \(\mathbb {M}_{g}^{\text {planar}}\)?

  • Is there a more efficient way of determining if a combinatorial graph of genus g appears in \(\mathbb {M}_{g}^{\text {planar}}\) than running the pipeline in Section ‘Combinatorics and computations’?