---
title: 'Grasshopper Problem: Combinatorics & Optimization'
url: https://www.emergentmind.com/topics/grasshopper-problem
type: topic
---

# Grasshopper Problem: Combinatorics & Optimization

In the literature surveyed here, the expression **grasshopper problem** denotes a cluster of mathematically distinct questions organized around a jump process. The name most prominently refers to the International Mathematical Olympiad problem on permuting distinct positive jumps so that no intermediate partial sum lies in a prescribed forbidden set, and to a geometric optimization problem in which a lawn or colouring is chosen to maximize the probability that a randomly jumping grasshopper remains on the same set. A separate horological usage concerns the precision limits of John Harrison’s grasshopper escapement in mechanical clocks [1911.01534], [1705.07621], [2111.07302].

## 1. Olympiad formulation and combinatorial content

The classical olympiad grasshopper problem, posed as IMO 2009 Problem 6, starts with distinct positive integers \(a_1,\dots,a_n\) and a set \(M\) of \(n-1\) positive integers not containing
\[
s=a_1+\cdots+a_n.
\]
A grasshopper starts at \(0\) on the real axis and makes the jumps \(a_1,\dots,a_n\) in some order, always to the right. The claim is that there exists a permutation \(\pi\) such that the partial sums
\[
S_k=a_{\pi(1)}+\cdots+a_{\pi(k)} \qquad (1\le k\le n-1)
\]
all avoid \(M\) [1911.01534].

This formulation has several immediate structural features. Positivity implies that landing points are strictly increasing, distinctness of the \(a_i\) is essential in the combinatorial arguments, and the final position \(s\) is automatically safe by hypothesis. The problem was widely discussed after IMO 2009, and the known complete solutions in the original positive-jump setting are elementary and inductive rather than polynomial-method proofs [1008.2936].

A generalized formal statement used in Lean 4 replaces the list \(a_1,\dots,a_n\) by a function \(a:\mathrm{Fin}\,n\to\mathbb N\), assumes positivity and injectivity, weakens \(|M|=n-1\) to \(|M|<n\), and asks for a permutation \(\sigma:\mathrm{Equiv.Perm}(\mathrm{Fin}\,n)\) such that every encoded partial sum \(PS\,a\,\sigma\,k\) avoids \(M\) [2605.20120]. This suggests that the olympiad statement sits naturally inside a broader finite-set permutation-avoidance framework.

## 2. Polynomial, signed-jump, and formal approaches

A standard algebraic encoding introduces
\[
f(x_1,\dots,x_n)=\prod_{\ell=1}^{n-1}\prod_{i=1}^{n-1}\big((x_1+\cdots+x_\ell)-m_i\big),
\]
so that, for a fixed ordering, \(f(a_1,\dots,a_n)\neq 0\) if and only if none of the intermediate partial sums hits a forbidden value. This makes the grasshopper constraint a nonvanishing problem for a polynomial on permutations [1911.01534].

The direct Combinatorial Nullstellensatz route runs into two obstacles. If all coordinate sets are taken equal to \(\{a_1,\dots,a_n\}\), nonvanishing does not force the coordinates to be distinct, hence it need not correspond to a permutation. Multiplying by the Vandermonde polynomial enforces distinctness, but then the degree becomes too large for the usual Nullstellensatz hypotheses. Ieno’s refinement replaces direct multiplication by an antisymmetrized sum
\[
P_n(x_1,\dots,x_n)=\sum_{\tau\in\mathrm{Sym}(n)}\operatorname{sgn}(\tau)\,
f(x_{\tau(1)},\dots,x_{\tau(n)}),
\]
which is divisible by the Vandermonde and can be analyzed explicitly for \(n=3,4,5\). For \(n=3\) and \(n=4\), this yields partial algebraic control, but the method encounters “singularity” loci where \(P_n\) vanishes and no longer certifies the existence of a valid permutation [1911.01534].

A different polynomial success occurs in the **signed-jumps** variant, where the \(a_i\) are allowed to be arbitrary distinct integers. In that setting, Kós proves sharp thresholds for the size of a blocking set \(M\): for \(n=2k\), \(|M|\le k\); for \(n=2k+1\) with zero allowed, \(|M|\le k\); and for \(n=2k+1\) with all \(a_i\neq 0\), \(|M|\le k+1\) [1008.2936]. The proof uses an alternating polynomial of exactly the same total degree as the Vandermonde, reducing the problem to positivity of a coefficient family \(a^{(n,u,v)}_{d_1,\dots,d_n}\) established by induction [1008.2936].

Formalization work in Lean 4 exposes a different boundary. The Aristotle-generated development verifies four local lemmas: `PS_last`, `PS_swap`, `PS_swap_eq`, and `maximizer_swap_in_M`. These establish that the final partial sum equals the total sum, that an adjacent transposition changes only one relevant intermediate partial sum, that the changed partial sum has the expected algebraic form, and that maximality forces corresponding forbidden-set membership. The main theorem, however, remains closed by a single unresolved `sorry`, because the global counting argument needed to contradict \(|M|<n\) is not formalized [2605.20120]. This suggests a sharp distinction between local exchange lemmas and global combinatorial bookkeeping.

## 3. Planar geometric optimization

In geometric combinatorics, the grasshopper problem asks for a measurable lawn of area \(1\) in \(\mathbb R^2\) maximizing the probability that a grasshopper, initially landing uniformly on the lawn and then jumping a fixed Euclidean distance \(d\) in a random direction, remains on the lawn. For a density \(\mu:\mathbb R^2\to[0,1]\) with \(\int \mu=1\), the success functional is
\[
p_\mu(d)=\frac{1}{2\pi}\int_{\mathbb R^2} d^2r\int_0^{2\pi} d\theta\;
\mu(\mathbf r)\,\mu(\mathbf r-d\hat n(\theta)),
\]
and in the indicator case \(\mu=1_S\), the problem is to optimize over measurable sets \(S\) of area \(1\) [1705.07621].

The principal negative result is that a disc-shaped lawn is **not** optimal for any \(d>0\) [1705.07621]. This is already unexpected at small jump lengths, where an isoperimetric heuristic might suggest discs. Goulko and Kent further introduce a discrete spin model whose ground state corresponds to a discretized version of the problem and use simulated annealing and parallel tempering to search for optimizers [1705.07621].

For \(d<\pi^{-1/2}\), the best numerical lawns resemble **cogwheels** with \(n\) cogs, where \(n\) is close to
\[
\pi\big(\arcsin(\sqrt{\pi}\,d/2)\big)^{-1}.
\]
For \(d\gtrsim \pi^{-1/2}\), the numerics indicate transitions to qualitatively different shapes, including disconnected and stripe-like regimes [1705.07621]. A plausible implication is that the planar problem is governed less by classical perimeter minimization than by a nonlocal resonance between boundary geometry and the prescribed jump distance.

## 4. Circle and sphere variants, and the Bell-inequality connection

On the circle \(\mathbb S^1\) of circumference \(2\pi\), the corresponding problem admits a largely complete arithmetic classification. For unconstrained lawns of any fixed length and arbitrary jump length, the supremum retention probability is \(1\); it is attained for rational jump lengths and approximated arbitrarily well for irrational ones [2001.06442]. For **antipodal lawns** of length \(\pi\), the picture changes: if
\[
\phi=\pi\frac{p}{q},\qquad (p,q)=1,
\]
then the optimal retention probability equals \(1-1/q\) when \(p\) is odd and \(q\ge 2\), equals \(1/2\) for \(\phi=\pi\), and is \(1\) in the complementary cases [2001.06442]. For a **pair** of antipodal lawns, the optimal transfer probability is \(1-1/q\) when \(p\) is odd and \(q\) is even, and \(1\) otherwise [2001.06442].

On the sphere, the same jump process becomes directly relevant to Bell inequalities. The spherical grasshopper problem can be interpreted as finding the best local hidden-variable approximation to singlet correlations for measurements along random axes separated by a fixed angle [2603.08579]. Kent and Pitalúa-García had shown that if \(\phi=\pi/q\), a hemispherical lawn is optimal with retention probability \(1-1/q\). “Globe-hopping” strengthens the picture by proving that for every other \(0<\phi<\pi/2\), hemispherical lawns are **not** optimal [2001.06442].

This destroys the general “hemispherical colouring maximality” hypothesis and replaces it with a more selective statement: hemispheres are optimal only at the discrete angles \(\phi=\pi/q\). In Bell-theoretic terms, this means that the best classical approximation to the quantum singlet is generally realized by more intricate antipodal colourings than hemispheres [2001.06442].

## 5. Symmetry breaking, spherical phase structure, and dimensionality

The 2023 symmetry-breaking analysis recasts the grasshopper functional in \(\mathbb R^N\) as a nonlocal variational problem with isotropic kernel and fixed volume. In two dimensions, the unit-area disk has radius \(R_{0,2}=1/\sqrt{\pi}\), and boundary perturbations of the form
\[
r_{n,\epsilon}(\theta)=R_\epsilon+\epsilon\cos(n\theta)
\]
lead to a second-order stability coefficient
\[
\delta p_n(d)=-\frac{\cos\phi_0-\cos(n\phi_0)}{\sin\phi_0},
\qquad
\phi_0=\cos^{-1}\!\left(1-\frac{d^2}{2R_{0,2}^2}\right).
\]
This identifies explicit unstable Fourier modes of the disk and explains the emergence of cogwheels [2311.05023].

The same paper isolates the dimensional effect through flat-interface perturbations. For plane-wave boundary modes, the quadratic coefficients are
\[
\delta p_k^{(2)}(d)=\frac{1}{2\pi d}\big[\cos(kd)-1\big],\qquad
\delta p_k^{(3)}(d)=\frac{1}{4d}\big[J_0(kd)-1\big].
\]
The two-dimensional coefficient has marginal commensurate modes, while the three-dimensional coefficient is strictly negative for nonzero \(k\). This gives a mechanism for why rotational symmetry is broken in \(2\)D but recovered in \(3\)D for small jumps [2311.05023].

Numerical work on the sphere exhibits an analogous pattern language. A simulated-annealing study found cogwheel colourings for \(0.10\pi\le \theta\le 0.44\pi\), with an odd number of cogs \(n_o\) close to \(2\pi/\theta\); critical solutions with shrinking same-colour domains for \(0.45\pi\le \theta\le 0.55\pi\); and stripe-based solutions for \(\theta\ge 0.55\pi\), with stripe widths scaling with \(\pi-\theta\) near \(\theta=\pi\) [2307.05359]. A later spherical analysis formalized three variants—antipodal complementary lawns, antipodal independent lawns, and non-antipodal complementary lawns—using a geodesic averaging operator \(K_\theta\) diagonalized by spherical harmonics,
\[
K_\theta Y_{\ell m}=P_\ell(\cos\theta)\,Y_{\ell m},
\]
and numerically identified cogwheel, labyrinth, and stripe regimes across these variants [2603.08579].

## 6. Horological usage: the grasshopper escapement problem

In a separate horological literature, “grasshopper problem” refers to the dynamics and attainable precision of the **grasshopper escapement**, John Harrison’s pendulum-driven clock mechanism. The escapement operates at large amplitude, with very low sliding friction, moderate \(Q\), and position-dependent torque that makes the pendulum a self-excited van der Pol–type oscillator [2111.07302].

The clock-dynamical question is how accurately such a device can keep time in the presence of internal mechanical noise. One analysis models the pendulum by
\[
\ddot{\alpha}
=
\frac{-mgL\sin(\alpha)-\gamma\dot{\alpha}+M_E(\alpha)+M_N(t)}{I},
\]
defines the accuracy measure
\[
N=\left(\frac{\bar T}{\sigma_T}\right)^2,
\]
and finds a broad linear relation
\[
N\propto \Delta S
\]
between clock accuracy and entropy production per period, in agreement with corresponding results for nanoscale and quantum clocks [2111.07302]. The same work models torque fluctuations with a Maxwell–Boltzmann-type distribution and reports that the cumulative clock error behaves like a random walk with fractal-like properties, with long-time box-counting dimension tending toward \(D\approx 1.2\) [2111.07302].

A complementary numerical study emphasizes the mechanical source of this robustness. In a simplified constant-torque model, the grasshopper escapement produces a negative escapement error that can cancel the positive circular error of a large-amplitude pendulum, creating a broad minimum in the total rate error as a function of amplitude. This identifies a regime of large amplitude and moderate \(Q\) in which the clock rate is relatively insensitive to drive variations and transient disturbances [2103.14947].

Taken together, these usages show that the grasshopper problem is not a single theorem or model but a family of problems linked by jump dynamics, nonlocal constraints, and optimization. In olympiad combinatorics it is a permutation-avoidance theorem for partial sums; in geometric probability it is a shape-optimization problem with symmetry breaking and Bell-theoretic significance; and in horology it becomes a precision problem for a nonlinear self-excited oscillator [1911.01534], [1705.07621], [2111.07302].

Source: https://www.emergentmind.com/topics/grasshopper-problem