{'fraction_non_alphanumeric': 0.03769705277587389, 'fraction_numerical': 0.006939684715558602, 'mean_word_length': 4.4016658954187875, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Two formalisms of stochastization of one-step models

To construct realistic mathematical models from the first principles, the authors suggest using the stochastization method. In a number of works different approaches to stochastization of mathematical models were considered. In the end, the whole variety of approaches was reduced to two formalisms: combinatorial (state vectors) and operator (occupation numbers). In the article the authors briefly describe these formalisms with an emphasis on their practical application.


I. INTRODUCTION
The authors' appeal to stochastic differential equations was caused, first of all, by the desire to build mathematical models from the first principles. It turned out that many deterministic models (e.g., population models, network traffic models [1,2]), usually obtained ad-hoc, can be represented as deterministic part of stochastic equations. These stochastic equations, in turn, are obtained from the first principles. In addition, in our opinion, the stochastic approach makes mathematical models more realistic. For example, in the Lotka-Volterra model [3], the atto-fox problem [4] is overcome.
In the combinatorial approach, all operations are performed in the space of states of the system, so we deal with a particular system throughout manipulations with the model. For the operator approach we can abstract from the specific implementation of the system under study. We are working with abstract operators. We return to the state space only at the end of the calculations. In addition, we choose a particular operator algebra on the basis of symmetry of the problem.
To construct stochastic models, we use the apparatus of interaction schemes. Based on the interaction schemes, we have constructed a diagram formalism for the operator approach.
In this article, the authors tried to give the main points of the combinatorial and operator approaches in such a way that they could be easily used in practical problems.
The structure of the article is as follows. In the section II basic notations and conventions are introduced. Then the interaction schemes are presented in the next section III. The combinatorial method of modelling is discussed in the following section IV. The operator model approach is presented in the section V. Application of this technique is described in section VI on the example of Verhulst model.

II. NOTATIONS AND CONVENTIONS
1. The abstract indices notation (see [11]) is used in this work. Under this notation a tensor as a whole object is denoted just as an index (e.g., x i ), components are denoted by underlined index (e.g., x i ).
2. We will adhere to the following agreements. Latin indices from the middle of the alphabet (i, j, k) will be applied to the space of the system state vectors. Latin indices from the beginning of the alphabet (a) will be related to the Wiener process space. Greek indices (α) will set a number of different interactions in kinetic equations.

III. INTERACTION SCHEMES
Schemes of interaction are similar to the schemes of chemical kinetics [12,13], which however have somewhat different semantics.
The system state is defined by the vector ϕ i ∈ R n , where n is system dimension. The operator I i j ∈ N n 0 × N n 0 describes the state of the system before the interaction, the operator F i j ∈ N n 0 × N n 0 describes the state of the system after the interaction. The result of interaction is the system transition from one state to another one: The coefficients k + and k − are the intensities of interaction. There are s types of interaction in our system, so instead of I i j and F i j operators we will use operators I iα the Greek indices specify the number of interactions and the Latin indices correspond to the system order.
Usually, the diagonal operators I and F are used. That is, they can be formally represented as a vector for each reaction. Then the system (1) takes the following form: Here the following notation is used: In the combinatorial approach, the state transition operator is important:

IV. COMBINATORIAL APPROACH
In the combinatorial approach for the system description we will use the master equation, which describes the transition probabilities for Markov process (see [14,15]).
where w(ϕ|ψ, t) is the probability of transition from the state ψ to the state ϕ per unit time. By fixing the initial values of ϕ 1 , t 1 , we can write the equation for subensemble: For the discrete domain of ϕ, the (3) can be written as follows (the states are numbered by n and m): where the p n is the probability of the system to be in a state n at time t, w nm is the probability of transition from the state m into the state n per unit time.
There are two types of system transition from one state to another (based on one-step processes) as a result of system elements interaction: in the forward direction (ϕ i + r iα ) with the probability s + α (ϕ k ) and in the opposite direction (ϕ i − r iα ) with the probability s − α (ϕ k ). The matrix of transition probabilities has the form: where δ i,j is Kronecker delta. Thus, the general form of the master equation for the state vector ϕ i , changing by steps with length r iα , is: In the combinatorial approach we don't use the master equation itself. Instead, we use the Fokker-Planck equation and the Langevin equation.
The Fokker-Planck equation is a special case of the master equation and can be regarded as its approximation. We can get through the expansion of the master equation in a series up to the second order. To do this, one can use the so-called Kramers-Moyal expansion [15].
The Fokker-Planck equation has the following form: The Langevin equation which corresponds to the Fokker-Planck equation: where a i := a i (ϕ k ), b i a := b i a (ϕ k ), ϕ i ∈ R n is the system state vector, W a ∈ R m is the m-dimensional Wiener process. Latin indices from the middle of the alphabet will be applied to the system state vectors (the dimensionality of space is n), and Latin indices from the beginning of the alphabet denote the variables related to the Wiener process vector (the dimensionality of space is m n).
The relation between the equations (6) and (7) is expressed by the following relationships: We will obtain the function s ϕ i ) and to F i α (denoted as A F i α ϕ i ) and defined by: Since the Fokker-Planck equation is a consequence of the expansion of the master equation and by discarding small terms, we will make an appropriate replacement in the equation (9). Namely, combinations of the type ϕ(ϕ − 1) · · · (ϕ − (n − 1)) will be replaced by (ϕ) n : Then for the Fokker-Planck equation (6) we may obtain formulas for the coefficients: Using the relation (8), we may obtain the coefficients for the Langevin equation (7) from the relations (10).

V. OPERATOR APPROACH
The method of application of the second quantization formalism for the non-quantum systems (statistical, deterministic systems) was studied in a series of articles (see [7,[16][17][18]). The Dirac notation is commonly used for occupation numbers representation recording.
The transition to the space of occupation numbers is not a unitary transformation. However, the algorithm of transition can be constructed.
Let's write the master equation (4) in the occupation number representation. We will consider a system that does not depend on the spatial variables. For simplicity, we consider the one-dimensional version.
Let's denote in (4) the probability that there are n particles in our system as ϕ n : The vector space H consists of states of ϕ.
Depending on the structure of the model, we can introduce the probability-based or the moment-based inner products [7]. We introduce a scalar product, exclusive ( | ex ) and inclusive ( | in ). Let |n be the basis vectors.
Here n k are factorial moments: G is generating function:
If the form of scalar product is (11) then from (12) follows that our system is described by the Bose-Einstein statistics.
In the occupation numbers formalism the master equation becomes the Liouville equation: The Liouville operator L satisfies the relation: We will describe our proposed diagram technique for the stochastization of one-step processes. We will write the the scheme of interaction in the form of diagrams. Each scheme (1) or (2) corresponds to a pair of diagrams (see fig. 1 and 2) for forward and backward interaction respectively. The diagram consists of the following elements.
• Incoming lines (in the fig. 1 are denoted by the solid line). These lines are directed to the line of interaction.
These lines are marked with the number and type of interacting entities. You can write a single entity per a line or group them.
• Outgoing lines (in the fig. 1 are denoted by the solid line). These lines are directed from the line of interaction. These lines are marked with the number and type of interacting entities. You can write a single entity per a line or group them.
• Line of interaction (in the fig. 1 is denoted by the dotted line). The direction of time is denoted by the arrow. This line is marked by the coefficient of rate of the interaction.
Iϕ F ϕ Figure 5. Forward interaction, extended notation Figure 6. Backward interaction, extended notation Each line is attributed to a certain factor (depending on the the approach chosen). The resulting expression is obtained by multiplying these factors.
We obtain the Liouville operator when using interaction diagrams in the operator approach. Let us assign the corresponding factor for each line. The resulting term is obtained as the normal ordered product of factors.
We use the following factors for each type of line (Fig. 3.).
• Incoming line. This line corresponds to the disappearance of one entity from the system. Therefore, it corresponds to the annihilation operator a. It is clear that the line with combined capacity I corresponds to the operator a I .
• Outgoing line. This line corresponds to the emergence of one entity in the system. Therefore, it corresponds to the creation operator π. It is clear that the line with combined capacity F corresponds to the operator π F .
• Line of interaction. This line corresponds to the ratio of the interaction rate.
That is, for the diagram 3 we obtain a factor k + π F a I . However, this violates the equation (13). Redressing this, we have to subtract the number of entities that have entered into interaction, multiplied by the rate of the interaction. Then we get a following term of the Liouville operator: To backward interactions ( fig. 4), we use the same rules.
To account for the additional factor of (14) we will use the extended diagrams ( fig. 5 and 6). Here, from the the normal ordered product of the numerators the normal product of the denominators is subtracted.
Thus, the following Liouville operator corresponds to the scheme (1):

VI. VERHULST MODEL
As a demonstration of the method, we will consider the Verhulst model [3,19,20], which describes the limited growth. The attractiveness of this model is that it is one-dimensional and non-linear. Initially, this model was written down as the differential equation: where λ denotes the breeding rate factor, β is the extinction rate factor, γ is the factor of population reduction rate (usually the rivalry of individuals is considered). The same notation as in the original model [19] is used. The interaction scheme for the stochastic version of the model is: The interaction schemes (16) match diagrams 7, 8, and 9. The first relation means that an individual who eats one unit of meal is immediately reproduced, and in the opposite direction is the rivalry between individuals. The second relation describes the death of an individual.