Full Text
Cybernetics and Control Theory
S. N. Razumovskii
On the Transformation of Programs for Solving Complex Logical Problems to an Optimal Form
(Presented by Academician A. I. Berg, 18 X 1960)
In solving large logical problems on computing machines, complex programs are used that provide for the analysis of the logical relations characteristic of the problem being solved, and for the choice of a solution path depending on the results of this analysis. The complexity of these programs and the laboriousness of composing them are such that they require the automation of programming. However, an analysis of existing programs, including programs composed by automatic means, shows that they are not optimal in the sense of the most efficient use of the possibilities for obtaining information from the logical conditions of the problem.
One may attempt to transform the structure of the problem in such a way as to increase the amount of information obtained from the logical functions. The transformations may consist in the rational analysis or synthesis of logical functions, in changing their order, and so on.
Below we give considerations on transforming the structure of problems to a certain more efficient form.
- We shall assume that the initial information about a logical problem is given in the form of a scheme \(\Sigma\), divided into acts of certain standard types. We shall distinguish two types of acts: logical and resulting.
Let \(n\) logical functions be given, constituting the content of the corresponding logical acts
\[ A_1, A_2, \ldots, A_n \tag{1} \]
and \(m\) resulting acts
\[ R_1, R_2, \ldots, R_m. \tag{2} \]
Consider the set \(\Xi\), whose elements \(\xi\) are all possible conjunctions of the initial functions \(A\) and their negations, with identically false conjunctions excluded from among the elements. Each element \(\xi\) uniquely determines that set of values of the logical functions \(A\) composing it which corresponds to the truth of the function \(\xi\).
The specification of the scheme \(\Sigma\) establishes a one-to-one correspondence between the elements of the set \(\Xi\) and the resulting acts: the element \(\xi_{jk}\) corresponds to the act \(R_k\) if, as a result of carrying out the scheme, we arrive at the act \(R_k\) when the function \(\xi_{jk}\) is true. Thus, specifying a scheme over the system of functions \(A\) determines a subset \(\Theta\) of the set \(\Xi\), including those and only those elements \(\xi\) to which resulting acts correspond; we shall denote the elements of the set \(\Theta\) by \(\vartheta\). Define the function \(\Phi_k\) as the disjunction of the functions \(\vartheta\) corresponding to one and the same act \(R_k\), and call it the logical function of the given resulting act.
Between the logical functions \(\Phi_k\) and the resultant acts \(R_k\) there exists a one-to-one correspondence: the function \(\Phi_k\) is true if and only if, as a result of the implementation of the given scheme, we arrive at the resultant act \(R_k\).
In what follows we shall assume that each element contains, in the form of a conjunctive term, the function \(A_1\) or its negation. The logical act corresponding to the function \(A_1\) we shall agree to call the initial act of the given scheme. The scheme must contain indications of those actions that are to be carried out after the performance of the resultant acts. We shall call a final resultant act such an act after whose performance there is a transition either to the initial act or to actions not connected with the scheme under consideration.
The following assertion is valid:
The system of logical functions of the final resultant acts satisfies the equalities
\[ \Phi_i\Phi_k=0 \qquad (1\leq k\neq i\leq m); \]
\[ \Phi_1+\Phi_2+\ldots+\Phi_m=1. \tag{3} \]
The converse assertion also holds:
If, for the logical functions of the resultant acts, the equalities (3) are satisfied, then all resultant acts of the scheme are final acts.
From the equalities (3) there follow the following relations between the functions:
\[ \Phi_k=\overline{\Phi}_1\,\overline{\Phi}_2\ldots \overline{\Phi}_{k-1}\overline{\Phi}_{k+1}\ldots\overline{\Phi}_m; \]
\[ \overline{\Phi}_{k_1}\ldots\overline{\Phi}_{k_l} (\Phi_{i_1}+\ldots+\Phi_{i_j}) =\Phi_{i_1}+\ldots+\Phi_{i_j}; \]
\[ \overline{\Phi}_{k_1}\ldots\overline{\Phi}_{k_l} =\Phi_1+\ldots+\Phi_{k_1-1}+\Phi_{k_1+1}+\ldots+ \Phi_{k_l-1}+\Phi_{k_l+1}+\ldots+\Phi_m; \]
\[ \overline{\Phi}_k+\varphi\,\overline{\Phi}_i =\overline{\Phi}_k+\varphi \qquad (1\leq i\neq k\leq m); \]
\[ \overline{\Phi}_k+\varphi\Phi_i =\overline{\Phi}_k \qquad (1\leq i\neq k\leq m); \tag{4} \]
\[ \overline{\Phi_k\varphi}+\overline{\Phi_i\psi}=1 \qquad (1\leq i\neq k\leq m); \]
\[ \Phi_k\varphi+\overline{\Phi_i\psi} =\overline{\Phi_i\psi} \qquad (1\leq i\neq k\leq m) \]
and a number of others. Here \(\varphi\) and \(\psi\) are arbitrary logical functions.
- Let us introduce probabilistic characteristics of the logical functions. Let \(p_k\) be the probability that \(\Phi_k\) is true; \(P_i\) the probability that \(\vartheta_i\) is true. Suppose the function \(\Phi_k\) contains some number \(\nu\) of functions \(\vartheta_i\); further, suppose the function \(\vartheta_i\) includes \(n_i\) conjunctive elements. Define the quantity \(S_k\) as the mathematical expectation of the number of logical acts in the function \(\Phi_k\), under the condition that the latter is true:
\[ S_k=\frac{n_{k_1}P_{k_1}+\ldots+n_{k_\nu}P_{k_\nu}}{p_k}. \tag{5} \]
Then the amount of information about the true function \(\Phi_k\), obtained on average from one logical act of the scheme \(\Sigma\), is expressed as the ratio of the amount of information, in binary units, contained in the given scheme, to the mathematical expectation of the number of logical acts of the scheme under deter-
of obtaining a single true function \(\Phi_k\):
\[ V(\Sigma)= \frac{-\displaystyle\sum_{k=1}^{m} p_k \log_2 p_k} {\displaystyle\sum_{k=1}^{m} p_k s_k}. \tag{6} \]
Theorem 1. The absolute maximum of the quantity \(V(\Sigma)\) is one, and it is attained if and only if
\[ S_k=-\log_2 p_k \quad \text{for } k=1,2,\ldots,m. \tag{7} \]
In order to increase the value of \(V(\Sigma)\), let us introduce the following transformation of the given scheme \(\Sigma\). Arrange the logical functions of the resulting acts of the scheme in decreasing order of the probabilities that they will be true functions. The obtained sequence is divided into two groups in such a way that the total probabilities are, as far as possible, distributed equally. Then each group is divided into two groups subject to the same condition of equality of probabilities. This division continues until only one function remains in a group. In the case when division into groups whose total probabilities would be exactly equal is impossible, we perform the division according to the following rules. Suppose that, after some number of divisions, there is a group of functions
\[ \Phi_{k_1},\ \Phi_{k_2},\ldots,\Phi_{k_l},\ldots,\Phi_{k_r}, \tag{8} \]
for which the two inequalities hold
\[ \sum_{q=1}^{l} p_{k_q} > \sum_{q=l+1}^{r} p_{k_q}, \]
but
\[ \sum_{q=1}^{l-1} p_{k_q} < \sum_{q=l}^{r} p_{k_q}. \tag{9} \]
Represent the sums of probabilities in the form
\[ \sum_{q=1}^{l} p_{k_q} = \left(\frac{1}{2}+\varepsilon_l\right) \sum_{q=1}^{r} p_{k_q}, \]
\[ \sum_{q=1}^{l-1} p_{k_q} = \left(\frac{1}{2}-\varepsilon_{l-1}\right) \sum_{q=1}^{r} p_{k_q}. \tag{10} \]
If \(\varepsilon_l < \varepsilon_{l-1}\), then the division is chosen in which the boundary passes between the functions \(\Phi_{k_{l+1}}\) and \(\Phi_{k_l}\). In the opposite case, the boundary passes between the functions \(\Phi_{k_{l-1}}\) and \(\Phi_{k_l}\). Next we form a system of logical functions, each of which corresponds to a definite division of the given sequence into two groups.
If the sequence (8) is divided into the groups
\[ \Phi_{k_1},\ \Phi_{k_2},\ldots,\Phi_{k_l} \quad \text{and} \quad \Phi_{k_{l+1}},\ \Phi_{k_{l+2}},\ldots,\Phi_{k_r}, \]
then the logical function establishing the fact that the true function \(\Phi_k\) belongs to the first group is
\[ \Omega_{1lr}=\Phi_{k_1}+\Phi_{k_2}+\cdots+\Phi_{k_l}. \]
Using equalities (4), the function obtained can be brought to some rational form.
Let us introduce the concept of an identical transformation of a scheme. Denote by the symbol \(\Pi(\theta)\) the result of applying the transformation \(\Pi\) to the functions \(\theta\) of the original scheme. Then we shall call the transformation \(\Pi\) a transformation identical with respect to the scheme as a whole if the relations
\[ \Phi_k(\theta) = \Phi_k(\Pi(\theta)), \qquad k = 1,2,\ldots,m. \]
are satisfied.
It can be shown that the transformation of the scheme defined above is an identical transformation. We shall call it an optimizing transformation.
Theorem 2. The optimizing transformation of a scheme ensures the maximum of the quantity \(V(\Sigma)\) for a given distribution of the probabilities \(p_k\).
We shall call the scheme obtained as a result of the optimizing transformation an optimal scheme.
It follows from the foregoing that the program for the optimal scheme will be optimal in the sense of obtaining information from the logical conditions of the problem.
Received
15 X 1960