Full Text
MATHEMATICS
B. A. SUBBOTOVSKAYA
ON COMPARING BASES IN THE REALIZATION OF FUNCTIONS OF THE ALGEBRA OF LOGIC BY FORMULAS
(Presented by Academician P. S. Novikov, 17 X 1962)
In the present work we study the realization of functions of the algebra of logic by formulas in finite bases. As is known, from the point of view of the complexity of the realization of almost all functions, bases are in a certain sense equivalent \((^{1})\). However, when individual functions are realized, differences between bases are revealed. In this work an order and equivalence relation is introduced on the set of bases, the existence of nonequivalent bases is proved, the existence in a certain sense of the worst basis is proved, namely the basis \(\{\&, \vee, \overline{\phantom{x}}\}\), and a necessary and sufficient condition is established for equivalence to this basis.
§ 1. Let \(B=\{\varphi_1,\ldots,\varphi_n\}\) be a complete system of functions of the algebra of logic. Expressions of the form \(\varphi_i(x_1,\ldots,x_{i_k})\) \((1\leq i\leq n;\ k_i\) is the number of essential variables of the function \(\varphi_i)\) will be called basis formulas. We shall consider formulas that are superpositions of basis formulas (“formulas in the basis \(B\)”). Two formulas realizing one and the same function will be called equivalent; at the same time we shall not distinguish functions that differ by inessential variables. Let \(L(F)\) be the number of variable symbols in the formula \(F\), and \(L_B(f)=\min L(F)\) (the minimum is taken over all formulas in the basis \(B\) that realize the function \(f\))*.
Definition. We shall say that a basis \(B_1\) precedes a basis \(B_2\) (notation \(B_1\preccurlyeq B_2\)) if there exists a constant \(M\) (depending only on \(B_1\) and \(B_2\)) such that for any function \(f\) the inequality \(L_{B_1}(f)\leq M L_{B_2}(f)\) holds. We shall say that the bases \(B_1\) and \(B_2\) are equivalent (notation \(B_1\sim B_2\)) if: a) \(B_1\preccurlyeq B_2\) and b) \(B_2\preccurlyeq B_1\). If condition a) is fulfilled, while b) is not, then we shall say that the basis \(B_1\) strictly precedes the basis \(B_2\).
We shall call a formula \(F\) repetition-free if every essential variable of the function realized by this formula has exactly one occurrence in \(F\).
Lemma 1. If all functions of the basis \(B_1\) are expressed by repetition-free formulas in the basis \(B_2\), then \(B_2\preccurlyeq B_1\)*.
Theorem 1. If all functions of the basis \(B_1\) are expressed by repetition-free formulas in the basis \(B_2\), and conversely, then \(B_1\sim B_2\).
Lemma 2. The constants \(0,1\), negation, and nonlinear functions of two variables are realized by repetition-free formulas in any basis.
The proof almost literally coincides with the proof of Lemma 1 in \((^{1})\).
* All results of this work remain valid if positive weights are assigned to the functions of the basis and \(L(F)\) is defined as the sum of the weights of the basis functions occurring in \(F\) (taking their multiplicities into account).
** A formula constructed from repetition-free formulas has the same structure as a formula constructed from basis formulas (nothing need be substituted for inessential variables).
Denote by the symbol \(B_0\) the basis \(\{\&, \vee, \bar{\ }\}\). From Lemmas 1 and 2 it follows that
Theorem 2*. Every basis \(B\) satisfies the relation \(B \preccurlyeq B_0\).
Theorem 3. There exist nonequivalent bases **.
Examples of nonequivalent bases are \(B_0\) and \(B_1=\{\&, +(\operatorname{mod}2), 1\}\). For the function \(f_n=x_1+\cdots+x_n(\operatorname{mod}2)\) we have, on the one hand, \(L_{B_1}(f_n)=n\), and, on the other hand, \(L_{B_0}(f_n)>Cn^{3/2}\) (3). Other examples of nonequivalent bases are easily constructed on the basis of Theorem 4 of this paper.
§ 2. Functions obtained from a function \(f\) of the algebra of logic as a result of substituting constants in place of some variables, as well as the function \(f\) itself, will be called derivatives of the function \(f\). We shall say that an essential variable of a function has a distinguished value \(\tau\), if \({}^{\tau}f^{x_i}\) (3) *** does not depend on some essential variable \(x_j\) (\(x_j\ne x_i\)) of the function \(f\) (i.e. \({}^{\tau 0}f^{x_i x_j}={}^{\tau 1}f^{x_i x_j}\)); in this case we shall also say that \(x_i\) absorbs \(x_j\) in \(f\) (with distinguished value \(\tau\)). Obviously,
\[ \text{if } x_i \text{ absorbs } x_j,\ \text{and } x_j \text{ absorbs } x_k,\ \text{then } x_i \text{ absorbs } x_k . \tag{1} \]
A variable that has no distinguished value will be called marked. Let \(\Phi\) be the set of functions all derivatives of which have no marked variables ****. Obviously, among the functions of two variables the set \(\Phi\) contains all nonlinear functions and only them. It is also obvious that together with every function \(f\) the set \(\Phi\) contains any function obtained from \(f\) by replacing some variables by their negations.
Lemma 3. Every function \(f(x_1,\ldots,x_n)\) from \(\Phi\), \(n>2\), is representable in the form \(f_1(\varphi(x_{i_1},x_{i_2}),x_{i_3},\ldots,x_{i_n})\), where \(\varphi, f_1\in\Phi\).
Proof. Each variable \(x_i\) of the function \(f\) absorbs some other variable \(x_j\). From (1) it follows that there is a pair of variables \(x_{i_1}\) and \(x_{i_2}\) such that \(x_{i_1}\) absorbs \(x_{i_2}\) (with some distinguished value \(\tau_1\)) and \(x_{i_2}\) absorbs \(x_{i_1}\) (with some distinguished value \(\tau_2\)) *****. Therefore
\[ {}^{\tau_1\bar{\tau}_2}f^{x_{i_1}x_{i_2}} = {}^{\tau_1\tau_2}f^{x_{i_1}x_{i_2}} = {}^{\bar{\tau}_1\tau_2}f^{x_{i_1}x_{i_2}} \tag{2} \]
and, upon substituting constants in place of the variables \(x_{i_1}\) and \(x_{i_2}\) in the function \(f\), no more than two distinct derivatives are obtained. Consequently, the set \(\{x_{i_1},x_{i_2}\}\) of variables is separable ((4), p. 192). The first part of the lemma is proved.
Now let \(f(x_1,\ldots,x_n)=f_1(\varphi(x_{i_1},x_{i_2}),x_{i_3},\ldots,x_{i_n})\). From (2) it follows that \(\varphi\) is a nonlinear function and therefore belongs to \(\Phi\). The function \(f_1(x_{i_2},x_{i_3},\ldots,\ldots,x_{i_n})\) is obtained from \(f\) by substituting some constant in place of \(x_{i_1}\) and, possibly, replacing \(x_{i_2}\) by \(\bar{x}_{i_2}\); therefore \(f_1\in\Phi\).
Corollary. Any function \(f(x_1,\ldots,x_n)\) from \(\Phi\), \(n\ge 2\), can be represented as a superposition of nonlinear functions of two variables, in which all variable symbols are pairwise distinct (in the form of a repetition-free superposition).
* Theorems 1, 2 and Lemmas 1, 2 were proved by O. B. Lupanov.
** For circuits of functional elements all finite bases turn out to be equivalent (2).
*** In this paragraph some notions and facts from (3) are used.
**** There exist functions having no marked variables, but some derivatives of which do have marked variables, for example, \(x_1x_2x_3x_4\vee \bar{x}_1\bar{x}_2x_5x_6\).
***** Consider the sequence \(x_{i_1},\ldots,x_{i_k},\ldots\), where \(x_{i_s}\) absorbs \(x_{i_{s+1}}\). In this sequence there is a pair of identical variables, say, \(x_{i_p}\) and \(x_{i_q}\). They are not adjacent. Therefore \(x_{i_p}\) absorbs \(x_{i_{p+1}}\) and \(x_{i_{p+1}}\) absorbs \(x_{i_p}\).
Lemma 4. A function \(f\) is realizable without repetition in the basis \(B_0\) if and only if \(f\in \Phi\)*.
Theorem 4. If in the basis \(B\) there is a function \(\varphi\) such that some derivative \(\psi\) of it (in particular, \(\psi=\varphi\)) has a distinguished variable and depends essentially on more than one variable (i.e., \(\varphi\notin \Phi\)), then \(B\) strictly precedes the basis \(B_0\).
Proof. Let \(\psi(x_1,\ldots,x_n)\) be a function with distinguished variable \(x_1\), which is a derivative of the basis function \(\varphi\) and depends essentially on \(n\) variables, \(n\ge 2\). Consider the sequence of functions
\[ \psi_1(x_1,\ldots,x_n)=\psi(x_1,\ldots,x_n), \]
\[ \psi_i=\psi_{i-1}(\psi^1,\ldots,\psi^{n^{i-1}}),\qquad i=2,3,\ldots, \]
where \(\psi^j\) is the function obtained from \(\psi(x_1,\ldots,x_n)\) by replacing the variables \(x_1,\ldots,x_n\), respectively, by \(x_1^j,\ldots,x_n^j\) (the variables \(x_{i_1}^{j_1}, x_{i_2}^{j_2}\), corresponding to different pairs \((i_1,j_1)\), \((i_2,j_2)\), are distinct). We shall show that
\[ \frac{L_{B_0}(\psi_i)}{L_B(\psi_i)}\to \infty\qquad (i\to\infty). \]
Thus, in view of Theorem 2, this theorem will be proved. The set \(\{x_1^j,\ldots,x_n^j\}\) of variables will be called a subset; a set of \(n^{i-1}\) variables (of the function \(\psi_i\)) containing one variable from each subset will be called a special set. Let \(F\) be a formula in the basis \(B_0\) realizing the function \(\psi_i\) and such that \(L(F)=L_{B_0}(\psi_i)\). By Lemma 2, from (3) it may be assumed that \(F\) is a normal formula. We describe a certain partition of all variables into \(n\) special sets \(r_1,\ldots,r_n\). The set \(r_1\) will be constructed in a special way, while the others are chosen arbitrarily subject to only one condition: each variable from each subset belongs to one of the special sets \(r_1,\ldots,r_n\). The special set \(r_1\) is the union of two disjoint sets \(A\) and \(C\) of variables. We construct \(A\), and simultaneously an auxiliary sequence \(B=\{b_1,\ldots,b_\nu\}\) of variables, \(\nu=\left[\dfrac{n^{i-1}}{2}\right]\). Put \(x_1^1\) into \(A\). Let \(\tau_1\) be a defining value (3) of some occurrence of the variable \(x_1^1\) in \(F\); let, when \(\tau_1\) is substituted in \(F\) in place of \(x_1^1\), some occurrence of the variable \(x_{i_1}^{j_1}\), different from \(x_1^1\), become inessential, and let \(F_1\) be the normal formula corresponding to \({}^{\tau_1}F^{x_1^1}\) (3). Put \(b_1=x_{i_1}^{j_1}\). Then put into \(A\) the variable \(x_1^{j_2}\), different from \(x_{i_1}^{j_1}\) (and from \(x_1^1\)). Let \(\tau_2\) be a defining value of some occurrence of the variable \(x_1^{j_2}\) in \(F_1\); let, when \(\tau_2\) is substituted in \(F_1\) in place of \(x_1^{j_2}\), some occurrence of the variable \(x_{i_2}^{j_2}\), different from \(x_1^{j_2}\) (and, obviously, from \(x_1^1\); note that \(x_{i_2}^{j_2}\) may coincide with \(x_{i_1}^{j_1}\)), become inessential, and let \(F_2\) be the normal formula corresponding to \({}^{\tau_2}F_1^{x_1^{j_2}}\). Put \(b_2=x_{i_2}^{j_2}\), etc. This process will continue until \(A\) contains \(\nu\) variables from \(\nu\) subsets and \(B\) has \(\nu\) terms; \(B\) will contain no more than \(\nu\) distinct variables. Let \(N_1,\ldots,N_\mu\) \((\mu+\nu=n^{i-1})\) be those subsets whose variables did not enter \(A\), and let \(p_k\) be the number of occurrences of variables from \(N_k\) in \(B\) \((1\le k\le \mu)\). Put into \(C\), from each subset \(N_k\), that variable which occurs the least number of times in \(B\). This number of occurrences does not exceed \(\dfrac{p_k}{n}\). Therefore in \(B\) there will be no more than
\[ \frac{1}{n}(p_1+\cdots+p_\mu)\le \frac{\nu}{n} \]
occurrences
\[ \text{* If } f \text{ is not a constant and is realizable without repetition in the basis } B_0,\text{ then } f \text{ is also realized by a repetition-free formula (in the basis } B_0\text{) having no occurrences of inessential variables (see (3)).} \]
of occurrences of variables from \(C\) and at least \(\nu-\dfrac{\nu}{n}\) occurrences of variables not contained in \(C\) (nor in \(A\)). Upon substituting in \(F\), in place of the variables \(x_1^1, x_1^2,\ldots, x_1^\nu\) from \(A\) (i.e., from \(r_1\)), respectively the constants \(\tau_1,\ldots,\tau_\nu\), one obtains a formula \(F'\) realizing a function essentially depending on all the variables from \(C, r_2,\ldots,r_n\) and containing at least \(\nu-\dfrac{\nu}{n}\) inessential occurrences of variables from \(r_2,\ldots,r_n\). Let \(q_s\) be the number of such inessential occurrences of variables from \(r_s,\ 2\leq s\leq n\) (therefore
\[
q_2+\ldots+q_n \geq \left(1-\frac{1}{n}\right)\nu >
\left(1-\frac{1}{n}\right)\left(\frac{n^{i-1}}{2}-1\right)>n^{i-4}\quad \text{for } i\geq 3
\]
).
Then the number \(L^s(F)\) of occurrences of variables from \(r_s\) in the formula \(F\) satisfies the relation
\[ L^s(F)\geq L_{B_0}(\psi_{i-1})+q_s,\qquad 2\leq s\leq n, \]
since from the formula \(F'\), by a suitable substitution of constants for all variables not occurring in \(r_s\), one can obtain a formula expressing a function of the same type as \(\psi_{i-1}\).* Therefore
\[ L(F)=\sum_{s=1}^{n} L^s(F)\geq nL_{B_0}(\psi_{i-1})+\sum_{s=2}^{n}q_s \geq nL_{B_0}(\psi_{i-1})+n^{i-4}\quad (i\geq 3) \]
and
\[ L_{B_0}(\psi_i)\geq nL_{B_0}(\psi_{i-1})+n^{i-4}\quad (i\geq 3). \tag{3} \]
Starting from (3), it is easy to show by induction on \(i\) that, for \(i\geq 3\),
\[ L_{B_0}(\psi_i)\geq (i-2)n^{i-4}. \]
On the other hand, since \(\psi\) is realized in the basis \(B\) without repetitions, we have
\[ L_B(\psi_i)\leq Cn^i, \]
where \(C\) is some constant. Therefore
\[ \frac{L_{B_0}(\psi_i)}{L_B(\psi_i)}\to\infty\qquad (i\to\infty). \]
The theorem is proved.
Theorem 5. The basis \(B\) is equivalent to \(B_0\) if and only if all functions from \(B\) are realized without repetitions in \(B_0\).
This theorem follows immediately from Theorem 4 and Lemma 4.
Received
14 IX 1962
REFERENCES
- O. B. Lupanov, Problems of Cybernetics, vol. 3, 61 (1960).
- D. E. Muller, IRE Trans., EC-5, No. 1, 15 (1956).
- B. A. Subbotovskaya, DAN, 136, No. 3, 553 (1961).
- A. V. Kuznetsov, Tr. Matem. inst. im. V. A. Steklova AN SSSR, 51, 186 (1958).
* That is, obtained from \(\psi_{i-1}\) by replacing its variables with variables from \(r_s\) or their negations.