Mathematical Modeling of the Flight of the Starlings. A Particular Case of an Attractor Repeller Pairs

Abstract It presents a mathematical modeling of a biological system, this is a particular case of two fractal sets, an attractor repeller pair, according to the definition given by the Morse-Smalle theory; these are complementary fractal sets, since the complementary of the fractal repeller set is the attractor set, as we can see in the demonstration. The existence of this model in Nature is found in the flight of starlings. This dynamic system works like a beat of a heart, where the movement of the systole is equivalent to the contraction (attractor set) of the flight trajectory of birds and the diastole movement to its expansion (repeller set).The modeling is presented with differential equations written in Matlab code, and several images of the fractal sets associated with the flight pattern of the starlings are generated, so that we can see this model more clearly. We will begin with a definition and its subsequent mathematical demonstration to study this complex system of complementary fractals.


Introduction
The flight of the starlings follows a fractal pattern, the shape is relative to a binary system, in this case an attractor repeller pair. In figure 1 we can a diagram where the blue color represents the attractor and the red color is for the repeller. This diagram represents the phase change of an attractor repeller pair, so we can see the two complementary fractals at the same time.
In this article we will first define the concept attractor repeller pair, with a demonstration we will see that the fractal set called attractor is the complementary set of the repeller, and by means of an algorithm in Matlab code from a differential equations that represent the fractals a mathematical simulation is generated of the flight of the starlings. This work is part of a great original project, a pioneer in this field.. The system of equations that I have found and its corresponding algorithm written in Matlab code, corresponds to several macroscopic systems that are found in Nature. It is relative to the definition of the Conley theory on invariant sets of attractor repeller pair system such as tornadoes, the flight of starlings, schools of fish, solar storms, geyser system and the beating of a heart.
Once these systems have been studied, the invariants will be observed, which does not change when the system is changed and a theorem will be created. This is the first study in a biological system, which by comparison with an atmospheric phenomenon such as tornadoes gives a lot of relevant information.

Materials and Methods
The applied scientific method is the observation of the flight pattern of the starlings, its trajectory corresponds to Universal Journal of Computational Mathematics 7(1): 14-20, 2019 15 chaotic fractals, like the thermodynamics where reality is first observed and then physical laws are written by means of equations, here the applied method is similar, we observe but we check if there is already a mathematical definition of the phenomenon.
In The Morse-Smalle Complex (2005) there is a definition that will be the starting point of this research, binary systems defined as fractal sets attractors-repellers. The important thing of the work is to find them in Nature, and one of these binary systems correspond to the pattern of the flight of the starlings.
First these fractal sets will be defined mathematically, then by means of an algorithm written in Matlab code, mathematical modeling will be carried out, analyzing the images that are generated.

Binary system attractor-repeller pair
The Conley index theory presents a Decompositions of Invariant Sets. A first definition is presented.

The dual repeller of A in S is
The pair (A,R) is called an attractor repeller pair decomposition of S. [1] Remark: The pair (A,R) It is a binary system that is in equilibrium, while the attractor is a convergent set, its complementary the repeller is a divergent set, but together they are a stable system.
We will need other definitions to understand the binary system A-R object of this study. Where γ y (·) denotes the negative gradient flow of (f,g), and one calls W − (p) the unstable and W + (p) the stable manifold of p. [2] Remark:the stable and unstable manifolds where W − (p) corresponds to the attractor because the function is decreasing and W + (p) is the repeller fractal.
The repeller set assembly corresponds to Spiral Source, as a Type of Critical Point, and the attractor set is a Spiral Sink. [3] With these bases we will approach mathematically with a demonstration that will imply the complementarity of the complex system A-R, and its importance for this study.

A definition with a particular demonstration A-R pair
The Conley index theory presents this decomposition of Invariant Sets.
Definition 3. Let S be a compact invariant set. A ⊂ S is an attractor in S if there exists a neighborhood U of A such that

The dual repeller of A in S is
Demo.
Mathematical Modeling of the Flight of the Starlings.
A particular Case of an Attractor Repeller Pairs It is proved that the complement of the repeller assembly is the strange attractor. Being complementary sets form a self-sufficient binary system, which in this case, in the flight of the starlings is analogous to the beat of a heart, to the movement of systole (attractor) and diastole (repeller).

Results
The initial model of the repeller fractal is based on plant growth, in particular is the function that describes how to grow a leaf of a deciduous tree. In polar coordinates we have the following function.
It is a finite 'fractal object', because it has been associated with a natural phenomenon which is born and dies like all living beings. With the origin and its derivative function we will build the two fractals, the attractor-repeller pair. [5] Once we have the equations and the algorithm corresponding to the two complementary fractals, we pass to the writing in Matlab code of said algorithm corresponding to the recursive pattern of the flight of the starlings.

Math modeling. A particular case in a biological system
This is a mathematical modeling in Matlab code.

( r 3 ) = 3 * t h e t a ( r 1 )− t h e t a ( r 2 ) + t h e t a ( r 3 ) ;
%R e p e l l e r 2 a ( r 4 )= −( t h e t a ( r 4 ) . * s i n ( t h e t a ( r 4 ) ) ) ; b ( r 5 ) = c o s ( t h e t a ( r 5 ) ) ; c ( r 6 ) = −3 * ( t h e t a ( r 4 ) + t h e t a ( r 5 )− t h e t a ( r 6 ) ) ; %A t t r a c t o r t ( r 1 ) = − d e l t a ( r 1 ) . * s i n ( d e l t a ( r 1 ) ) ; v ( r 2 ) = c o s ( d e l t a ( r 2 ) ) ; w( r 3 ) = 2 * p i * ( t ( r 1 ) . * v ( r 2 ) ) + ( d e l t a ( r 3 ) ) ; Where the red color represents the repeller and the blue colors are relative to the strange attractors.
We have the binary attractor-repeller system. In the modeling appear two systems, are two attractors and two repellers.

Study of the vortices generated in the binary system
This mathematical study can be completed with the relationship between the behavior of the magnetic field, and the generation points (analogous to the magnetic poles) of the binary system A-R. Although the vortex concept is a model related to fluid mechanics, how this research is strictly mathematical, a correlation with the magnetic field lines has been sought.
A symmetric solutions is in relation to symmetric configurations than correspond to solutions where either x 1 = −x 2 or r 12 = 2. Both cases are simple enough to analyze using Gröbner bases.     When extrapolated this case that the center of vorticity c is at the origin, In a real case that is represented in figure 8. In this case, the two fractal are different sign, the attractor is negative and the repeller is positive in relation to polarity; iff c ∈ [−1, 1[, c is the center of the vortex and in this case there is only one vortex ( figure 8).
In the second case, we have the same polarity, it is the case of two attractors −− or two repellers ++, there are two collinear vortex (figure 7.
There is a complex case we have the 2− vortex pair systems theorem concerning the problem of the four vortices.
Theorem: 4−vortex 1. When m ∈ (−1, 0), the signs of the vorticities in a collinear relative equilibrium must be arranged as + − −+ symmetric case only, or as + − +− or − + −+ when asymmetric solutions exist. Therefore, when m < 0, it is not possible to have a collinear solutions where both pairs of vortices with the same strength are adjacent to each other. [6] These will be the cases where the generating points of the vortices of our A-R even fractals are linked in several fractals, being the collinear or adjacent vortices, symmetrical or asymmetric. But this analysis is so complex that we will leave it for another mathematical study. Simply the existence of this possibility is exposed

Discussion
The dynamics of fluids have not been taken into account for this study, since it is an exclusively mathematical work, based on algebraic topology and fractal geometry. As the fractal models usually only involve attractors, and the concept of repeller is used, we wanted to give a demonstration not only of its existence, but also that a repeller set is the inverse of an attractor set, being faithful to the definition of the Conley index theory.
In spite of this, it has been extended to the study of vortices in correlation with magnetic fields, since they are similar in terms of structure and polarity relations; they also have an implicit correlation because the flight of the starlings responds to geomagnetic navigation.
It is the first time that this phenomenon is studied in a biological system, such as the flight of starlings, it could also be extrapolated to the movement of the fish bank, among other similar systems.
To do this study besides being based on the direct observation of the flight of these birds, I have seen videos that are referenced [6], [7], and has begun by making a diagram that represents the phase of change of the binary attractor-repeller system ( figure 1).
The phase change shown in figure 1 is the best visual evidence of the binary attractor repeller system. To perform the modeling it has been necessary to extract the differential equations of both systems to then perform an algorithm in Matlab code that is the final result, mathematical modeling in Figure 2.
The methodology used can be extrapolated to other systems such as solar storms, the geyser-boiler system or even the beating of a heart.

Conclusions
Benoit Mandelbrot discovered fractal patterns in nature. It is time to go a step further, finding a binary system of complementary fractals that can be extrapolated to the chaotic flight of starlings. In this article we want to explain the logical process by which we arrive at the conclusion that the flight of the starlings correspond to the definition of attractor repeller pairs. This chaotic system appears in equilibrium, since they are complementary and non-contradictory fractal sets.The algorithm in Matlab code generates a modeling that is necessary to understand the system of differential equations that allude to the attractor repeller pair. This is just a mathematical study, fluid dynamics do not intervene in modeling, so this modeling can extrapolated to other particular cases, to other biological systems, such as the movement of fish schools. That the fluid where the fractal trajectory of the carbon unit develops, or be alive, whether air or water does not interfere in the final form, since we are talking about algebraic topology, not classical geometry, the shape can be change but the essence remains.