On a Covering Problem for Partially Specified Switching Functions

We consider the problem of finding the minimum number K(n,c) of total switching functions of n variables necessary to cover the set of all switching functions which are specified in at most c positions. We find an exact solution for K(n,2) and an upper bound for K(n,c) which is better than a previously known upper bound by an exponential factor.

used.Let A = (S,I,O,Nj,R,) and Ak = (Sk,I,O,Nk,Rk) be the deterministic Moore-type sequential machines corresponding to the given graphs G, and Gk.Then we have Theorem 6: Let K (I) = K (I) = 1 and 5s f sk = 0.There is an isomorphism between Ai and A. if and only if there is a nontrivial closed and output-consistent partition over Si U Sk such that each element of the partition contains an even number of states: half of them belonging to S, and the other half belonging to Sk.  IUustration 7: A nontrivial closed and output-consistent partition over the union of the state sets of Ai and A, is P24 = {a,3, b,d,l,5, c,e,2,4, f,g,k,6,9,10, ,7, j,8, m,11, n,12}.
This partition satisfies Theorem 5 and defines at least one isomorph- ism between A, and Ak.As seen by comparing P24 and P2, for each j = 0,1,2,3, P24 covers each P23, i.e., each element of P2, is a subset of some element of P24.Thus P24 induces at least one mapping which is an isomorphism.It should be noted that some partition covered by P24 is nontrivial and output consistent but may not be closed so that it does not induce an isomorphism.Since an undirected graph can be considered as a special case of a directed graph, the previous methods are also applicable to un- directed graphs.

APPENDIX I AN ALGORITHM FOR GENERATING ALL NONTRIVIAL CLOSED PARTITIONS OVER A STATE SET
The following algorithm which generates all nontrivial closed partitions over a state set is based on [2].
Step 1: Find the closure classes of all implication related blocks each containing two states and then find those of all implicationsunrelated blocks each containing two states.
Step 2: Apply chain operations to the closure classes to obtain the chain-operated classes.
Step 3: Check the existence of a nontrivial closed partition.If none, stop.
Step 4: Find all basic candidates which are the chain-operated classes not equal to Pmax.
Step 5: Find all possible joins of the basic candidates to obtain candidates.
Step 6: Identify all independent closure classes.
Step 7: Generate each nontrivial closed partition by taking the join(s) of a basic candidate or a candidate and some independent closure classes to fulfill the covering condition.
Step 8: Has any independent closure class been used in Step 7? If not stop; otherwise, generate smaller partition(s) by performing splitting operation (s) and then stop.
The closed partitions as shown in Table II over the state set Si of Ml form a lattice of Fig. 1.
On a Covering Problem for Partially Specified Switching Functions M. SCHKOLNICK Abstract-We consider the problem of finding the nimum number K(n,c) of total switching functions of n variables necessary to cover the set of all switching functions which are specified in at most c positions.We find an exact solution for K(n,2) and an upper bound for K(n,c) which is better than a previously known upper bound by an exponential factor.lndex Terms-Minimal covers, partially specified switching func- tions, switching functions.

I. INTRODUCTION
The problem considered here can be stated as follows.Problem 1: Given the set F of all c-specified Boolean functions of n variables, i.e., all functions which are specified in at most c posi- tions, to find the cardinality K (n,c) of a set G of total functions such that the following hold.
a) For all f in F, there is a g in G such that g covers f, i.e., if f(x) is specified then g This problem relates the number of additional exterior connections (besides input and output) that are required in a circuit which is to be c-universal.(A circuit is c-universal if it is capable of simulating the behavior of any partial function which is specified in c or less points of its domain.) This problem was studied in [1] in connection with adaptive net- works, where an upper bound for K (n,c) was shown to be K(n,c) < E(2 k \p +k8/ where m= 2n, p = Lc/2j mod8, 8 = m + 1 -c.This upper bound agrees with the exact solutions for c = 1 (i.e., K(n,1) = 2) and c = 2" -1 (i.e., K(n,2n -1) = 22"-1).For c = 2 we have 8 = 2" _ 1 and, for any n > 1, p = 1 so and, in general, for small c, this bound is of the order of 2=12.
In this note we show that for c = 2, K (n,2) = 0(n) and present an upper bound which, for fixed c, is a power of n.

II. AN EXACT SOLUTION FOR K(n,2)
Consider the following problem.Problem 2: Given n and c, find the dimension s (n,c) of a vector space over GF (2) such that there is a set P of at least 2" vectors in it satisfying the following.a) (Vpl,p2, -,pc) E P, (Vb,,b2,-** bG) E 10,1), p1blp2b2... Notation: We will use the following convention.
2) pb = if b = 1 then p else p.The first result we present shows that essentially, Problems 1 and 2 are equivalent.
Proof: We show that any solution to Problem 1 satisfying Problem la is a solution to Problem 2 satisfying Problem 2a and conversely.This implies that the minimality conditions are also satisfied.
Let G = g1,g2,-,gK(n,c)} be a solution to Problem 1 satisfying Problem la.Consider the set P= {p(x) = (g1(X),g2(X),-, . But since c > 1, this implies that there is a c-specified function f with 0 = f(x) s f(y) = 1 which is not covered by any g C G which is a contradiction.Thus, p (x) $ p(y), which shows that P = 2".
Conversely, let P be a set of 2n s-dimensional vectors P = lpt,pi, p2, *,P"-11 satisfying Problem 2a.Consider the set G = 1lg, g2, ,g,) of Boolean functions of n variables defined as follows.

M
Now we focus our attention to Problem 2. In what follows, we assume s is restricted to be even and we will show that K(n,2) can be determined exactly (to within 1).We first prove an auxiliary result.Since Problem 2 can be interpreted as: find the smallest s such that there are at least 2n points in the s-cube satisfying Prob- lem 2a, we will now show that the search for points in the s-cube satisfying Problem 2a can be reduced to the set of all points in the middle plane (i.e., having weight s/2).
Lemma 2: Let c = 2,s be an even positive number, and P be a set of s-dimensional vectors satisfying P2-1.Then, there is a set Q of s-dimensional vectors, each of which has weights/2 and such that Q = P1, satisfying Problem 2a.
Proof: We can assume, without loss of generality, that all vectors in P have weight >s/2.(It is clear that changing a vector by its complement in any set satisfying Problem 2a also produces a set satisfying Problem 2a.)If all vectors have weight s/2 we have proved the lemma.Assume then that P contains t vectors plI,P2,...,Pt with maximal weight u > s/2.We will construct a set P' such that all vectors in it will have weights w such that s/2 <w <u.Since us/2 is finite this will prove the lemma.
Choose any set of t vectors qj,q2,--,qt with the property that qi < pi for i = 1,2,--*,t and such that the weight of each qi is u -1.
To show the claim, we first note that there are always t vectors qi as above.This follows directly from the relationship which exists between points in the s-cube.
[The other two conditions which imply pl < P2 or p2 < p are satisfied trivially if w (pi) = W (P2) .]But these conditions are equiva- lent to saying that pi or P2 are each the complement of the other.Since the maximum number of points with weight s/2, satisfying this condition is 2 (:712) we have shown the following theorem.~(832) (2'! (27rs)0) s = 0 (n).Thus we get K(n,2) = 0(n) as was to be shown.

III. A POLYNOMIAL BOUND ON K(n,c)
In this section we will show that for each c, K (n,c) grows not more than with a polynomial of n, namely K(n,c) < 2cn2-'.This is a substantial improvement over the previously mentioned bound.
To obtain this bound we will construct a set G of functions satisfy- ing Problem la.The cardinality of this set will be bounded by 2cnc-l.The construction is a modification of one suggested to the author by R. Rivest who pointed out the existence of polynomial bounds for this problem.
Let G(n,c) be a set of functions satisfying Problem la for some n and c.G(n,c) can be constructed as follows.
1) Find all G (n-1,d) for d = 1,** * ,c. 2 The following is an immediate consequence of this definition.Lemma 3: The set G(n,c) constructed as above satisfies Problem la.From the above construction we get the following recurrence for K(n,c): Using this recurrence we now show Theorem 2. Theorem 2: K (n,c) < 2"n-1'.Proof: For c = 1 we know K (n, 1) = 2 so the theorem holds.Assume the result holds for all values of the second parameter less than c.Then, using the above recurrence, Since the term inside the summation does not depend on k we get a new recurrence: which proves the theorem.U Since the number of control lines to select any of the K (n,c) func- tions is log K (n,c) we get the following corollary.
Corollary 1: The number of exterior connections (besides those used for input) to a c-universal circuit is no more than (c -1) log n + c.

IV. CONCLUSIONS
In this note we have reexamined the problem of the number of exterior connections needed to control a circuit which is to be c-universal.For c = 2 we have found an exact solution and shown an upper bound for this number in the general case.The small bound found (of the order of clog n for the number of exterior connections) makes the implementation of these circuits very prac- tical.
shown for one of the two statements.Furthermore, three generalized properties useful to demonstrate the above counterexample are presented.
The checking experiments designed for a machine which possesses no distinguishing sequence (DS) become very long.Hence the several input-output sequences classifying a given machine are defined, and a method for the design of the experiments based on these sequences is proposed in the above-mentioned paper.'Now we repeat the definitions given there.
Definition 1: Let X be an I/O sequence generated by the state su of a machine M. ir is said to be a simple I/O sequence of M if no state other than su of M can generate the I/O sequence corresponding to 7r.
Definition 2: A machine M with n states is said to be (n/2)resolvable if there exists an input sequence X such that M produces at least [(n + 1) /2] different output responses when X is applied to M in the initial state of any one of n states: state 1, -* *, and state n, where [q] denotes the smallest integer >q.In this case, X is called a resolving sequence (RS) for M.
An input sequence X induces a partition Pz on the set of states of M into blocks of the X-equivalent state where two states are in the same block if and only if their output responses to X are identical.
Definition 3: A compound resolving sequence (CRS) of M is a set of input sequences IXYI, ,XYr) with a common prefix X such that the following statements are true.
1) The prefix X partitions the set of states of M into r X- equivalent classes Si,.-. ,Sr.
2) If M responds to XYi with mi different output responses starting from the states in Si, then Emj > It is described in the above paper' that the following two state- ments can easily be verified.
1) A reduced machine with n < 8 states has either a compound RS of length < n -1, or a simple I/O sequence of length 1, or both.
2) Every reduced, strongly connected three-state machine has an RS of length 1 and a valid homing sequence' of length, at most, 3.
As for these two statements, the latter was verified also by the authors of this correspondence.However, they found a counter- example for the former statement as follows.
Let us consider a machine M, shown in Table I which is a reduced, strongly connected six-state (<8), 2-input-symbol machine.The distinguishing tree for M, is shown in Fig. 1.From Fig. 1 it can easily be seen that the partitions Po = 12 34561 and PI = (23 45161 are induced by inputs 0 and 1, respectively, and the present states of each block consist of one or two pairs of the same states.There- fore M, has neither a simple I/O sequence of length 1 nor other simple I/O sequences of lengths > 2. Next, since the machine M, has six states, M, must produce [(6 ± 1)/2] = 4 or more different output responses to an RS which is applied to M1 in the initial state of any one of n states: state 1, * -, and state n.Now we consider the partitions Po, and Plo.Both of the numbers of blocks of them are three and they cannot be partitioned any more, hence M, has no RS.Finally, we will try to verify whether M, has a CRS or not.If M, with n states has a CRS, then there must be at least one set of input sequence {IYy, Y2,. -,Y, I such that a set of input sequence fXY1,XY2,,--,XY,} with a common prefix X produces [(n + 1)/2] or more different output responses which are applied to M, in an initial state of any one of n states: state 1, ..., and state n.But it is easily verified for Ml that there is no such set {Y,,--., Y, I for any input sequence X.Hence Ml has no CRS.
Manuscript received January 2, 1975; revised April 25, 1975.This work was supported by the Defense Advanced Research Projects Agency under Contract F44620-73-C-0074.The author is with Department of Computer Science, Carnegie-Mellon University, Pittsburgh, Pa. 15213.

Theorem 1 :
The solution to Problem 2 for c = 2 is given by s