{'fraction_non_alphanumeric': 0.03125984251968504, 'fraction_numerical': 0.005826771653543307, 'mean_word_length': 4.839540229885057, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Features of a numerical characteristics estimation for the execution time of complex series-parallel operations

The object of research in this paper is stochastic multistage systems, the service process in which a set of series-parallel operations with a random duration of service is performed. The subject of the study is the random variable which is the service time of the entire application. The aim is to evaluate the analytical capabilities to accurately assess the characteristics of the studied value. The possibility of analytically obtaining the characteristics of a random variable is investigated, as a result of which a conclusion is made about the usefulness of connecting numerical apparatus. Thus, the features of estimating the numerical characteristics of a random variable describing the duration of a complex of series-parallel operations are analyzed.


Introduction
The process of functioning of complex service systems for the execution of a complex series-parallel operation for the maintenance of the application is investigated. The execution time of each individual operation is a random variable. It is necessary to estimate the duration of service of the entire application. This task belongs to a class of network planning and management (project management) tasks. For tasks with a random duration of work, the PERT (Program Evaluation and Review Technic) method has been developed, which allows not only the execution time of individual operations to be estimated, but also the duration of maintenance of the entire application [1,2,3].
However, studies have shown that estimations of the method do not always take place in real conditions. In this regard, PERT formulas will also have some error. To minimize this error, it is necessary to develop a new analytical tool that allows the numerical characteristics of the desired random variable to be estimated with the highest possible level of accuracy. This paper describes the problem statement; the inaccuracy of estimates of the PERT method is shown experimentally, and this will increase in the presence of several critical paths. The following is a description of the duration of the service, which is the maximum of random variables, each of which represents the total time of work and is set in a certain way. Having described the numerical characteristics of this random variable, we analysed the possibilities for analytically finding the mathematical expectation and variance.

Statement of the problem and its features
A multi-stage system, the input of which receives a stream of applications, is considered. Each application requires the implementation of a set of mutually dependent (series-parallel) operations for its service. Each operation is defined by its duration, which is a random variable, and mutual dependence (a set of previous or subsequent operations). It is required to estimate the numerical characteristics (expectation and variance) of a random variable describing the duration of service of the whole complex of operations.
Let us analyse the features of this problem. In the deterministic case where the execution time of each task is known in advance and unchanged, the value of the maintenance duration can be estimated as follows: Here K is the set of operations forming the critical path; wk is the regular operation belonging to the critical path; tk is the duration of this operation.
In the stochastic case, there is uncertainty associated with the possibility of changing the critical path in the maintenance process. Let us explain this with a simple example. Consider the network graph shown in figure 1. In this figure, the letters denote the operations, and the numbers denote their approximated duration (estimate of mathematical expectation). As can be seen from this figure, the critical path is determined by the operations A, B, and C. However, if, for example, operation C is completed two units earlier, then operations D and E will be critical. Thus, it is impossible to determine in advance either the critical path or the set of operations lying on it.
In addition, the specificity of the duration of operations and their mutual dependence can be such that the problem can have two critical paths. In this case, there are some difficulties associated with estimating the numerical characteristics of the desired random variable.
Let us analyse the most common method of solving this problem, PERT. This method is intended for the formation of service schedules in stochastic systems in interdependent work. Let ξ1,…,ξk be the random variables describing the operations that stand on the critical path. Although all the operations in the system are dependent, it is assumed that the duration of any operation does not affect the duration of other operations. Hence the random variables ξ1,…,ξk are independent. The calculation formulas of PERT for the expectation and variance of the desired duration are as follows: As noted earlier, there may be cases where the network graph will contain two or more critical paths. In this case, the formula (2) will remain suitable for calculating the mathematical expectation (since all critical paths will have the same mathematical expectation). However, the formula for variance will change. In [1], the variance is estimated as the maximum of all variances, each of which will be calculated for its critical path: Here ξ is the desired value; n is the number of critical paths; η1,…, ηn are random variables representing the total duration of all operations in the path 1,…n respectively.

Experimental estimates of service duration
Let us conduct an experiment, the purpose of which is to estimate the duration of service if it is necessary to perform a set of series-parallel operations. At the start of the experiment, the network graph, which is a set of mutually dependent operations, will be submitted. It is assumed that the duration of each operation is distributed according to the law of beta [4]. The rationale for this assumption is presented in [5]. The aim of the experiment is to obtain a sample, each element of which is the duration of the service application (when drawing all random variables describing the duration of individual operations).
Based on this sample, numerical characteristics such as expectation (sample mean) and variance (sample variance) are estimated. The obtained results are compared with the expected analytical results calculated by formulas (2) and (3) (or (4) with equal variances).
The experiment includes many independent experiments, in each of which:  the random variables distributed according to the beta law are simulated, the aim of which is to simulate the performance of operations;  the Xi value is determined, which is the service time of the entire application (the moment of completion of the last operation, taking into account their mutual dependence).
At the end of the test series, the sample mean and the sample variance of random variables Xi are calculated.
Consider the simulation of random variables distributed according to the law of beta in detail. The input of the corresponding subroutine receives the expectation and variance of a random variable. Firstly, the parameters p and q of the beta distribution are determined. The following formulas were obtained in [6]: The second stage consists in obtaining a random variable with the parameters (5) and (6). Provided below, without loss of generality, is a small fragment of the results for the trivial case when the project maintenance is given by a set of two parallel operations. In the case where the expected value of these operations is the same, the results are as shown in Based on the values from this table, it is obvious that the actual mathematical expectation turned out to be significantly higher than planned, while the variance was lower.
Let us consider the result of three parallel operations. Suppose that one of the three random variables has the expected value of 5.5, and the other two -5. According to the PERT method, the expected value of the resulting random variable is 5.5. Let us present a fragment of the results of experiments, which differ in terms of the range of random variables (table. 2). We will conduct an experiment in similar conditions except for the values of the mathematical expectations of random variables. Let now two random variables have mathematical expectation 5.5, and one -5. This will be similar to the case where the network graph has two critical paths. The results are shown in table 3. Compared to the previous case, it can be seen that the actual expectation is increased, and the variance is reduced.
Thus, on the basis of experimental data, fragments of which are presented in tables 1, 2 and 3, the following conclusions can be drawn:  the evaluation of the duration of the service request, proposed by the PERT method, is lower than the actual duration of service;  the variance of the random variable describing the service duration, proposed by the PERT method, is higher than the actual variance;  by increasing the number of critical paths, the expected expectation of a random variable describing the duration increases (as opposed to the PERT method);  by increasing the number of critical paths, the expected variance of the random variable describing the duration decreases (as opposed to the PERT method).
Thus, it is necessary to develop a mathematical apparatus to obtain more accurate estimates compared to the PERT method.

Analytical description of the random variable under study
In this part, an analytical description of a random variable representing the service duration for stochastic systems will be given. To do this, consider all the paths of the network graph (i.e. all the chains that allow you to move from the initial to the final state). Each path will be determined by a variety of operations. Let ξi, i=1,…,n be a random variable that determines the total duration of all work that stands in the way of i. Then the required random variable ξ can be described as follows: Thus, the problem can be formulated as follows. Let there be many random variables. It is necessary to find the expectation and the variance of the random variable, which is given by the formula (7).
Similar problems are considered in [7,8,9]. However, the principal difference of the studied problems, which relate to the theory of extreme values, is the identity of random variables included in the formula (5). The case where each individual random variable has its own distribution interval and its own parameters has not yet been investigated.
Consider a particular problem. Let (8) Random variables are distributed in the intervals [a1, b1] and [a2, b2], respectively. It is necessary to find the expectation and variance of a random variable (8). According to the formulas of probability theory, we obtain [7]: Next, it is necessary to define the maximum function: and divide the integral into components depending on which of the arguments is greater.
Let us proceed to the definition of densities in formulas (9) and (10). Since each random variable ξi, i=1,2, is a set of consecutive operations, it will be determined by the formula: In [13] it was shown that the sum of beta values can be approximated by the beta value. In particular, if random variables 1,…,n have a beta distribution in the intervals [a1, b1], [a2, b2], …, [an, bn] with parameters (p1,q1), (p2,q2), …, (pn,qn) respectively, then the final density will have the form: In [6] the parameters p and q of the given random variable are found, as well as the interval [a,b] in which it is defined. Therefore, we assume that the distribution density of the random variable (11) has an estimation that is accurate to the parameters.
Next, consider the case of n distinct paths. In general, let a random variable  be a function of random variables 1,…, n. We assume on the basis of [13] that each of these random variables has a beta distribution in the interval [ai,bi]. Then its numerical characteristics will be determined as follows   In comparison with formulas (7) and (8), the following difficulties arise in the n-dimensional case:  the function of the module of several arguments becomes much more complicated (from the point of view of integration);  it is obvious that the density function will become more cumbersome. Next, we find the distribution density of the random variable ξ described by the formula (5). Since ξ1,…,ξn are independent, the distribution function of ξ will have the following form: (18) We substitute in the formula (17) the values of the function and density of beta-distribution. The first term is recorded: