Moduli of Tropical Plane Curves

We study the moduli space of metric graphs that arise from tropical plane curves. There are far fewer such graphs than tropicalizations of classical plane curves. For fixed genus $g$, our moduli space is a stacky fan whose cones are indexed by regular unimodular triangulations of Newton polygons with $g$ interior lattice points. It has dimension $2g+1$ unless $g \leq 3$ or $g = 7$. We compute these spaces explicitly for $g \leq 5$.


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. For basics on tropical geometry and further references the reader is referred to [20,27]. Let M g denote the moduli space of metric graphs of genus g. The moduli space M g is obtained by gluing together finitely many orthants R m ≥0 , m ≤ 3g−3, one for each combinatorial type of graph, modulo the identifications corresponding to graph automorphisms. These automorphisms endow the moduli space M g with the structure of a stacky fan. We refer to [7,11] for the definition of M g , combinatorial details, and applications in algebraic geometry. The maximal cones of M g correspond to trivalent graphs of genus g. These have 2g − 2 vertices and 3g − 3 edges, so 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 = #(int(P ) ∩ Z 2 ). Let M P be the closure in 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 M ∆ be the closure of the cone of metric graphs from tropical curves dual to ∆. These curves all have the same skeleton G, and M ∆ is a convex polyhedral cone in the orthant R 3g−3

≥0
of metrics on G. Working modulo automorphisms of G, we identify M ∆ with its image in the stacky fan M g . Now fix the skeleton G but vary the triangulation. The resulting subset of R 3g−3

≥0
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 M g is a stacky fan: We note that M P is represented inside M g by finite unions of convex polyhedral cones: The moduli space of tropical plane curves of genus g is the following stacky fan inside M g : 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 M planar g . We construct the decompositions in (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 M P has the dimension expected from classical algebraic geometry, namely, if g = 2, 6 if g = 3, 16 if g = 7, 2g + 1 otherwise.

(4)
In each case, the cone M ∆ of honeycomb curves supported on P attains this dimension.
Honeycomb curves are introduced in Section 4. That section furnishes the proof of Theorem 1.1. The connection between tropical and classical curves will be explained in Section 3. The number 2g + 1 in (4) is the dimension of the classical moduli space of trigonal curves of genus g, whose tropicalization is related to our stacky fan M planar g . 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 2 with an introduction to the relevant background from geometric combinatorics. The objects in (1)-(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 5 through 8. The proofs of these theorems rely on the computer calculations that are described in Section 2. In Section 5 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 M T 4 . Four of the five trivalent graphs of genus 3 are realized by smooth tropical plane curves.
Section 6 is devoted to 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 M planar 3,hyp , which together with M T 4 gives M planar 3 . Section 7 deals with curves of genus g = 4. Here (3) is a union over four polygons, and precisely 13 of the 17 trivalent graphs G are realized in (2). The dimensions of the cones M P,G range between 4 and 9. In Section 8 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 ∩ Z 2 be the set of lattice points in P . Any function h : A → R is identified with a tropical polynomial with Newton polygon P , namely, The tropical curve C defined by this min-plus polynomial consists of all points (x, y) ∈ 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 a ∈ A to the height h(a), then take the lower convex hull of the lifted points in R 3 . Finally, we project back to 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 R A . This is called the secondary cone and is denoted Σ(∆). The collection of all secondary cones Σ(∆) is a complete polyhedral fan in 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 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 ∩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     This is a linear inequality for h ∈ 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 linearity space Σ(∆) ∩ −Σ(∆) of the secondary cone is 3-dimensional. It is the space Lin(A) of functions h ∈ R A that are restrictions of affine-linear functions on R 2 . We usually identify Σ(A) with its image in R A /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 R A .
Suppose that ∆ has E interior edges and g interior vertices. We consider two linear maps The map λ takes h and outputs the vector whose bc-coordinate equals (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 p 2 + q 2 . This lets one quickly read off the lengths from a picture of C without having to compute the determinant (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 (6)  By definition, the secondary cone is mapped into the nonnegative orthant under λ. Hence Our discussion implies the following result on the cone of metric graphs arising from ∆: The cone M ∆ is the image of the secondary cone Σ(∆) under κ • λ.
Given any lattice polygon P , we seek to compute the moduli space M P via the decompositions in (2). Our line of attack towards that goal can now be summarized as follows: 1. compute all regular unimodular triangulations of A = P ∩ Z 2 up to symmetry; 2. sort the triangulations into buckets, one for each trivalent graph G of genus g; 3. for each triangulation ∆ with skeleton G, compute its secondary cone Σ(∆) ⊂ R A ; 4. for each secondary cone Σ(∆), compute its image M ∆ in the moduli space M g via (7); 5. merge the results to get the fans M P,G ⊂ R 3g−3 in (1) and the moduli space M P in (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 [21]. 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 (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 (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 R A by the linear inequalities λ(h) ≥ 0 in (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 R 3g−3 that span the moduli cone M ∆ = (κ • λ)(Σ(∆)). Via a convex hull computation as above, we compute all the rays and facets of M ∆ .
The cones M ∆ are generally not full-dimensional in 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 M ∆ is a face of M ∆ . 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 5 and 6.
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 Z 2 .
Proof and Discussion. Scott [29] proved that #(∂P ∩ Z 2 ) ≤ 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 [25] 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 [25,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. (3) is finite. However, from the full list of polygons P with g interior lattice points, only very few will be needed to construct M planar g .

Proposition 2.3 ensures that the union in
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 (3), and only one triangulation ∆ is needed in (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 4. The skeleton G is a cycle whose length is the tropical j-invariant [5, §7.1]. We can summarize this as follows: All inclusions in (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 G 1 = and the dumbbell graph G 2 = . The moduli space M 2 consists of two quotients of the orthant R 3 ≥0 , one for each graph, glued together. For nice drawings see Figures 3 and 4 in [11]. Figure 2 shows three unimodular triangulations ∆ 1 , ∆ 1 , and ∆ 2 of P such that almost all metric graphs in 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 a ≥ b ≥ c denote the edge lengths on G 1 , then the curves dual to ∆ 1 realize all metrics with a ≥ b > 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, Figure 3]. (9) In Section 6 we extend this analysis to hyperelliptic curves of genus g ≥ 3. 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 (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].
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 M ∆ = M ∆ . The unions for P and Q in (2) show that M P ⊆ 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 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.
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 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 However, neither of these two triangles arises as P int for any lattice polygon P . For each genus g, we construct the stacky fans M planar g by computing each of the spaces M Q (g) i and then subdividing their union appropriately. This is then augmented in Section 6 by the spaces M P where P int is not two-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 val : K * → R. Every smooth complete curve C over K defines a metric graph G. This is the Berkovich skeleton of the analytification of C as in [5]. By our hypotheses, every metric graph G of genus g arises from some curve C 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: Both spaces have dimension 3g − 3 for g ≥ 2. The map (10) is referred to as "naive settheoretic 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 = (i,j)∈Z 2 c ij x i y j ∈ K[x ± , y ± ] with Newton polygon P . For τ a face of P we let f | τ = (i,j)∈τ c 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 [24], the theory of sparse resultants [17], and topology of real algebraic curves [19].
Let P be any lattice polygon in R 2 with g interior lattice points. We write M P for the Zariski closure (inside the non-compact moduli space 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 [23]. analogy to (3), we consider the union over all relevant polygons: 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, [ We summarize the objects discussed so far in a diagram of surjections and inclusions: 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: This is the stacky fan in [11, Figure 1]. The space M T 4 = M planar 3,nonhyp of tropical plane quartics is also six-dimensional, but it is smaller. It fills up less than 30% of the curves in 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 P 1 × P 1 . This leads to the Newton polygon ). Detailed computations that reveal our spaces for g = 3, 4, 5 are presented in Sections 5, 6, 7, and 8.
We close this section by returning once more to classical algebraic geometry. Let T g denote the trigonal locus in the moduli space M g . It is well known that 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 [26] states that 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 (17) or the trapezoid in (18). These polygons appear in [10,Section 12], where they are used to argue that T g defines one of the irreducible components of M planar g , namely, 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 M P is fulldimensional in the tropicalization of the trigonal locus. The latter space, denoted trop(T g ), is contained in the space of trigonal metric graphs, by Baker's Specialization Lemma [3, §2].
In general, M planar g has many irreducible components other than the trigonal locus T g . As a consequence, there are many skeleta in M planar

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 To such a quadruple (a, b, c, d), we associate the polygon If all six inequalities in (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 and, by Pick's Theorem, the number of interior lattice points is 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.
If P = H a,b,c,d then its interior P int is a honeycomb polygon as well. Indeed, a translate of P 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 int = H 3,3,1,2 + (1, 1). 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 κ : R 23 → R 12 in (6). The cone λ(Σ(∆)) ⊂ R 23 ≥0 has dimension 13 and is defined by the ten linear equations It has 31 extreme rays. Among their images under κ, only 17 are extreme rays of the moduli cone M ∆ . We find that M ∆ = κ(λ(Σ(∆))) has codimension one in R 12 . It is defined by the non-negativity of the 12 edge lengths, by the equality β = t + v, and by the inequalities The number dim(M ∆ ) = 11 is explained by the following lemma.
Proof. The honeycomb graph G consists of g = #(P int ∩ Z 2 ) hexagons. The hexagons associated with lattice points on the boundary of P 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 R 3g−3

≥0
of all metrics on G, we consider the subcone of metrics M ∆ that arise from ∆. This is the image under κ of the transformed secondary cone λ(Σ(∆)).
The cone λ(Σ(∆)) is defined in R E ≥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 (15). These equations can be chosen to have distinct leading terms, underlined in (15). In particular, they are linearly independent. Now, under the elimination process that represents the projection κ, we retain (i) two linear equations for each lattice point in the interior of P int ; (ii) one linear equation for each lattice point in the relative interior of an edge of P int ; (iii) no linear inequality from the vertices of P int .
That these equations are independent follows from the triangular structure, as in (15). Inside the linear space defined by these equations, the moduli cone M ∆ 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 M ∆ inside the orthant R 3g−3 This expression can be rewritten as Subtracting this codimension from 3g − 3, we obtain the desired formula.
Proof of Theorem 1.1. For the classical moduli space M planar g , the formula (4) was proved in [10]. That dimension is preserved under tropicalization. The inclusion of M planar g in trop(M planar g ), in (12), implies that the right-hand side in (4) is an upper bound on dim(M planar g ).
All g = 2h+1 lattice points of this polygon lie on its boundary, and again dim(M ∆ ) = 2g +1. For all g ≥ 4 with g = 7, this matches the upper bound obtained from [10]. We conclude that dim(M P ) = dim(M g ) = 2g+1 holds in all of these cases. For g = 7 we take P = H 4,4,2,6 . Then P 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 dim(M T 4 ) = 6 in Section 5. 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 P 2 . Their genus is g = (d − 1)(d − 2)/2. The case d = 4, g = 3 will be our topic in Section 5. The rectangle R d,e corresponds to curves of bidegree (d, e) in P 1 × P 1 . Their genus is g = (d − 1)(e − 1). The case d = e = 3, g = 4 appears in Section 7. In particular, the honeycomb triangulation defines a cone M ∆ of this maximal dimension.
Proof. For our standard triangles and rectangles, the formula (16) implies Subtracting from 3g − 3 = dim(M g ), we get the desired formulas for dim(M P ).
The above dimensions are those expected from algebraic geometry. Plane curves with Newton polygon T d form a projective space of dimension 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(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 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 M planar g,hyp for arbitrary g, and we compute it explicitly for g = 3. The full moduli space is then obtained as Just like in classical algebraic geometry, dim(M T 4 ) = 6 and dim(M planar 3,hyp ) = 5. The stacky fan M 3 of all metric graphs has five maximal cones, as shown in [11, Figure 4]. These correspond to the five (leafless) trivalent graphs of genus 3, pictured in Figure 4. Each graph is labeled by the triple ( bc), where is the number of loops, b is the number of biedges, 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].
Although 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 M 3 : the graph (303) cannot be realized in R 2 by Proposition 8.3. The restriction of 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 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 v ≤ u, y ≤ z, 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
( (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 R 6 ≥0 modulo the action of that symmetry group to the stacky fan M 3 . Proof of Theorem 5.1. This is based on explicit computations as in Section 2. 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 1279 (classes of) such triangulations, and of these precisely 1278 are regular. The unique non-regular triangulation is a refinement of [27, Figure 2.3.9]. For each regular triangulation we computed the graph G and the polyhedral cone M ∆ . Each M ∆ is the image of the 12-dimensional secondary cone of ∆. We found that M ∆ has dimension 3, 4, 5 or 6, depending on the structure of the triangulation ∆. A census is given by Table 1 ∆)). This proves that the dense realizable part of 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. Figure 5: A triangulation that realizes almost all realizable graphs of type (000) 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 M ∆ is six-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. There are several lower dimensional collections of graphs 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) In Figure 6 we show triangulations realizing these five special families. Dual edges are labeled

Figure 7:
A triangulation that realizes almost all realizable graphs of type (020) 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 M ∆ 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: (dim = 4) Figure 8: Triangulations giving all metrics in the cases (i) through (iv) for the graph (020) Type (111) is the most complicated. We begin by realizing the metric graphs that lie in int(M T 4 ,(111) ). These arise from the second and third cases in the disjunction (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.
Many triangulations are needed in order to deal with low-dimensional case. In Figure 10 we show triangulations that realize each of the following families of type (111) graphs: u z v w y x Figure 9: Triangulations of type (111) realizing v + w < x < v + 2x and v < u (on the left) and v + 3w < x < v + 4w and v < u < 3v/2 (on the right) (dim = 4) Figure 10: Triangulations of type (111) that realize the boundary cases (i) through (vii) 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. The space 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 five-dimensional M ∆ where ∆ is the leftmost triangulation in Figure 10, but M ∆ is not contained in the boundary of any six-dimensional M ∆ . 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 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 R 6 ≥0 . We fix a probability measure on R 6 ≥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 M 3 we are asking for the ratio of volumes vol(M planar 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 1278 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. 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) ∈ R 6 ≥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 min(u, v), min(y, z) ≤ |x − w|.
The probability that a uniformly sampled random point in the 5-simplex satisfies (22) is equal to 8/15. The desired probability (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 (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 int is a line segment of length g − 1. We define the moduli space of hyperelliptic tropical plane curves of genus g to be M planar g,hyp where the union is over all hyperelliptic polygons P of genus g. Unlike when the interior hull P int is two-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 (g) k := conv{(0, 0), (0, 2), (g + k, 0), (g + 2 − k, 2)} for 1 ≤ k ≤ g + 2.
These hyperelliptic polygons interpolate between the rectangle E (g) 1 = R g+1,2 and the triangle E (g) g+2 . The five maximal hyperelliptic polygons for genus g = 3 are pictured in Figure 12. k for all k, and take the union. By [22,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 2. We next show that it suffices to consider the triangle: 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 (23) both have dimension 2g − 1.
Before proving our theorem, we define M chain g . 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 2 g−1 possible choices in this procedure, some give isomorphic graphs. There are 2 g−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 Figure 21.
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 R 2g−1 ≥0 . We write M chain g for the stacky subfan of M g consisting of all chains. Note that M chain g is strictly contained in the space M 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 (g) k also arises from the hyperelliptic triangle E (g) g+2 . Given a triangulation ∆ of E (g) k , our proof constructs a triangulation ∆ of E (g) g+2 that gives rise to the same collection of metric graphs, so that M ∆ = M ∆ , 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.
5 , giving rise to skeletons with the same metrics. Also pictured in Figure 13 is a triangulation ∆ of E 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, M ∆ = M ∆ , 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 (3) 5 must include these edges), and then add additional edges based on the combinatorial type of ∆, as pictured in Figure 14. 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 ∆.
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 Perform a symmetric construction around (g, 1). These edge choices will give the same constraints on the 1 st and g th loops as those imposed by ∆. This completes the proof.
We now return to genus g = 3, our topic in Section 5, and we complete the computation of M planar 3 . By (19) and Theorem 6.1, it suffices to compute the 5-dimensional space M E (g) g+2 . An explicit computation as in Section 2 reveals that the rectangle E  It was proved in [4] that M R 4,2 and M T 4 have disjoint interiors. Moreover, M R 4,2 is not contained in M T 4 . This highlights a crucial difference between (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 M T 4 does not contain 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 M R 4,2 but not in M T 4 . What follows is the hyperelliptic analogue to the non-hyperelliptic Theorem 5.1. (020) is realizable if and only if w = x, v ≤ u, v ≤ y ≤ z, and (y < v + 2w ) or (y = v + 2w and y < z ) or (y < v + 3w and u ≤ 2v ) or (y = v + 3w and u ≤ 2v and y < z ) or (y < v + 4w and u = v ) or ( y = v + 4w and u = v and y < z ).  Proof. This is based on an explicit computation as described in Section 2. The hyperelliptic rectangle R 4,2 has 3105 unimodular triangulations up to symmetry. All triangulations are regular. For each such triangulation we computed the graph G and the polyhedral cone M ∆ . Each M ∆ has dimension 3, 4, or 5, with census given on the left in Table 2. For each cone M ∆ we then checked that the inequalities stated in Theorem 6.3 are satisfied. This proves that the dense realizable part of M R 4,2 is contained in the polyhedral space described by our constraints.
u v w x y z Figure 17: Triangulations giving all realizable hyperelliptic metrics for the graph (020) Next we deal with graph (111). Here we need two triangulations, one for u = v and one for u = v. They are pictured in Figure 18. The left gives u = v, and the middle gives u = v.  (212) Finally, for the graph (212), the single triangulation on the right in Figure 18 suffices.

Genus Four
In this section we compute the moduli space of tropical plane curves of genus 4. This is where Q (4) i are the three genus 4 polygons in Proposition 2.7. They are shown in Figure 19. There are 17 trivalent genus 4 graphs, of which 16 are planar. These were first enumerated in [6], and are shown in Figure 21. All have 6 vertices and 9 edges. The labels ( bc) are as in Section 5: is the number of loops, b the number of bi-edges, and c the number of cut edges. Figure 19: The three non-hyperelliptic genus 4 polygons and a triangulation 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 .
Up to their respective symmetries, the square Q 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 (1) of each stacky fan 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 1278 triangulations ∆ of the triangle Q 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 M 4 . The five graphs that occur with positive probability are those with dim(M Q (4) 1 ,G ) = 9. Full-dimensional realizations were seen in Figure 20. The result of our volume computations is the following In contrast to the exact computation in Corollary 5.2, our probability computations for genus 4 rely on a Monte-Carlo simulation, with one million random samples for each graph.  This was originally proven in [8,Prop. 4.1]. We present our own proof for completeness.
Remark 8.4. If G is sprawling then M planar g ∩ M G = ∅ 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 2 , Q 3 , Q 4 are the four genus 5 polygons in Proposition 2.7. They are shown in Figure 23. Modulo their respective symmetries, the numbers of unimodular triangulations of these polygons are: 508 for Q   We applied the pipeline described in Section 2 to all these triangulations. The outcome of our computations is the following result which is the genus 5 analogue to Theorem 7.1.
All but one of the 38 realizable graphs arise from Q 4 , is illustrated in Figure 24. This is reminiscent of the genus 4 graph (303), which was realized only by the triangulation of Q (4) 3 in Figure 19. The other 37 graphs are realized by at least two of the polygons Q 7 . 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 2. Three of these 14 graphs are shown in Figure 25. At present we do not know any general rule that discriminates between realizable and non-realizable graphs.
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 Although T 5 is interesting as the Newton polygon of plane quintics, it has the downside that M T 5 is not full-dimensional inside M planar 6 . Proposition 4.3 implies that dim(M T 5 ) = 12, while dim(M planar 6 ) = 13, and this dimension is attained by the rectangle R 3,4 as in (17). This might lead us to focus on full-dimensional polygons of genus g. By this we mean polygons P whose moduli space M P has the dimension in (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 . The proof of Theorem 1.1 furnishes an explicit example for each genus g ≥ 6: take the rectangle in (17) or the trapezoid in (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 Question 8.6. Let P be a maximal lattice polygon with at least 2 interior lattice points.
(1) What is the relationship between M P and M P ? In particular, does the equality dim(M P ) = dim(M P ) hold for all P ?
(2) How many P with g interior lattice points give a full dimensional M P inside M planar g ?
(3) Is there a more efficient way of determining if a combinatorial graph of genus g appears in M planar g than running the pipeline in Section 2?