*Article* **Finding the Conjectured Sequence of Largest Small** *n***-Polygons by Numerical Optimization**

**János D. Pintér 1, Frank J. Kampas <sup>2</sup> and Ignacio Castillo 3,\***


<sup>3</sup> Lazaridis School of Business and Economics, Wilfrid Laurier University, 75 University Avenue West, Waterloo, ON N2L 3C5, Canada

**\*** Correspondence: icastillo@wlu.ca

**Abstract:** *LSP*(*n*), the largest small polygon with *n* vertices, is a polygon with a unit diameter that has a maximal of area *A*(*n*). It is known that for all odd values *n* ≥ 3, *LSP*(*n*) is a regular *n*-polygon; however, this statement is not valid even for values of *n*. Finding the polygon *LSP*(*n*) and *A*(*n*) for even values *n* ≥ 6 has been a long-standing challenge. In this work, we developed high-precision numerical solution estimates of *A*(*n*) for even values *n* ≥ 4, using the Mathematica model development environment and the IPOPT local nonlinear optimization solver engine. First, we present a revised (tightened) LSP model that greatly assists in the efficient numerical solution of the model-class considered. This is followed by results for an illustrative sequence of even values of *n*, up to *n* ≤ 1000. Most of the earlier research addressed special cases up to *n* ≤ 20, while others obtained numerical optimization results for a range of values from 6 ≤ *n* ≤ 100. The results obtained were used to provide regression model-based estimates of the optimal area sequence {*A*(*n*)}, for even values *n* of interest, thereby essentially solving the LSP model-class numerically, with demonstrably high precision.

**Keywords:** nonlinear programming; largest small polygons (LSP); {*LSP*(*n*)} model-class; optimal area sequence {*A*(*n*)}; revised LSP model; mathematica model development environment; IPOPT solver engine; numerical optimization results and regression model for estimating {*A*(*n*)}

### **1. Introduction**

The diameter of a convex planar polygon is defined as the length of its longest diagonal. The largest small polygon (LSP) with *n* vertices is defined as a polygon of a unit diameter that has a maximal area. For a given integer *n* ≥ 3, we refer to this polygon as *LSP*(*n*) with a corresponding area *A*(*n*). To illustrate, Figure 1 shows visual representations of our conjectured maximal area *LSP*(6) and *LSP*(18).

Nearly a century ago, Reinhardt (1922) [1] proved that for all *odd* values *n* ≥ 3, *LSP*(*n*) is the regular *n*-polygon; perhaps surprisingly, the corresponding statement is not valid for *even* values of *n*. For brevity, here we only refer to the discussion of the low-dimensional cases studied elsewhere. Specifically, Graham (1975) [2] presented an exact solution of the hexagon; Audet et al. 2002 [3] presented the first numerical solutions of the octagon, followed by the exact optimal axially symmetric octagon in Audet et al. (2021) [4]; Henrion and Messine (2013) [5] provided numerical guarantees of global optimality and successfully found the largest small polygons for *n* = 10 and *n* = 12. Mossinghoff (2006) [6] presented some related theoretical background, confirmed earlier best-known results, and gave additional numerical estimates through *n* = 20. In more recent studies, Bingane (2020) [7] gave near-optimal numerical estimates of *A*(*n*) with up to *n* = 128, and Pintér (2021) [8] gave globally optimized numerical estimates of *A*(*n*) for all even values 6 ≤ *n* ≤ 80, both studies share comparative references to earlier works. These works—and several others

**Citation:** Pintér, J.D.; Kampas, F.J.; Castillo, I. Finding the Conjectured Sequence of Largest Small *n*-Polygons by Numerical Optimization. *Math. Comput. Appl.* **2022**, *27*, 42. https:// doi.org/10.3390/mca27030042

Academic Editor: Oliver Schütze

Received: 16 March 2022 Accepted: 11 May 2022 Published: 16 May 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

cited by both Bingane (2020) [7] and Pintér (2021) [8]—clearly indicate the limitations and varying performance level of the modeling and optimization software packages used earlier.

**Figure 1.** Our conjectured largest small polygons *LSP*(6) and *LSP*(18).

Here we present the results of a numerical optimization study aimed at finding conjectured *LSP*(*n*) configurations and corresponding values *A*(*n*), for a substantial selection of even values covering the range of 4 ≤ *n* ≤ 1000. We propose a revised (tightened) LSP model, then solve model instances using the *Mathematica* model development platform with the callable IPOPT nonlinear optimization solver. Based on the results obtained, we also developed a regression model to estimate {*A*(*n*)} for all of the even values of *n*. Since, for large *n*, the actual calculated optimum estimates *A*(*n*) already closely approximate the theoretical limit of *A*(∞) = *π*/4, our numerical study enables high-precision estimates covering the LSP model-class.

#### **2. Revised LSP Optimization Model**

For unambiguity, we consider all *LSP*(*n*) instances for even *n* ≥ 4 with a fixed position corresponding to the appropriate variants of the instances shown in Figure 1. Following the standard assumptions also postulated by others, each even *n*-polygon considered here is symmetrical with respect to the diagonal that connects its lowest positioned vertex placed at the origin with its highest vertex. We refer to this configuration as the standard model: it has been used in all topical works referenced by Pintér (2021) [8].

The standard LSP model uses polar coordinates to describe the *LSP*(*n*): the vertex *i* is positioned at the polar radius *ri* and at angle *θi*. For unambiguity, we postulate that the vertices *i* = 1, ... , *n* − 1 are arranged according to increasing angles *θi*. Placing the last vertex at the origin, we set *rn* = 0, *θ<sup>n</sup>* = *π*: recall Figure 1 that shows examples of such a configuration. The corresponding standard LSP optimization model is presented next.

Maximize total area of the *n*-polygon:

$$\max A(n) = \frac{1}{2} \sum\_{i=1}^{n-1} r\_i r\_{i+1} \sin(\theta\_{i+1} - \theta\_i). \tag{1}$$

Prescribed upper bound for the pairwise distance between vertices *i* and *j*:

$$r\_i^2 + r\_j^2 - 2r\_i r\_j \cos(\theta\_i - \theta\_j) \le 1,\text{ for } 1 \le i \le n - 2,\ i + 1 \le j \le n - 1. \tag{2}$$

Vertex angle ordering relations:

$$
\theta\_{i+1} - \theta\_i \ge 0, \text{ for } 1 \le i \le n - 2. \tag{3}
$$

Decision variable bounds, and the two fixed variable settings:

$$0 \le \theta\_i \le \pi \text{ and } 0 \le r\_i \le 1, \text{ for } 1 \le i \le n - 1; \ r\_n = 0, \theta\_n = \pi. \tag{4}$$

Based on the structure of the LSP configurations found in all of the earlier studies, next we revise this standard model, by adding the relations shown below.

(i) We postulate bounds on the angle differences, for even *n*:

$$
\theta\_{i+1} - \theta\_i \ge \frac{\pi}{n'}, \text{ for } 1 \le i \le n - 2,\tag{5}
$$

$$
\theta\_{n/2} = \frac{\pi}{2}.\tag{6}
$$

(ii) We postulate the symmetry of the LSP configuration to be found, for even *n*:

$$r\_{n/2+i-1} = r\_{n/2-i+1}, \text{ for } 2 \le i \le \frac{n}{2},\tag{7}$$

$$
\theta\_{n/2+i-1} = \pi - \theta\_{n/2-i+1\prime} \text{ for } 2 \le i \le \frac{n}{2}.\tag{8}
$$

To illustrate these added constraints, we refer again to Figure 1; further examples will be presented later on. Our preliminary experimentation demonstrated that the symmetry postulates (7)–(8) for even *n*, despite reducing the number of decision variables, were not useful within our numerical optimization study. However, the bound postulates on the angle differences were useful by effectively tightening the LSP model. As it turns out, the new constraints are essential to guarantee the performance of the *local* solver IPOPT in numerically solving the *global* optimization problem (1)–(4), with the added considerations (5)–(6) for even *n*.

Observe the potential numerical challenge implied by the nonconvex objective function (1) and constraints (2): the number of these constraints increases *quadratically* as a function of *n*. While the standard *LSP*(*n*) model instances have a unique globally optimal solution, the number of local optima increases with *n*. Many of the local optima are close in quality to the (numerically estimated, hence only approximately known) global optimum. These features make the {*LSP*(*n*)} problem-class hard to solve, similarly to many other of the object configuration design and packing problems arising e.g., in computational mathematics, physics, chemistry, biology, as well as across a range of engineering applications.

#### **3. Numerical Results for Even Values 4** *≤* **n** *≤* **1000**

The study summarized here was conducted on a laptop PC with the following specifications: Intel Core i7-7700 CPU @ 3.6 GHz (x-64 processor), 16.0 GB RAM, running under the Windows 10 Pro (64-bit) operating system.

To formulate directly scalable LSP model versions, we use the *Mathematica* model development environment (Wolfram Research, 2022a [9]). To handle these models numerically, we use the IPOPT local nonlinear optimization solver engine (Wächter and Laird, 2022 [10]) linked to *Mathematica* (Wolfram Research, 2022b [11]). The result analysis and visualization was also conducted in *Mathematica*.

Since IPOPT is a local scope solver, it requires an initial solution "guess:" hence, it greatly benefits from a good choice of that estimate. Considering the postulated structure of the LSP configurations to be found, for a given *n* our initial angle settings are chosen as *θ<sup>i</sup>* = *i*(*π*/*n*), for 1 ≤ *i* ≤ *n*, together with the initial polar radius settings *ri* = 1 for 1 ≤ *i* ≤ *n* − 1; *rn* = 0

The numerical results obtained by using *Mathematica* and IPOPT are summarized below. Detailed *LSP*(*n*) configurations (listing all decision variable values found and all constraints) can be optionally reported by our *Mathematica* code. All of the optimization results, with related analysis and visualization, are directly cited from the corresponding *Mathematica* (notebook) documents: thereby, our study is completely reproducible. The *Mathematica* notebook is available upon request from the authors.

Table 1 summarizes our results for the selected even values of 4 ≤ *n* ≤ 1000. Since the solution times become rather substantial as *n* increases, we report results only for a representative selection of even values; however, in principle we could handle *all* instances of *LSP*(*n*), provably at least up to *n* ≤ 1000. For example (see Table 1), the runtime for *n* = 10 is only 0.06 s; for *n* = 100 it is still just 9.44 s; but for *n* = 1000 it becomes 5417.51 s. We did not conduct systematic tests to find the largest possible numerical instance that we could handle using *Mathematica* with IPOPT, noting that all of the modeling systems and optimization engines have their limitations, also depending on the hardware platform and other circumstances.




**Table 1.** *Cont.*

\* Instances for which *A*(*n*) ≤ *An*\*. † Instances 6 ≤ *n* ≤ 120 for which *A(n)* ≥ *An\** as reported in Bingane (2020) [7].

The legend used is self-explanatory, "Maximum violation" refers to the maximal constraint violation at the numerical optimal solution. One can verify the *linear* increase in the number of decision variables and the rapid *quadratic* increase in the number of constraints as a function of *n* (recall the LSP model). The model instance for *n* = 1000 has almost two thousand decision variables and nearly half a million constraints.

For even *n* ≥ 6, it was shown in Mossinghoff (2006) [6] and Bingane (2022) [12] that the best known *general* lower bound is given by the diameter graph of an optimal *n*-polygon that has a cycle of length *n* − 1 plus one additional edge from the remaining vertex. As such,

$$A(n) > \Delta\_n = \frac{n-1}{2} \left( \sin \frac{\pi}{n-1} - \tan \frac{\pi}{2n-2} \right) + \sin \frac{\pi}{2n-2} - \frac{1}{2} \sin \frac{\pi}{n-1}.\tag{9}$$

Our results satisfy this general lower bound except for *A*(56), *A*(60), *A*(950), and *A*(1000). See Table 1. Indeed, equation (9) provides a very good general lower bound and it could be used as an additional constraint in the LSP optimization model. We note that Mossinghoff (2006) [6] and Bingane (2022) [12] obtained better asymptotic lower bounds by explicit instance constructions, which are not generally applicable as equation (9). In Table 1, we also indicate the instances 6 ≤ *n* ≤ 120 for which *A*(*n*) ≥ *A*<sup>∗</sup> *<sup>n</sup>* (the optimal values of the maximal area problem for even *n*) as reported in Bingane (2020) [7].

Although Table 1 shows the optimized *A*(*n*) values with only six digits after the decimal point, the reported precision in our detailed numerical tests (within *Mathematica*) is set to ten digits after the decimal point. To illustrate, our estimate for *A*(1000) approximately equals 0.7853949284. Using such higher precision is in line with the required constraint satisfaction level, all in the order of 10−<sup>9</sup> as shown in the table. The preset 10-digit precision also supports the in-depth comparisons with results obtained earlier. Specifically, our results are in close agreement with or surpass all of the best *numerical* results reported earlier, including Mossinghoff (2006) [6], Bingane (2020) [7], and Pintér (2021) [8], with reported comparisons to all earlier topical works known to us. Our modeling and optimization approach enables solving *LSP*(*n*) instances for significantly higher values of *n* than previously achieved by other researchers using a variety of modeling platforms and solver engines.

Figures 2 and 3 display the solutions found for a selection of even sequences of *n*, showing all of the pairwise vertex connections. As expected, the configurations found quickly approach the circle, as *n* increases.

Figure 4 summarizes the difference between the area *A*(*n*) of the optimized polygon and *π*/4 as a function of *n*, on a loglog-plot scale. Our calculations reveal a small, but non-negligible difference: the numerically estimated slope of the plot for an even number of sides is approximately −2.04618.

**Figure 2.** Conjectured largest small polygons *LSP*(*n*) for *n* = 6, 8, 10, 12, 14, 16, 18, 20.

**Figure 3.** Conjectured largest small polygons *LSP*(*n*) for *n* = 30, 40, 50, 60, 70, 80, 90, 100.

**Figure 4.** Difference between the area *A*(*n*) of the optimized polygon and *π*/4, for selected even values 4 ≤ *n* ≤ 150.

We conclude the presentation of numerical results by emphasizing that the tightened LSP model offers advantages over the standard model. Specifically, IPOPT performs well on the tightened model, but it exhibits inferior performance on the standard model for values 6 ≤ *n* ≤ 80, as observed by Pintér (2021) [8]. Figure 5 illustrates the superior IPOPT performance on tightened LSP model-instances up to *n* = 300, when compared to Figure 6 (standard LSP model with the same fixed starting solution as used in the tightened model) and Figure 7 (standard LSP model with *n* random starting solutions). In the latter case, the solver runtimes also become longer; therefore, we conducted experiments only up to *n* = 100.

**Figure 5.** IPOPT performance on tightened LSP model-instances up to *n* = 300. Difference between the area *A*(*n*) of the optimized polygon and *π*/4.

**Figure 6.** IPOPT performance on standard LSP model-instances, with the proposed starting solution, up to *n* = 300. Difference between the area *A*(*n*) of the optimized polygon and *π*/4.

**Figure 7.** IPOPT performance on standard LSP model-instances, with random starting solutions up to *n* = 100. Difference between the area *A*(*n*) of the optimized polygon and *π*/4.

#### **4.** *LSP***(***n***) Regression Model for Even** *n*

As it is known, and illustrated by Figures 2 and 3, for large *n* the optimal *LSP*(*n*) configuration approaches the circle with unit diameter; hence the corresponding area limit is *A*(∞) = *π*/4 ∼ 0.7853981634. Comparing this limit value to our optimum estimate obtained for *A*(1000) ∼ 0.7853949284, the ratio *A*(1000)/(*π*/4) approximately equals 0.9999958811. Hence, our *A*(1000) estimate already leads to a fairly close approximation of the limit value.

Based on this observation and using our numerical results, we developed the following regression model for even values of *n*.

$$A(n) \sim \frac{\pi}{4} - \frac{5\pi^3}{48n^2} - 3.530190\left(\frac{1}{n^3}\right) - 2.391836\left(\frac{1}{n^4}\right) - 19.489487\left(\frac{1}{n^5}\right). \tag{10}$$

This regression model follows the form outlined in Foster and Szabo (2007) [13] and we received *p*-values (observed significance levels) well below 0.000001 for all coefficients. This finding indicates that we have very strong statistical evidence suggesting that the regression coefficients are all different from zero. Figure 8 depicts the predicted results using model (10).

**Figure 8.** The nonlinear regression model (10) predicting *A*(*n*) shown for even 4 ≤ *n* ≤ 1000.

Since the two sequences closely overlap, the preceding figure depicting observed vs. predicted *A*(*n*) results become more useful when we zoom in and reduce the ranges considerably. In Figure 9, we display observed vs. predicted *A*(*n*) results for 24 ≤ *n* ≤ 100 and 0.779 ≤ *A*(*n*) ≤ 0.785. The observed vs. predicted sequences appear visually different from each other only with high levels of magnification.

**Figure 9.** Zooming in: observed vs. predicted *A*(*n*) results applying the regression model (10) for even 24 ≤ *n* ≤ 100.

The regression model (10) can be used to directly estimate the selected values from the entire sequence {*A*(*n*)}, including larger values of *n* which have not been studied earlier and may be out of the range of current optimization solver capabilities. For example,

*A*(2000) ∼ 0.7853973555, *A*(10000) ∼ 0.7853981311.

It is instructive to compare these estimates to *A*(∞) = *π*/4 ∼ 0.7853981634. Earlier numerical examples, with a different regression model based on results for even 6 ≤ *n* ≤ 80, are presented in Pintér (2021) [8].

#### **5. Conclusions**

Our study addresses the problem of numerically finding the sequence of the largest small *n*-polygons *LSP*(*n*) with a unit diameter and maximal area of *A*(*n*), in principle aiming for all of the even values of *n* ≥ 4. This long-standing mathematical "puzzle" leads to an interesting class of nonlinear (global) optimization problems. We proposed a tightened LSP model and demonstrated its numerical advantages compared to the standard model. Using the *Mathematica* modeling environment with the IPOPT solver option, and our new initial solution estimate, we can find numerical solutions efficiently for a range of even values of *n*, up to *n* ≤ 1000. Our results compare well to all the best results reported earlier for significantly lower values of *n*. We also propose a regression model that enables the direct estimation of the optimal area sequence {*A*(*n*)}, for even values of *n*.

The LSP problem-class is one of those entertaining "puzzles" that can be described in a few words yet lead to surprisingly hard theoretical and numerical challenges. Therefore, this model-class—similarly to many other scientifically important configuration design models—can also be used in software benchmarking tests. We think that such problems serve as a significant addendum to the collection of (well-frequented, and often much simpler) unconstrained or box-constrained test problems. For further examples of increasingly hard-tosolve object configuration models, we refer to some of our studies: consult, e.g., Castillo et al. (2008) [14], Pintér et al. (2017) [15], Kampas et al. (2019) [16], Kampas et al. (2020) [17].

**Author Contributions:** All three authors (J.D.P., F.J.K. and I.C.) contributed to the development of this research study, including conceptualization, methodology, software, numerical tests, and manuscript preparation. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**


MDPI St. Alban-Anlage 66 4052 Basel Switzerland Tel. +41 61 683 77 34 Fax +41 61 302 89 18 www.mdpi.com

*Mathematical and Computational Applications* Editorial Office E-mail: mca@mdpi.com www.mdpi.com/journal/mca

Academic Open Access Publishing

www.mdpi.com ISBN 978-3-0365-7905-4