The game of plates and olives

The game of plates and olives, introduced by Nicolaescu, begins with an empty table. At each step either an empty plate is put down, an olive is put down on a plate, an olive is removed, an empty plate is removed, or the olives on two plates that both have olives on them are combined on one of the two plates, with the other plate removed. Plates are indistinguishable from one another, as are olives, and there is an inexhaustible supply of each. The game derives from the consideration of Morse functions on the $2$-sphere. Specifically, the number of topological equivalence classes of excellent Morse functions on the $2$-sphere that have order $n$ (that is, that have $2n+2$ critical points) is the same as the number of ways of returning to an empty table for the first time after exactly $2n+2$ steps. We call this number $M_n$. Nicolaescu gave the lower bound $M_n \geq (2n-1)!! = (2/e)^{n+o(n)}n^n$ and speculated that $\log M_n \sim n\log n$. In this note we confirm this speculation, showing that $M_n \leq (4/e)^{n+o(n)}n^n$.


Introduction
The basic aim of Morse theory is to gain knowledge of the topology of a manifold by studying smooth functions on it. For a smooth, compact, oriented manifold X without boundary, an excellent Morse function is a smooth function f : X → R whose critical points (points x ∈ X where the differential of X vanishes) are non-degenerate (the matrix of second partial derivatives is nonsingular), and lie on distinct level sets.
If f has m critical points x 1 , . . . , x m ordered such that f (x 1 ) < . . . < f (x m ), a slicing of f is an increasing sequence a 0 , . . . , a m so that a 0 < f (x 1 ) < a 1 < . . . < a m−1 < f (x m ) < a m . Definition 1.1. Let f and g be excellent Morse functions on X each with m critical points, and let a 0 , . . . , a m and b 0 , . . . , b m be slicings of f and g respectively. Say that f and g are topologically equivalent if for each i ∈ {1, . . . , m} there is an orientation preserving diffeomorphism between the sublevel sets {x ∈ X : f (x) ≤ a i } and {x ∈ X : g(x) ≤ b i }.
On the sphere S 2 an excellent Morse function has 2n + 2 critical points for some n ≥ 0, of which exactly n are saddle points (with the rest being either local minima or local maxima). Motivated by a question of Arnold [1], in [4] Nicoleascu considered the question of the number of topological equivalence classes of excellent Morse functions on the 2-sphere S 2 with n saddle points. Let T 2 n denote this value. He obtained the lower bound T 2 n ≥ (2n − 1)!! = (2/e) n+o(n) n n (1) so that lim inf n→∞ log T 2 n n log n ≥ 1. He later speculated [5] that the lower bound is essentially correct, in that log T 2 n ∼ n log n as n → ∞. The main purpose of this note is to validate this speculation in a strong way.
Theorem 1.2. We have T 2 n ≤ (4/e) n+o(n) n n and so log T 2 n ∼ n log n as n → ∞.
In the rest of the introduction we give some more background on the problem and describe Nicolaescu's game of plates and olives, which turns the problem into a purely combinatorial one. The proof of Theorem 1.2 appears in Section 2, and we conclude with some questions in Section 3.

Background on the geometrical equivalence problem
Motivated by Hilbert's 16th problem calling for a study of the topology of real algebraic varieties, Arnold [1] raised the broad question of the possible structures of excellent Morse functions on various manifolds, and in particular on S n , and the specific enumerative question of how the number of possible structures grows as a function of the number of critical points. A notion of equivalence is needed to make precise sense of the enumerative question. Arnold used the following, which has subsequently obtained the name geometrical equivalence: two excellent Morse functions f and g on X are geometrically equivalent if there are orientation-preserving diffeomorphisms r : X → X and : If f is an excellent Morse function on the circle S 1 then it must have a positive even number, say 2n + 2, of critical points. If these points are at x 1 , . . . , x 2n+2 , read counter-clockwise around the circle starting from the global minimum x 1 , then it must be that x i is a local minimum whenever i is odd and a local maximum whenever i is even. Associate with f a permutation σ f of {1, . . . , 2n + 2} via the rule that when written in one-line notation the ith entry of σ f is the position of f (x i ) when the f (x j )'s are listed from smallest to largest. This permutation has a zig-zag property: entries in even positions are greater than their immediate neighbors, while entries in odd positions are less than their immediate neighbors.
It is evident that two excellent Morse functions on S 1 are geometrically equivalent if they induce the same permutation, and that for every zig-zag permutation σ of {1, . . . , 2n + 2} there is an excellent Morse function f on S 1 with σ f = σ. So the number G 1 n of geometrical equivalence classes of excellent Morse functions on S 1 with 2n + 2 critical points is the same as the number of zig-zag permutations of {1, . . . , 2n + 2}. This combinatorial sequence is well-known, see e.g. [6, A000182], and is closely related to the tangent function. Specifically, the Taylor series of tan x is n≥0 G 1 n x 2n+1 (2n+1)! . It follows that log G 1 n ∼ 2n log n as n → ∞. The sequence (G 1 n ) n≥0 begins (1, 2, 16, 272, 7 936, . . .).
On S 2 , again an excellent Morse function has 2n + 2 critical points for some n ≥ 0, of which exactly n are saddle points. Evidently there is only one equivalence class with no saddle points (a representative example is the latitude function), and there are two classes with one saddle point (four critical points). A representative example of one of these is the height function of a landscape that has a global minimum elevation at the south pole (D), steadily rising elevation to around the north pole, and around the north pole has a two-peaked mountain (peaks A and B) with a saddle point (C) between the peaks. See the picture on the left in Figure 1. To get a representative example of the other class, replace the two-peaked mountain at the north pole with a volcano whose crater is bowl-shaped (lowest point B) and whose rim, viewed as a height function on the circle, has one local maximum (A) and one local minimum (C); the local maximum on the rim is the global maximum on S 2 and the local minimum on the rim is a saddle point on S 2 . See the picture on the right in Figure 1. Figure 1 is reproduced from [1, Figures 1 and 2], where these two landscapes are referred to as the Elbrus mountain and the Vesuvius volcano. Arnold [1] calculated that the sequence (G 2 n ) n≥0 of geometrical equivalence classes of excellent Morse functions on S 2 with n saddle points begins (1, 2, 19, 428, 17 746, . . .) [6, A120420], and speculated that the sequence grows like n 2n . In [3,4] Nicolaescu verified this speculation. He found recurrence relations for G 2 n , and also found that the generating function n≥0 G 2 n x 2n+1 (2n+1)! can be expressed as the inverse of a function defined in terms of an (explicit) elliptic integral (note the similarity to the case of the circle, where we have arctan x = x 0 dt/(1 + t 2 )). By analyzing this integral he concluded that log G 2 n ∼ 2n log n as n → ∞.

Background on the topological equivalence problem
The notion of topological equivalence (see Definition 1.1) was introduced by Nicolaescu in [3] (where he also introduced a notion of homological equivalence, that we do not consider here). For a Morse function f on S 1 with 2n + 2 critical points and a slicing a 0 , . . . , a 2n+2 , the sublevel set {x ≤ a 0 } is empty and {x ≤ a 2n+2 } is all of S 1 . For i ∈ {1, . . . , 2n + 1} the set {x ≤ a i } is a (non-empty) union of intervals, with {x ≤ a 1 } and {x ≤ a 2n+1 } both being a single interval, and for i ∈ {1, 2n} the number of intervals in {x ≤ a i+1 } is either one less than or one greater than the number in {x ≤ a i }. It follows that there is a one-to-one correspondence between equivalence classes and proper Dyck paths of semilength n + 1 -paths from (0, 0) to (2n + 2, 0) taking steps (1, 1) and (1, −1) that do not touch the x-axis except at (0, 0) and (2n + 2, 0). The number of such paths is the nth Catalan number C n = 2n n /(n + 1). The sequence of Catalan numbers begins (1, 1, 2, 5, 14, . . .) [6, A000108] and its growth rate is given by log C n ∼ n log 4 as n → ∞.
On S 2 , Nicolaescu obtained the lower bound (1) on the number T 2 n of topological equivalence classes of excellent Morse functions with n saddle points, and conjectured, via the asymptotic identity (2), that there are many fewer topological than geometrical equivalence classes on S 2 . Theorem 1.2 validates this conjecture.

The game of plates and olives
Our proof of Theorem 1.2 passes through the game of plates and olives, a purely combinatorial approach to the question of topological equivalence of Morse functions on S 2 described in [4].
If a ∈ R is such that there is no critical point x ∈ X with f (x) = a, then in [3] it is shown that the sublevel set {f ≤ a} is either the whole of S 2 or is topologically equivalent to a finite set of disjoint disks (for convenience we refer to these as outer disks), with some of the outer disks perhaps being modified by the removal of a finite set of disjoint disks from the interior (inner disks). As the value a crosses the critical point x 1 , the sublevel set changes from being empty to being a single disk. As it crosses the critical point x 2n+2 (the final critical point) it changes from being a disk to being the whole of S 2 . Crossing each other critical point, the topology of the sublevel set changes in one of the following ways. Either • a new outer disk appears, or • an new inner disk appears in an outer disk, or • an inner disk disappears from an outer disk, or • an outer disk with no inner disks disappears, or • two outer disks, each with some inner disks, merge (and the number of inner disks in the resulting outer disk is the sum of the numbers of inner disks in the two outer disks that merged).
(See [3, Section 3] for a detailed discussion). The evolution of the topology of the sublevel sets, which fully determines the topological equivalence class of f , can thus be encoded by the game of plates and olives, which proceeds as follows. There are inexhaustible supplies of indistinguishable olives and indistinguishable plates. The game begins with an empty table (corresponding to the empty sublevel set, before the first critical value is reached). At each step, one of the following happens. Either • an empty plate is put down (a plate-add or P + move), or • an olive is put down on an existing plate (an olive-add or O + move), or • an olive is removed, necessarily from an existing plate (an olive-remove or O − move), or • an empty plate is removed (a simple plate-remove or P − s move), or • the olives on two plates which both have olives on them are combined on one of the two plates (it doesn't matter which since plates are indistinguishable) with the other (now empty) plate removed (a complex plate-remove or P − c move).
These steps correspond directly to the changes in the topology of the sublevel sets of f as the critical values are crossed. The game ends the first time a step results in a return to an empty table (this corresponds to the final transition of the sublevel sets, from disk to S 2 ). Necessarily a game begins with a P + move and ends with a P − s move. If there are a total of n add moves, not counting the initial P + move, then we refer to n as the length of the game. Note that this necessitates that there are also exactly n remove moves (not counting the final P − s move). We denote by M n the number of games of length n. As discussed earlier, Nicolaescu [3, Section 7] exhibits a bijective correspondence between topological equivalence classes of excellent Morse function on the 2-sphere S 2 with n saddle points, and games of plates and olives of length n, so that T 2 n = M n and we can prove Theorem 1.2 by showing M n ≤ (4/e) n+o(n) . Evidently M 0 = 1 and M 1 = 2. One of the two games of length 1 -the one corresponding to the Vesuvius volcano -consists of two P + moves followed by two P − s moves, and the other -corresponding to the Elbrus mountainconsists of a P + move followed by an O + followed by an O − followed by a P − s . Weingartner [8] has calculated M n for n ≤ 18; the sequence (M n ) n≥0 begins (1, 2, 10, 76, 772, . . .) [6, A295929].
The game of plates and olives can also be viewed as a walk on the set of integer partitions. A configuration in the game can be encoded as a vector a 1 , . . . , a k with a 1 ≥ a 2 . . . ≥ a k > 0, where an entry a j in the vector corresponds to a plate with a j − 1 olives. Such a vector is referred to as a partition of the integer a 1 + . . . + a k . Legitimate moves in the game can easily be encoded as directed edges in a graph whose vertex set consists of all partitions of all positive integers, together with the empty partition ∅ (the unique partition of 0). Evidently M n equals the number of directed walks in this graph from ∅ to itself of length 2n + 2 that do not involve ∅ except at the beginning and end. (The values of M n for n ≤ 18 have been calculated by considering powers of the adjacency matrix of relevant subgraphs of this graph.) We take the opportunity here to correct a slight error in [3], where the lower bound (1) is presented as M n ≥ (2n + 1)!!. If we ignore edges in the directed partition graph that correspond to P − c moves, then the resulting graph is un-directed (in the sense that whenever there is an edge from a to b there is a corresponding edge from b to a), and is in fact the Hasse diagram of the very well studied Young's lattice. It is known (see for example [7]) that there are exactly (2n + 1)!! walks of length 2n + 2 in Young's lattice that start and end at ∅, and it was this observation that led to the lower bound M n ≥ (2n + 1)!! in [3]. This count includes walks that make interim returns to ∅, however, and these do not correspond to legitimate games of plates and olives (or Morse functions). The bound is easily salvaged, though: there are (2n − 1)!! walks of length 2n in Young's lattice that start and end at ∅, and we can correspond to each one a unique walk of length 2n + 2 that starts and ends at ∅ and that does not otherwise involve ∅. We do this by adding the step from ∅ to 1 at the beginning of the walk, adding the step from 1 to ∅ at the end, and extending the partition at all remaining steps by including one new 1. This yields the bound (1). This issue of interim returns to ∅ also accounts for the discrepancy between the values we quote for M 2 , M 3 and M 4 (10, 76 and 772) and those quoted in [3] (15, 107 and 981).

Proof of Theorem 1.2
It will be convenient to refine the notion of an olive-add move: • when an olive is put down on an empty plate we refer to this as a first olive-add or O + f move, and • when an olive is put down on a plate that already has olives on it we refer to this as a later olive-add or O + l move. Let M n be the set of all games of length n. For g ∈ M n the skeleton S(g) of the game is the sequence of length 2n + 2 whose ith term is P + , O + f , O + l , P − s , P − c , O − according to whether at the ith step the move made is plate-add, first olive-add, later olive-add, simple plate-remove, complex plate-remove, or olive-remove. Note that the skeleton begins with P + and ends with P − s .
From S(g) we can read off a number of other parameters that it will be useful to associate with g: • v + f (g), the number of O + f moves in the game g, (we use v for olive to avoid confusion with Landau's o-notation) , which equals both the number of olive-add (first or later) and the number of olive-remove moves, • p − s (g), the number of P − s moves, not counting the (2n + 2)nd (the final) move, • p − c (g), the number of P − c moves, and • p(g) := p − s (g) + p − c (g), which equals both the number of plate-remove (simple or complex) and the number of plate-add moves, not counting the first and the (2n + 2)nd.
We clearly have the relation v(g) + p(g) = n. We also have the following relation, which will be crucial later: . Indeed, each plate removed in a complex plate-remove move must at least once have had an olive placed on it while it was empty.
Our intuition is that there should not be too many games that involve many P − s moves -once we have decided to make a P − s move, there is a unique choice for the specific move, so P − s moves are not "costly". Similarly there should not be too many games that involve many O + f moves, and hence (by Observation 2.1) not too many that involve many P − c moves. After verifying this intuition we are able to focus attention on games in which the number of plates involved is relatively small; we will put an upper bound on the number of such games by translating the problem to a classical one of enumerating weighted Dyck paths.
We will initially put an upper bound on M n by bounding, for each possible skeleton S, the number of games that can have that skeleton. The key observation is the following. Suppose that at some moment there are exactly t olives on the table. Encode the state of the game by a vector (a 0 , a 1 , a 2 , . . .) where a i is the number of plates that have exactly i olives on them. Let w(t) be the largest integer t such that t (t − 1)/2 ≤ t. Then we claim that |{i : a i = 0}| ≤ w(t). (3) Indeed, if |{i : a i = 0}| = then the number of olives on the table has to be at least 0 + 1 + . . . + ( − 1) = ( − 1) 2 (to obtain |{i : a i = 0}| = with as few olives as possible one needs one plate with i olives, for each i ∈ {0, . . . , − 1}). If > w(t) then by the definition of w(t) this requires more than t olives.
Using the indistinguishability of plates and of olives, (3) allows us to put an upper bound on the number of possible moves of various types that can happen at any particular moment, as a function of t and w(t). For the fourth point note that in this case we have to choose two plates with some olives on them.
The difference between w(t) and w(t)−1 in the third point is asymptotically inconsequential but will be computationally helpful later. In the fourth point, since the order of the plates does not matter we could replace w 2 (t) with w 2 (t)/2, but this gains us nothing substantial.
We have w(t) ∼ √ 2t as t → ∞ and so w(t) ≤ √ 3t for all sufficiently large t. Since for any game in M n there can be at most n olives on the table at any given moment, we have the following crude estimates as a corollary of Claim 2.2: Corollary 2.3. For all sufficiently large n, at any moment • at most 1 P + , P − s or O + f moves, and • at most 3n P − c moves.
Using Corollary 2.3 we can quickly establish an upper bound of the form M n ≤ C n n n (so that indeed log M n ∼ n log n, as speculated by Nicolaescu [5]). Of remaining 2n − 2v + 2 steps, the first and last are forced, as are the n − v P + steps, while on the n − v remaining P − s or P − c steps there are at most (3n) n−v = 3 n−v n n−v choices for the particular moves that are made. This means that each possible skeleton can be the skeleton of at most 3 n n n games, and so M n ≤ 108 n n n .
To reduce the constant C from 108 to 4/e, we have to work harder. We begin by counting the games in which p − s + p − c ≥ 16n/ log n. The goal is to show that there are relatively few games with this property, by obtaining an upper bound of the form C n n n for the number of such games, with C < 2/e (so that this upper bound is smaller than the lower bound on M n from (1)). We will argue that we can reduce the bound of Claim 2.4 by (3n) p − s by using that there is only one option for a P − s move, rather than at most 3n, and we can reduce the bound also by ( c by using that there is only one option for an O + f move, rather than at most √ 3n. If p − s + p − c is suitably large, this reduces the count to below (2/e) n n n .
There are at most (n + 1) 2 choices for the pair (p − s , p − c ) in the regime p − s + p − c ≥ 16n/ log n, and for each such pair there are again at most 36 n skeletons. For a given skeleton • there is 1 way to specify the move made at each of the p − s + p − c + 1 steps labelled P + (the +1 here is included for the first step of the game, a P + move), steps (1, 1) and (1, −1) that stays on or above the x-axis). The association is made by taking a (1, 1) step each time an O + move is made and a (1, −1) step each time an O − move is made. We refer to this as the underlying olive Dyck path OD(g) of the game.
We begin by fixing a p ≤ 16n/ log n (there are at most 16n/ log n + 1 = 2 o(n) options for p). Next we select a Dyck path OD of semilength v := n − p to be the underlying olive Dyck path of the game. There are ways to extend this underlying olive Dyck path to a skeleton. The 2n 2v accounts for locating where in the 2n internal steps of the skeleton (those that are not the first or the last) the 2v steps labelled O + and O − are located, and the 2 2p accounts for deciding which among the remaining 2p internal steps are labelled P + and which P − . In the second equality, we use the symmetry of binomial coefficients. In the asymptotic estimate we use the basic bound n k ≤ (n/k) k along with p ≤ 16n/ log n.
To count at most how many games can have a particular skeleton we now use the more precise Claim 2.2 rather than the cruder Corollary 2.3. There is 1 way to specify which P + move happens at each step labelled P + in the skeleton, and at most 3n ways to specify which P − move happens at each step labelled P − , so there are a total of at most (3n) p = 2 o(n) n p ways to specify which P + , P − moves happen in the game.
We now turn to specifying the O + and O − moves. At a step labelled O + that is at height t in OD (height measured by the y co-ordinate of the lower end of the step in the path; so the height is equal to the number of olives that are on the table at that moment), there are at most w(t) ways to specify which O + move happens. At a step labelled O − that is at height t in OD, there are t + 1 olives on the table, and so there are at most w(t + 1) − 1 ways to specify which O − move happens.
It is straightforward to pair up steps labelled O + and O − in OD, with paired steps having the same height. On such a pair at height t, the number of ways of specifying which moves happen is at most w(t)(w(t + 1) − 1) ≤ w(t + 1)(w(t + 1) − 1) ≤ 2(t + 1) It is well-known (see for example [2, Section 2.6]) that the sum in (5) evaluates exactly to (2(n − p) − 1)!!, so that the number of games g with p(g) = p ≤ 16n/ log n is at most 2 n+o(n) n p 2 e n−p+o(n−p) (n − p) n−p = 4 e n+o(n) n n .
Given that there at most 2 o(n) choices for p and combining with (4) this completes the proof of Theorem 1.2.

Questions
Together (1)  Both the upper and lower bounds seem to leave room for improvementthe lower bound because it ignores P − c moves and the upper bound because it uses a worst-case bound √ 2m on the number of distinct parts in a partition of the integer m, whereas (as shown by Wilf [9]) the typical partition has only (1 + o(1)) √ 6m/π distinct parts. A calculation of M n for n ≤ 18 [8] shows that (1/n) n √ M n is decreasing in this range with (1/18) 18 √ M 18 ≈ 1.09206 < 4/e, providing further evidence that the upper bound is not tight, as well as providing evidence that the limit in Question 3.1 does exist.
The study of geometrical and topological equivalence classes of Morse functions on S 1 and S 2 leads naturally to three well-studied combinatorial structures -zig-zag permutations, Dyck paths and Young's lattice -and it would be of interest to see what structures emerge when the same problems are tackled on S n for n ≥ 3, or on other manifolds, such as the torus.