Algorithm to Determine the Target State of a System and the Best Path to It

In the planning and management they usually decide how to move some object from the state in which it is in a fixed time interval (given, start, or initial state) to another state in a future time interval (desired, target, or planned state). The initial state of the object is known, definite unequivocally and exists. Future states can be many, and they exist only in the form of images, visions and ideas of the plan developers or persons who order the plan. It is assumed that the transition from the initial state to the desired one is possible. There are many possible ways of transition. The task is to choose the best, according to some criterion, a sequence of transition. The algorithm for determining the sequence of transfers of some object from a given state to the desired one I presented in this paper. The algorithm takes into account the presence of different possible transitions from one state to another one and shows a point-multiple mapping of the initial state of an object in the set of its desired states. The sequence of transfers, in which the total expected gain from changing the state of the object in a given period reaches its extreme — maximum or minimum, is found in the process of comparing different variants of transferring this object from one state to another. An example of finding the trajectory of transferring the object from a given state to one of its possible desired states, on which the maximum total expected result is achieved, I gave in this article.

T he most essential components of planning the development of economic entities (whole country's economy, of its administrative-territorial formations, complexes, industries and private spheres of the socio-economic activities, legal and natural persons etc.) is knowledge of the patterns of transition of object from one state to another, and the ability and opportunity to influence the behaviour of the object. The planned state of the object is fixed in the planning tasks and in the indicators of its state in the established time intervals. In a formalised form, knowledge of the regularities of the object's transition from one state to another appears as a transition algorithm 1 .
1 "Algorithm: a finite ordered set of precisely defined rules for solving a particular problem" (National standard, article 7.1.2).
Monitoring of the progress of any decision, including established targets, includes checking the level of implementation and evaluation of performance at different time stages of realisation of decisions. For control the implementation of the decision (plans) and for assessment of the achieved results, it is also useful to have a strict algorithm for transferring the object to the desired state.
According to the methodology of the system approach, objects with which some actions are performed should be considered as systems 2 . In the case of planning, such systems can be 2 Defining a variety of objects as systems, researchers have always recognized that they have the properties of complexity and integrity: "The system is a complete set of interrelated elements" (Sadovsky & Yudin, 1969, p. 12); "A system is an organized complex whole, a set or a combination of objects or parts that form a complex whole" (Johnson, Kast, & Rosenzweig, 1971, p. 26). economic objects and economic entities. By its nature, composition and interrelationships of the constituent elements of the country's economy, its administrative-territorial formations, complexes, industries and spheres of the socio-economic activities, large companies and corporations is consistent with the notion of system: "an organized, purposeful structure that consists of interrelated and interdependent elements (components, entities, factors, members, parts etc.). These elements continually influence one another (directly or indirectly) to maintain their activity and the existence of the system, in order to achieve the goal of the system" 3 .
An algorithm for determining the policy of transferring the system from the specified (given, starting, or initial) state to the best, according to some criterion, future (desired, target, or planned) state is given below. The final state of the system 4 depends both on its initial state and on the means and methods of transferring the system from the initial state to the desired one. Philosophically, the target and initial states of the system differ as ideal and actual. Valid determines the desired, implemented the desired becomes valid. The initial state of the system allows not only to define and formulate the goal but also to work on its achievement: it gives the tools (means) to achieve the goal 5 . "The notions of end and means necessarily presuppose each other. They are the contradictory unity of the desired and the real, the ideal and the material. The development of means leads to the improvement and realisation of the goal, the realisation of the goal requires further improvement and development of means that play a real role in the disclosure and realisation of goals" (Kazantsev, 1972, p. 99). At the same time, the higher the level of development and quality of the system in its initial state, the higher the requirements for the target state of the system can be.
From the above, it follows that the initial and target state of the system must be considered in their mutual relationships. Such systematic consideration, in particular, allows to identify false (in terms of compliance with reality and the laws of its changes) and unattainable in this state of the system goals. You should also not specify the target state of the system only as generated from the outside, the parent system 6 .
Setting the target state of a system begins with an analysis of capabilities of the existing (specified) system and writing probable scenarios of its development 7 .
When writing scripts, ideally imagined the future state of the system is generated by its initial state, assumes it as his ideal projection in the forthcoming interval of time t. Moreover, it is assumed that specific actions will be taken for the movement of the system to one described in scenario states. That is why it is possible to consider scenario writing as a point-multiple mapping (M) of an existing (or any other given) system to the set of its desired states I: where: sis a vector describing the state of the system; O(s) -one of the many desired states of the system: O(s) ϵ I; gvector of parameters of actions carried out to transfer the system from the initial state to the desired one.
Mis a point-multiple mapping, because, depending on the action policy, the system can be moved from its initial state to one of several different states in the future. It means that development is a multivariate issue.
Let J be a set of possible action strategies 8 . Then M(g j , s) → O(g j , s). Here O(g j , s) is one of 6 For the socio-economic system, this provision is confirmed by the conflicts of goals and non-identity of the interests of society, its groups and members, the enterprise and its employees, etc. 7 The term "scenario writing" means a method by which one tries to establish a logical sequence of events and show how the future state of a system can be deployed step by step from the existing state of the system. (Jantsch, 1970, p. 276). 8 The choice of the set J is ultimately determined by the characteristics of the target state and the means available to achieve them. Only those actions that lead to the realization of the goal are taken. the many desired states of the system achieved when actions g j (j = 1, 2, 3,…, m) are performed.
It is clear that the decision to choose a strategy is made by experts. As initial data, they have a description of the initial state of the system, scenarios of its movement (development) and an approximate quantitative assessment of the final desired state in which the system should go. Making decisions (choosing a strategy of action), experts implement their knowledge, experience and information. Since such decisions are taken by the person and depend on his abilities, so far as they are subjective. At the same time, these decisions are partly objective, as they are based on the expert's experience.
Below the author propose one of the possible methods of finding a sequence of desired states, maximising the total expected gain of the system development in a given time interval.
Let a scenario be written for some initial state of the system, and the states, to which the system can go, are defined and described for each time interval t = 1, 2, 3,…, T. Let us denote by i(t) (i(t) = 1, 2, 3,…, L(t)) the index of possible states of the system in the time interval t (I will call it 'a situation index').
Suppose (assumption H1), that all the peculiarities of the historical evolution of the system in the time interval from τ = 0 to τ = t-1 are reflected in the characteristic of its state in the time interval t.
Herewith, the movement of the system in time occurs sequentially (assumption H2): In general case, the development of the system is not deterministic and occurs with some degree of probability. Let us suppose we know the probabilities of the transition of the system from state i(t-1) to state j(t), denote them b i(t-1), j(t+1) . These values are nonnegative, and their sum is one for all j and t: Taken together, they form a transition matrix B i(t-1), j(t) = {b i(t-1), j(t) }, whose element values b i(t-1), j(t) can be determined heuristically or based on expert's estimates. Besides, they may reflect the opinions (decisions) of experts on the transfer of the system in a particular state.
Let us give an example. Assume that k 1 experts of total N experts decide to transfer the system from state i(0) to the first possible state -i(1), k 2 experts about transferring it to the second, the third k 3 , etc., k h in the h-th state (where 1 h j = ∑ k j = N). Then the probabilities of transition from state i(0) to the first, second, etc., the h-th state will be equal to k 1 /N, k 2 /N,…, k h /N.
It is easy to see that is impossible to transfer the system from state i(t-1) to state j(t), the probability of such a transition is zero: This interpretation of probabilities differs from the understanding of probabilities as relative frequencies of occurrence of an event. However, the definition in terms of frequencies does not appear to be the only one 9 . In our case, we are not dealing with relative frequencies, but with decisions about the choice of behaviour. In other words, in our interpretation, the concept of probability is associated not with the relative frequencies of the occurrence of the event, but with particular human behaviour in decisionmaking. With the help of these probabilities, we try to take into account the importance of those characteristics of states. Those qualitative features that are not reflected in the gain function. At the same time, we proceed from the fact that the person making the decision can assess the state as a whole, take into account the whole set of qualitative and quantitative characteristics, commensurate and incommensurable elements, that he does not base his choice only on gain function.
It seems obvious the number of states into which a system can pass, depends on the level of its development, its initial state, the environment in which it is located, and external 9 Mathematical probability theory is a field of mathematics, and we should approach it "like any other branch of mathematics, considering it as an abstract, non-contradictory system of conclusions arising from a small number of axioms. Therefore, taken on its own, the theory of probability has nothing to do with the observed events, and the mathematician does not have to interpret probability in terms of events." (Morris, 1971, p. 52). influences on the system. The higher the level of development of the system, its resistance to external influence, the more multivariate is its development in the future. It is an especially characteristic feature for a developed technical, technological and socio-economic system in the context of rapidly occurring innovation and structural shifts.
According to assumption H1, all the features of the historical development of the system are reflected in the characterisation of the system state in time interval t. Therefore, it seems legitimate to consider the probability of transition of a system in some state only depends on the condition of the system immediately before the transition. Based on this, we assume (hypothesis H3) that the probability of transition from state i(t-1) to state j(t) does not depend on how the system came to state i(t-1) 10 . Then, given the assumption H2, the probability of occurrence of a system at state i in time interval t (denote it by p i(t) ) is calculated by the conditional probability formula: Let qualitatively formulated goal in each state i(t) of the system described in the scenario, the achievement of which is intended to provide the system under consideration, can be approximately characterised by some value r i(t) . The increment of this quantitative characteristic when transferring the system from state i(t-1) to state j(t) is called the payoff function of such a transition (f i(t-1), j(t) ): In terms of content, the gain function can show the benefits (growth rates, profits, utility increments, efficiency gains, cost reductions, increased security, reduced risks, etc.) or cost increments (labour, working time, 10 The process under consideration differs from the homogeneous Markov process only in that the transition probabilities b i(t-1), j(t) depend on time t. financial and material resources, etc.) obtained when a system passed from one state to another.
The expected gain from the transition from state i at time interval t-1 to state j in the next time interval t is calculated as follows: where a(t) -weighting coefficients, a(t) ∈ [0, 1]. Total expected gain during the transition of the system from the initial time (t = 0) in a finite time (T) along the trajectory of (i(1), i(2), i(3), …, i(T)) is given by the expression: The system's states {i*(t)} = (i*(1), i*(2), i*(3), …, i*(T)} on which the value of the total expected gain U reaches its maximum, we call the desired states.
The parameter U(i(1), i(2), i(3), …, i(T)) in the formula (6) is discounted to some point in time the total expected gain in the transition of the system from state i(0) to a state i(1), from a state i(1) to a state i(2), …, from a state i(T-1) to a state i(T).
(15) Then for T we look for such j*(T) that: Then for t = T-1, T-2,…, 4, 3 we find such i*(t-1) that: Indices i*(t) (t = 1, 2,…, T) give us the required trajectory of the system to the desired state.
In the following part of the article, I will give A numerical example of the proposed algorithm.
After determining the sequence of transitions, we should clarify the set of elements of the system. It is then possible to proceed with the preparation of a programme for the transfer of the system to the selected state.
In general, the sequence of actions to make decisions about the transfer of the system from one state to another includes: Analysis of external requirements to the system in question (requirements from a more General system, a higher system, etc.); Qualitative formulation of the purpose and objectives of translation; Definition of a set of elements of the system (its constituent objects, subjects, links) necessary for the implementation of the goals and tasks; Description of the range of opportunities for the development of a system fulfilling the quality objectives (scriptwriting); Select desired state; Quantitative representation of the target; Setting the desired state parameters; Determination of the sequence (mode) of the transfer of the system from the initial state to the desired; Clarification of the set of elements of the system.

An Example of Using the Proposed Algorithm for Determining the Desired State and the Best Path of Transition to It
Consider five-time intervals (T = 5), in each of which the system can be in one of four states. For each of them, the values of the elements of the probability matrix of transition from position i in the time interval t-1 to position j in the time interval t (Table 1) and the values of the elements of the matrix of gain functions in such a transition (Table 2). For simplicity, we assume that there is no discounting of gains (a(t) = 1, ∀ t).
Knowing the probabilities of transition from one state to another, using the formula (3) we find the probabilities of occurrence the system in state i in the time interval t (Table 3).
In the next step, using the expression (5), we calculate the size of the expected gains when moving from one state to another (Table 4). Table 6 shows the transition path that maximises the total expected gain and the values of the latter. In Tables 4 and 5, the corresponding Table 1 Values of the elements of the probability matrix of the system transition from one state to another   Note: the sign X in tables 4 and 5 denotes that the probability of transition from state i(t-1) to state j(t) is zero (see Table 1). values of the parameters u j(t) and e i(t-1), j(t) are shown in boldface. In the example above, there are three trajectories maximising the total expected gain. All of them give the same total expected win equal to 129.732. Accordingly, according to the selected criterion, three states can be called desirable: i(5) = 1, i(5) = 2 and i (5) = 4. To select one of them, you should develop and apply new criteria that are different from the applied gain function.