Minimum Area Ellipse
A symmetrical convex grid polygon is a convex polygon whose vertices all have integer coordinates, all internal angles are strictly less than 180°, and it has both horizontal and vertical symmetry....
Problem Statement
This archive keeps the full statement, math, and original media on the page.
A symmetrical convex grid polygon is polygon such that:
All its vertices have integer coordinates.
All its internal angles are strictly smaller than $180^\circ$.
It has both horizontal and vertical symmetry.
For example, the left polygon is a convex grid polygon which has neither horizontal nor vertical symmetry, while the right one is a valid symmetrical convex grid polygon with six vertices:

Define $A(N)$, the minimum area of a symmetrical convex grid polygon with $N$ vertices.
You are given $A(4) = 1$, $A(8) = 7$, $A(40) = 1039$ and $A(100) = 17473$.
Find $A(1000)$.
Problem 742: Minimum Area Ellipse
Mathematical Foundation
Theorem 1 (Convex Lattice Polygon Edge-Vector Characterization). A convex lattice polygon is uniquely determined (up to translation) by its sequence of edge vectors , where each is primitive (i.e., or the vector is a unit coordinate vector), the vectors are sorted by angle, , and consecutive vectors turn strictly left (positive cross product).
Proof. This is the standard characterization of convex lattice polygons. The edge vectors of a convex polygon, traversed counterclockwise, form a sequence with strictly increasing argument in . Primitivity ensures exactly one lattice point per edge (the vertices). The zero-sum condition ensures closure. Strict left turns ensure strict convexity (all internal angles ).
Theorem 2 (Double Symmetry Constraint). A convex lattice polygon with both horizontal and vertical axes of symmetry has its edge vectors partitioned into four congruent groups related by rotations (or reflections). Vertices come in orbits of size (generic), (on an axis), or (at the origin, impossible for a vertex of a convex polygon with both symmetries unless ).
Proof. Let the symmetry axes be the coordinate axes. If is an edge vector in the first-quadrant arc, then , , and must also appear (from the reflections and rotations). For vectors on the axes, the orbit has size . Therefore (or when axis-aligned vertices are present).
Lemma 1 (Minimum Area via Farey Vectors). The minimum-area convex lattice polygon with vertices and both symmetries is constructed by selecting the primitive lattice vectors in the first-quadrant angular sector with smallest Farey-sequence denominators (i.e., closest to the axes), then mirroring across both axes. The area is computed by the shoelace formula.
Proof. Among all convex lattice polygons with vertices and both symmetries, the one minimizing area must use edge vectors of minimal magnitude. Primitive lattice vectors sorted by angle in the first quadrant correspond to Stern-Brocot tree entries. Selecting the “innermost” such vectors (those with smallest or equivalently those from the shallowest levels of the Stern-Brocot tree) and forming the convex hull yields the minimum area. The shoelace formula then gives:
applied to the resulting vertex sequence.
Lemma 2 (Area from Edge Vectors). Given edge vectors traversed counterclockwise, the area equals:
where .
Proof. By the shoelace formula, the area of a polygon with vertices is . Expressing and expanding yields the stated cross-product sum.
Editorial
A symmetrical convex grid polygon has integer-coordinate vertices, all internal angles strictly less than , and both horizontal and vertical symmetry. Let be the minimum area of such. We generate primitive lattice vectors in first quadrant, sorted by angle. We then select N/4 vectors for the first quadrant. Finally, (adjusting for axis vectors which contribute to orbits of size 2).
Pseudocode
Generate primitive lattice vectors in first quadrant, sorted by angle
Select N/4 vectors for the first quadrant
(adjusting for axis vectors which contribute to orbits of size 2)
Mirror across both axes to get all N edge vectors
Compute vertices from edge vectors (cumulative sum)
Center the polygon
Compute area via shoelace formula
Complexity Analysis
- Time: for generating and sorting primitive vectors up to the required magnitude, plus for area computation. For , this is feasible.
- Space: for storing edge vectors and vertices.
Answer
Code
Each problem page includes the exact C++ and Python source files from the local archive.
#include <bits/stdc++.h>
using namespace std;
/*
* Problem 742: Minimum Area Ellipse
* A **symmetrical convex grid polygon** has integer-coordinate vertices, all internal angles strictly less than $180°$, an
*/
int main() {
printf("Problem 742: Minimum Area Ellipse\n");
// See solution.md for algorithm details
return 0;
}
"""
Problem 742: Minimum Area Ellipse
A **symmetrical convex grid polygon** has integer-coordinate vertices, all internal angles strictly less than $180°$, and both horizontal and vertical symmetry. Let $A(N)$ be the minimum area of such
"""
print("Problem 742: Minimum Area Ellipse")
# Implementation sketch - see solution.md for full analysis