THE EMERGENCY SIMULATION WITH THE HELP OF FOUR-LAYER HIDDEN MARKOV MODEL

The object of research is the process of selecting a synergistically determined pair for the elements of complex systems in the design, manufacture or repair. One of the most problematic places in the selection is the need to numerically evaluate the result of combining the elements, taking into account the explicit, additive properties of elements and hidden manifestations of the pair that are unusual for the elements alone (emergence). Lack of accounting for emergence can significantly distort the apparent picture of the processes taking place in systems, which makes many existing models of such processes inadequate. During the research, methods of extracting information from arrays known, hidden for direct observation were used. In particular, four-layer hidden Markov models with an additional hidden layer were used. The models were trained by the Baum-Welch method, adapted to work with an additional layer. As training samples used data obtained as a result of statistical processing of information available for object monitoring, expert assessments, as well as data obtained in the world's computer networks. The test of the method and model on real medical and technical objects confirms their clinical and technical effectiveness. In particular, thanks to this in the medical industry: in the medical industry, the incidence of thromboembolism of the branches of the pulmonary artery and deep veins of the thigh and lower leg are decreased by 65 %; frequency of postoperative bleeding is decreased by 43 %; by 36 % the total number of drug-related medicines aimed at correcting the blood coagulation system is decreased. In the technical field, the test results confirm the increase in the service life of rubber-metal shock absorbers by 14.5 %. This is due to the fact that the proposed method has a number of features, in particular, for the first time in its evaluation of emergence a four-layer hidden Markov model is used. The results obtained in the work make it possible to propose a general scheme of an intellectual decision support system in the selection of a synergistically determined pair of elements for complex systems of various purposes.


Introduction
In many applications of human activity, there are situations when to some object it is necessary to select a pair from a finite set of homogeneous objects. Selection should be performed by selecting the nearest element of this set according to a given set of characteristics.
If the characteristics are uniquely measurable or calculated, the recognition is trivial. If at least one characteristic is stochastic or indistinct, then the problem is unsolvable without the use of artificial intelligence technologies, using methods of identifying knowledge in conditions of uncertainty.
The most difficult is the requirement to take into account not only the total systemic effect of using two or more elements. In this case, the person making the decision about the choice can face the so-called synergistic effect or its consequence -emergence, the effect of which can block all the benefits from the combination of these two elements in the system. The most convincing example of this phenomenon is the unexpected sharp negative side effect from the additional prescription of some separate «innocent» drugs to some patient. From this follows the urgent need not just to pick up a couple, longing for the obvious characteristics (there is not enough heat release from 30 kg of uranium-235, -take 60 kg!), but also a careful analysis of the various hidden circumstances of this association, so as not to run into an atomic explosion (critical mass 235U -50 kg).
Thus, the task of pair matching is simultaneously tasks of image recognition and optimization problems, since the image is sought in some sense the best!

The object of research and its technological audit
The object of research is the process of choosing a synergetically conditioned pair for the initially specified element of a complex system.
Technological audit is a way to diagnose the innovative attractiveness of the proposed theoretical and practical solutions in the field of complex systems with binary elements.

ISSN 2226-3780
And it allows to receive the characteristic of innovative potential at creation of new and reconstruction of existing information technologies of support of the decision of practical problems in this area.
Conducting a technological audit provides an opportunity to formulate a strategy for making profits based on the results of innovation at the previous stages -planning and designing future benefits. It is assumed that the developer uses the results of innovative activity directly in the process of designing technical facilities or planning medical intervention, applying new methods in many sectors of the national economy and social sphere.
As a result of the performed technological audit in the medical (prescription of a pair of drugs) and technical (selection of a pair of shock absorbers) areas it is revealed that existing models of interaction of elements of complex systems can't be considered adequate. After all, they do not provide an opportunity to take into account the phenomenon of emergence as an additional effect of their interaction. Further progress in these areas is possible only in the case of creating new models that can not only detect such emergence, but also evaluate it numerically.
The invariance of such models with respect to the object-object's elements-emergence of elements' interactions allows us to assert that such an approach will be relevant in many other spheres of human activity.

The aim and objectives of research
The aim of research is creation of intelligent decision support system for selection of available synergistically resulting pairs in the system of the existing elements, the optimum in terms of parameters of the system as a whole. Creation and implementation of DSS use the method of evaluation and ranking system effects (emergence) of combination of pairs of elements in an uncertain environment, built on the four-layer hidden Markov models.
To achieve this aim, it is necessary to solve the following tasks.
1. To develop a method of supporting the decisionmaking on the application of one of the elements-applicants in a pair to the already existing element of the system.
2. To develop an emergence model based on a fourlayer hidden Markov model.
3. To carry out practical tests of the research results and evaluate their technical and social effect.

Research of existing solutions of the problem
Among the main directions of elimination of these problems, identified in the resources of the world scientific periodicals, the following can be singled out: 1) identification of the direct use of pairs of elements in complex systems that work together and generate synergistic effects with undesirable emergence [1][2][3][4][5]; 2) application of methods and means of fuzzy modeling and multi-criteria choice in intellectual decision support systems [6][7][8]; 3) application of methods for creating and recognizing visual images as an intermediate representation of the state of the structure of complex systems [9][10][11][12][13][14]; 4) application of intelligent Data Mining methods, in particular neural networks or hidden Markov models [15][16][17][18][19].
Let's consider these directions in more detail. 1. As mentioned above, in almost all objects of any sphere of human activity, it is almost always possible to find paired elements that, when designing or repairing (reconstructing) the object, it is desirable to carefully select according to certain characteristics, in order to prevent further negative effect and to provide great harm to the object as a whole. It is possible to imagine the opposite task: to select couples so that the additional positive effect of their joint work was maximum. It is assumed that the selected pair of objects will continue to «work» together. Examples of such pairs include paired elements of computers and their accessories [1], radio stereo systems [2], metrological devices [3] -in technology, rhymed lines [4] in poetry, crews of space expeditions [5] -in psychology and many other.
2. Existing methods for processing arrays of fuzzy numbers [6] are not designed to handle hidden subsets of the latter. In addition, there are many problems and methods for solving them, when pairs of fuzzy numbers can't be varied separately [7]. In these problems, it is necessary to find pairs of numbers that are closest to a given number, and evaluate each number separately in a pair -the closer, the better. Such formulation does not give rise to a model suitable for estimating the emergence of pairs. They do not approach the solution of the problems of choosing synergistically determined pairs and the methods proposed in [8] for searching for fuzzy repetitions when organizing the reuse of items that are stored.
3. There are many methods designed to search for nearby elements in image arrays (or within a single image) [9]. But for this, the complex system, which is considered in the work, must first be converted to a visual image [10]. In addition, the methods of creating and recognizing visual images as an intermediate display of the state of the structure of complex systems [11] are computationally complex and require powerful computers and a lot of time [12]. The role of this negative factor increases significantly when processing multi-threaded hidden Markov models wor king in complex complexes [13]. Do not solve the problem of «mining» hidden information and numerous methods for recognizing texts, even if they use hidden Markov models [14]. 4. The application of the existing ata Mining intellectual methods will be considered using the example of constructing hidden three-layer Markov models of some system Ω of the form λ 3 = {π, А, В} [15] (Fig. 1).
As can be seen in Fig. 1, the model consists of three layers: 1) layer of the initial elements; 2) layer of elements-applicants in a pair to the original; 3) layer of external manifestations of the system to the combined effect of the initial element from layer No. 1 and the selected element from layer No. 2.
Thus, such «classical» Hidden Markov Model will be called a three-layer model and will be denoted as HMM-3. The initial element Q k is determined by the corresponding possible set of these elements Q and the matrix π, which contains the probabilities of election as the original specific element Q k from the set Q.
The need for matrices A and B follows from the fact that the «classical» hidden Markov models are represented as the result of two random processes: with an intermediate implicit S and a final explicit C output [16,17].

ISSN 2226-3780
So the matrix A reflects the subject area and answers the question, what is the probability of the object's transition being modeled with the help of HMM-3, from the initial to the hidden state [18,19]. If the subject areadrugs and the patient, they accept, then the matrix A is the probability of assigning to the source drugs (from the set Q) second drugs from the set of applicants S. Of course, the initial value of this matrix (without regard for emergence) depends on many factors: the availability of drugs, their cost, delivery time, the psychological state of the patient, the time elapsed since the last tests, the doctor's commitment, and the like.
Matrix B is in fact the answer to the question, how will such compound of drugs react? Of course, the importance of the elements of this matrix depends to a great extent precisely on the patient, which in many cases turns out to be unpredictable.
The more patients took part in the evaluation of the effect of such treatment, that is, the better the statistics in the basis of training HMM-3, the more accurate the model.
An important disadvantage of HMM-3 from the point of view of emergence modeling is that in HMM-3 there is only one hidden layer -layer No. 2, and in the object with the emergence of such conditional layers, at least two. After all, except for a layer of elements-applicants in a couple of the original, it is also necessary to have a layer of actual emergence.
The latter, first, hidden from external observation, and, secondly, it can take different, are unknown in advance neither in content nor in value of the form for which it is necessary to expand HMM-3 to HMM-4 and create an additional layer of emergence.

Methods of research
The basis for creating a method for supporting decision-making on the application of a pair of elements is the theory of determining the hidden parameters of the state of complex systems under uncertainty.To develop this method, let's use the theo ry of statistical Markov models in which the system is mo deled, is regarded as a Markov process with unobserved (hidden) states.
To test the adequacy of the methods, as well as the accuracy and reliability of the models, the laboratory and practical bases of the Center for Reconstructive and Rehabilitation Medicine (University Clinic) of the Odessa National Medical University (ONMU) and JSC «Odessa Factory of Rubber Technical Products» (Ukraine) are used.

Research results
6.1. The decision support method for applying one of the applicant elements to a pair of already existing system elements. Let's define the terms used in the work. Let's start with a phenomenon like «synergy» [20].This is the effect of interaction of two or more factors, characteri zed by the fact that it significantly exceeds the simple sum of the actions of each of these factors separately (the phenomenon of «emergence» -the presence in any system of special properties that are not inherent in its elements) (Fig. 2). For example, synergy in medicine is understood as the combined action of medicinal substances on the body, in which the total effect exceeds (this is the emergence) the action exerted by each component separately.
If the way to assess the emergence of various effects numerically, then these manifestations can be compared and even ranked, giving the user the opportunity to choose the «best» emergence at its own discretion. So, the «best emergence» is availability in any system: the largest (least) number of special properties that are not inherent in its elements. Let's note that in numerical ranking, the positive and negative from the point of view of the influence on the system, emergence can be brought in one line by changing the sign of the «negative» emergence to the opposite or vice versa.
Synergistically conditioned pairs are such messages of individual elements that in this combination demonstrate a «better» emergence among a finite set of other pairs in which the first elements are identical and the second ones are different. Belonging to SCP in the method under investigation is the basis for the advantage of such pair over all others in making the choice of the second element. Now let's consider the following problem of choosing a synergetically conditioned pair for an element using artificial intelligence methods and parameters of the «best» emergence (Fig. 3).
Let there be some object and a description of its system properties (structure, parameters of elements and connections between them, the influence of the latter on the system as a whole, interaction with the environment, etc.). There is also a finite set of other elements with corresponding descriptions that are not relevant to the system.
Let also one of the elements of the system fail (one of the shock absorbers is destroyed) or does not fulfill its function in the system (drugs against high blood pressure do not provide complete normalization of the latter).
In this case, there may be a problem of replacing it or adding to it a synergistically conditioned pair of related elements (for example, using additional drugs simultaneously with those already taken). The problem is solved by a complete search (on a computer model!) All pairs of drugs that are formed if in the initial add one by one of the drugs from the set of drug candidates and analyze these pairs for the emergence value (Fig. 3). Further constructed according to this principle, the DSS transfers a ranked series of emergence to the Person (in the example under study it is a physician), which takes the final decision on the course of further treatment.
In Fig. 3 AI is any of the models of artificial intelligence that is capable of performing Data Mining -that is, «extracting» knowledge from unordered sets of information. Examples of such models can be neural networks or hidden Markov models [17]. It is clear that any intellectual model must first be taught to make estimates on examples of interaction with a real object, for example, a specific patient or a group of patients. Such training samples are invaluable property of each DSS because they can be associated with personal tragedies of previous patients who were treated without taking into account the synergistic effects of drug pairs.
In this paper, this method is used to estimate and compare the emergence. Let's suppose that it is possible to create images (models) of pairs of elements and analyze the result of their compatibility at the level of these images. Then the intelligent DSS selects the «best» image elements and presents them to the Person, makes the final decision on the selected pair. Let's look for a parameter for estimating the effect of using a pair of elements in the form of a cumulative number that, by analogy with complex numbers, consists of two incompatible mathematically parts: clear and fuzzy (Fig. 4). Next, let's build a completely ordered set of digital numbers -that is, a linearly ordered set in which for each nonempty subset there is a least element in accordance with the user-defined order. Since in the general case both parts consist of some sets of numbers, therefore, each of them must be reduced to one number by any convolution.
To do this, the user must select the axiom of combining all clear and separately fuzzy parameters of each pair to one number, these are user settings.
In the paper, the axiom of a union is as follows. First, the ranking of all pairs of elements is performed, and the size of clear parts is analyzed.
Further, from the rank of the series, those pairs are withdrawn, in which the removal criteria calculated from the fuzzy part data exceed a certain threshold (it is also a user setting  Fig. 3. Scheme to the problem of choosing a synergetically conditioned pair to an element of the system using artificial intelligence methods and parameters of the «best» emergence (AI -artificial intelligence system)

ISSN 2226-3780
The method of supporting the adoption of synergetically determines decisions on the choice of a pair of elements for a certain system uses various data sources that do not «lie on the surface»: modeling, experiments, expert assessments, and the like. Some data may reflect the active resistance of the patient or his relatives in the use of certain drugs [21].
6.2. Modeling of emergence using a four-layer hidden Markov model. The four-layered Hidden Markov Model in our case is a combined reflection of such entities: -object (complex system) Ω as a whole; -set of elements of Q, which can claim to hit the spaces of the initial elements; the cardinality of the set of Q -K elements; -set of elements-applicants S for a union with elements from the set Q, the cardinality of the set S -K × N elements; -set of elements-emergence E, which can arise (or may not!) as a synergetic effect on conjugation over one of the elements of the sets Q and S; the cardinality of the set E -K × N × R elements; -set C of the reactions of the object Ω to the application to it (in it) of a pair of one of the elements of the sets Q and S; the cardinality of the set C -K × N × R × M elements. For modeling and numerical estimation of the emergence phenomenon, there is a four-layered Hidden Markov Model of the form λ 4 = {π, A, E, B}.
The assignment of the matrices π, A, E and B, which includes the λ 4 models, as well as examples of their mapping to specific parameters of the medical industry, are given in Table 1.
The task of training HMM-4 parameters is in finding, for a given sequence of outputs or a set of such sequences, a better set of transition probabilities for states and outputs. This task usually consists in deriving the maximum likelihood estimate of these HMM-4 parameters for a given set of output sequences. In this article, the well-known Baum-Welch algorithm is used [17].  Table 1 The purpose of the matrices and an example of the reflection of HMM-4 parameters on the subject areadetermination of the «best» drug pair in medicine HMM-4 PARAMETERS MEDICAL EXAMPLE π {π 1 , π 2 , ..., π K } -the probability matrix for the presence of one of the K elements in the initial HMM layer Drugs that are already used in treatment, but their therapeutic effect is insufficient S(π, n) -elements-applicants for the union with elements from the set π; n = 1, …, N π N π of new drugs-applicants for addition to the initial treatment pair A π -probability matrix of the union of the initial element with one of the elements of the set S(π, n) Determined in HMM training Е (π, n) -emergencies that can arise when the initial element is combined with one of the elements of the set S (π, n) Unavailable for observation (latent) change in the characteristics of the patient's condition when taking a pair of drugs from the set S (π, n) E π, A -probability matrix for the emergence of emergence when the initial element is combined with one of the elements in the set S(π, n) The results obtained in the work make it possible to propose a general scheme of intellectual decision support system for choosing a synergistically determined pair of elements for complex systems for various purposes: in medicine, «SUPREMED» and in the «SUTEDECH» technique (Fig. 6).
In the Center of Reconstructive and Rehabilitation Medicine (University Clinic), ONMU tested the intellectual system SUPREMED supporting the adoption of synergistically determined drug prescribing decisions, which provides the user with a ranked range of medications allowed for use. The «SUPREMED» system is used to determine the optimal combinations and dosages of drugs aimed at correcting the state of the coagulating blood system in patients in the postoperative period in the departments of anesthesiology and intensive care and surgery. The tests of the «SUPREMED» system show that its use allowed achieving such clinical results: -by 65 % (2.3 times compared with the control group), the incidence of thromboembolism of the branches of the pulmonary arteries and deep veins of the thigh and lower leg are decreased; -by 43 % (1.8 times), the frequency of postoperative bleeding is decreased; -by 36 % (1.6 times), the total number of drug-related medicines aimed at correcting the blood coagulation system is decreased.
In JSC «Odessa Factory of Rubber Technical Products» tests of the intelligent system «SUTEDECH» were carried out supporting the adoption of synergetically determined solutions in the selection of a pair that provides the user with a range of permissible for use combinations of rubber shock absorbers of the same brand. The system «SUTEDECH» was involved in the selection of pairs of shock absorbers of the brand AKSS-300M (Ukraine), which were tested for joint operation under rated load conditions. The tests of the SUTEDECH system show that its use allowed achieving such technical results: the service life increased by 14.5 %.
The aim is increasing the proportion of a successful (from the point of view of the system as a whole) recognition (selection) of a synergistically conditioned pair of elements when adding or replacing the latter

SWOT analysis of research results
Strengths. The main positive influence of the research object on its internal factors is the opportunity created by it to predict the course of concealed emergence and thereby prevent complications from the unsuccessful choice of the pair. This allows to significantly improve the efficiency of the DSS in general, in particular, using the results of the research in the medical industry.
Weaknesses. The main negative influence of the object of research on its internal factors is the need for a very careful approach to the selection of a training sample. After an additional layer of HMM-4 after multiplication of probabilities makes the statistical result of each element of the observed matrix B insignificant, and therefore not obvious for selection as optimal.
Opportunities. Opportunities for further research in this area are related both to the development of the theoretical framework for improving the structure of hidden Markov models, and to the improvement of methods and tools for their training.
Threats. As in any case, the main threats to this activity stem from the rate of change of the states of complex systems not only from the chosen solution, but also from many other factors that are not taken into account by either the model or the DSS as a whole. Previously, four-layer hidden Markov models for emergent modeling were not used. Therefore, there are no complete analogues of the proposed models and methods in world practice.

Conclusions
1. A method has been developed to support the decision-making on the selection of one of the applicant elements in a pair to an already existing element of the system. The method differs in that the main parameter of the choice preference is the cumulative number consisting of the basic, «passport» joint action of the elements and with emergence, which in this case arises.
2. An emergent model based on a four-layer hidden Markov model is developed. The model differs in that it contains an additional fourth (second hidden) layer, which in turn consists of a variety of emergence, arising from the synergetic influence on the system as a whole of individual pairs of its individual elements, and the probability matrix of such occurrence.
3. Practical tests of the research results are performed. The following test results are obtained: -in the medical industry, the incidence of thromboembolism of the branches of the pulmonary artery and deep veins of the thigh and lower leg are decreased by 65 %; -frequency of postoperative bleeding is decreased by 43 %; -by 36 % the total number of drug-related medicines aimed at correcting the blood coagulation system is decreased; -in the technical field, the lifetime of rubber-metal shock absorbers is increased by 14.5 %.