Optimal hash arrangement of tentacles in jellyfish

At first glance, the trailing tentacles of a jellyfish appear to be randomly arranged. However, close examination of medusae has revealed that the arrangement and developmental order of the tentacles obey a mathematical rule. Here, we show that medusa jellyfish adopt the best strategy to achieve the most uniform distribution of a variable number of tentacles. The observed order of tentacles is a real-world example of an optimal hashing algorithm known as Fibonacci hashing in computer science.

In this equation, the variance σ 2 of the interval angles is defined such that it is independent of N. To signify that σ 2 is determined by the angle α and T, it is denoted as σ 2 (α, T). The smaller the value of σ 2 (α, T), the more evenly the distribution of organs. As the number of organs (T) is not constant but increases as the medusa grows, we regard an average over T of σ 2 (α, T) as the inverse of a fitness function, or regard F −1 as unfitness to be minimised. Weighted summation can be used without affecting the main point (Supplementary Figs S1 and S2). Figure 2a shows the fitness function F(α) for T = 5, 10 and 15. The observed angle of α = 137.5° lies close to the peak of the fitness landscape. The averaging operation in equation (2) plays a role in setting the peak at α = 137.5°. If the number of organs (T) is not variable, the variance σ 2 has the minimum value zero when α is a multiple of 360°/T. Indeed, Fig. 2b shows that σ 2 for T = 5 vanishes at α = 360° × 1/5 = 72° and 360° × 2/5 = 144°. Remarkably enough, the observed order (1, 14, 6, 19, etc.) and the reported irregularity indicate that α is adjusted as accurately as 137.5 ± 2° (Table 1 and Supplementary Fig. S3). This fine-tuning is consistent with the enlarged plot for T = 20 in Fig. 2c. Thus, medusa jellyfish are very finely adapted to make use of the optimal arrangement of organs.
Interestingly, the above result corresponds with a mathematical theorem used for a class of search methods commonly known as hashing techniques in computer programming. In terms of our language, the theorem reads as follows (p. 518 of ref. 6): Theorem S. When the organs are placed at 0, α

the T gaps formed by the T organs have at most three different sizes, where θ
{ } denotes the remainder after the division of θ by 360° (e.g., °=°{380 } 20 ). Moreover, the next organ α T { } will arise in one of the largest gaps. Figure 3 illustrates this theorem for α/N = 137.5°/4 ( Fig. 3a) and α/N = 160°/4 (Fig. 3b). The gaps of a given angle are created and destroyed in a first-in, first-out manner, i.e., a new organ arises in the oldest of the largest gaps. This rule holds true for any value of α. The uniqueness of 137.5° (and its mirror-image equivalent 222.5°) is in that this angle leads to the "most uniformly distributed" gaps 6 in the sense that this ideal angle divides every gap in the ratio of the golden mean 1:1.618. All the other angles will cause a bad break 6 with a division ratio greater than 1:2. In fact, the observed order of organs is simply a real-world example of a hashing algorithm known as Fibonacci hashing, in which collisions of organs are avoided most effectively (Fig. 37 of ref. 6).
Quotation marks are used for the "most uniformly distributed" gaps to allow for an important, exceptional case in which α happens to be a rational number, i.e., a ratio of integers. In this case, the smallest gaps can be zero angles because organs overlap (or collide) when the tentacle number T is larger than the denominator of the rational number α (collision occurs if T > 5 in the case of α = 360° × 2/5 = 144°). For a fixed number of organs, even distribution with a rational number of α is trivially the most uniform distribution (Fig. 2b). Accordingly, the most uniform distribution does not necessarily indicate a 137.5° angle. A variable number of organs is essential for explaining the prevalence of 137.5°. Medusa jellyfish adopt the best strategy to always achieve the most uniform distribution of a variable number of organs that arise one after another.
The purpose of the present article was to provide an evolution-theoretical explanation for the little-known findings of the presence of 137.5° in the order of jellyfish tentacles. The explanation is based on the following plausible assumptions at different biological levels: (i) at the level of organogenesis, an indeterminate number of organs successively arise at constant intervals of angle, and (ii) at the level of organisms, natural selection favours a well-balanced arrangement. As in the discipline of theoretical morphology 7 , the present approach is theoretical in that, to find an optimal arrangement, theoretical possibilities are hypothetically compared with each other. The generality of this approach is both its strength and its weakness. Its weakness is that optimality is not empirically   1-138.5°)  1, 14, 6, 19, 11, 3, 16, 8, 21, 13, 5, 18, 10, 2,  15, 7, 20, 12, 4, 17, 9 testable without preparing a control group with non-optimal arrangement. Its strength is that it is independent of practical details. The first point (i) is a developmental constraint, whereas there are proximate and ultimate factors for (ii). As an ultimate factor, a uniform distribution is most likely to confer a survival advantage for foraging and locomotion of jellyfish for the very reasons directly related to the functional significance of dispersed appendages. From the viewpoint of fluid mechanics, uniform arrangement of tentacles should contribute to the planktonic mode of life of jellyfish as it enhances viscous forces experienced by the body. Thus, to the extent that a plural number of tentacles are functional to the animal, they are utilized most effectively when they are dispersed away from each other. The selective pressure due to this collective factor is operative insofar as their total effect is more than a simple sum of parts, or to the extent that the arrangement of organs matters. Concerning (i) and a proximate factor for (ii), it is instructive to compare with leaf arrangement in plant 5 . The overall processes of growth and formation of lateral organs in a hydra and a plant are strictly comparable 8 . In plant phyllotaxis, the empirical rule that new leaves always arise in the largest gap between those already present is known as Hofmeister's rule 9 . This rule is interpreted as a result of a physical or chemical influence of neighbouring organs 5,8,10,11 . The mutual influence to avoid collision of organs serves as a proximate factor for (ii). In plants, the ultimate cause of collision avoidance should be sought in leaf exposure to light 12 or in the vascular structure of leaves 13 . Optimisation in terms of the fitness in equation (2) has much in common with the concept of geometric mean fitness, which is used as a measure of a long-term survival probability under stochastic environments 14 . It is important that either one of the constraints (i) and (ii), if confirmed, does not lead to 137.5°. The peculiarity of this trait is that it is not optimal for a particular individual at a particular time. The 137.5° angle is the optimal compromise, or "the golden mean", between the conflicting constraints 13 . In this general sense, the evolution of the 137.5° angle in plants and jellyfish is a hitherto unnoticed example of parallel evolution, although the habitat environment and the constraint factors are specifically different in the taxa of different lineages.  Table 1. Bad breaks (with division ratios > 2) will occur unless α = 137.5° (ref. 6).