Biol. Cybernetics 19, t37 145 (1975) 9 by Springer-Verlag t975

Control of Switching Nets Paul Cull Departments of Computer Science and Mathematics, Oregon State University, Corvallis, Oregon, USA Received: October 26, 1974

Abstract Switching nets have long been used as models of biological phenomena. In this paper, control properties of switching nets are discussed. Bounds on control parameters for general nets, linear nets and nets with linear inputs are obtained. In particular, bounds are obtained on the maximum distance between two states and on the length of input Sequences needed to synchronize two copies of the same net. Bounds on the number of input lines that must be added to an autonomous net to make it controllable are obtained in terms of the number of cycles and transient chains of the net.

1. Introduction Since the early work of McCulloch and Pitts (1943), finite state models have been used to describe various biological phenomena. Those researchers most strongly influenced by McCulloch have concentrated on models of subsystems of the brain and other neural phenomena, where the all or none response of the neuron strongly suggests finite state models. A recent review of much of this work appears in Arbib (1972). On a slightly different tack, Caianiello (1961, 1967) and his school have been studying linearly separable binary functions with the aim of developing a theory of learning mechanisms. M o r e recently Kauffman (1969, 1972) has used finite state models to describe the functioning of genetic systems. M a n y of these models are autonomous, i.e., have no inputs, and can be analyzed by the methods of Cull (1971 a). Looking at only a u t o n o m o u s models ignores one of the most important parts of any e x p e r i m e n t - - t h e experimenter. When an experimenter understands a system, he is able to control it; that is, he knows what input sequence to give the system so that a desired behavior will result. In this paper we will formulate various concepts of control for the switching net model, and show how bounds on various control parameters can be derived from other parameters of the net. A switching net is a set of components, each of which has two possible states. Time is assumed to be quantized, and at each instant of time each of the

components is in one of its two possible states. The state of each component at the next instant of time is a function of the states of the components and the states of the external inputs. When there are no external inputs the net is said to be a u t o n o m o u s . A switching net can be defined by the following equation:

x +l where the X's are n-dimensional vectors of zeros and ones that represent the states of the net at time t and t + 1, the ith element of X being one if arid only if the ith component is on; Y~ is an m-dimensional vector of zeros and ones that represents the input at time t; and F is the next state function. What sort of questions do we want to answer? First, we would like to know, if the net is in state a and we would like to have it in state b, is there a sequence of inputs that takes the net from state a to state b. If for any pair of states a and b such an input sequence exists, then the net is said to be strongly connected (Moore, 1956). If a net is strongly connected, we define D, the diameter of the net, as the m a x i m u m over all pairs of states a and b of the length of the shortest input sequence that takes the net f r o m state a to state b. We seek to find upper and lower bounds on D as a function of some simple parameters of the net. Even if a net is strongly connected it m a y not be possible to put two copies of the net in the same state at the same time. Consider, for example, an autonomous net whose state diagram is a single cycle. Then any state can be reached from any other state. But if two copies of this net are in different states at some time, they will always be in different states. T o overcome this problem, we define a net to be K-controllable (Cohn, 1962) if for every pair of states there is an input sequence of length K that takes the net from the first state to the second state. We seek to obtain bounds on K. If we start with an autonomous net we would like to krlow how to add input lines to the net

138 so that the modified net is either strongly connected or K-controllable. We will als0 discuss linear nets and nets with linear inputs: In both cases the bounds obtained will be sharper than the bounds for arbitrary nets. A net is said to have linear inputs if it can be written as:

x,+~ =F(XO+ B~,

where B is an n x m matrix of zeros and ones. We refer to the rank of B, i.e., the number of linearly independent rows or columns of B, as the number of input lines. In fact, we can also write B as an n x n matrix, retaining the definition of the rank of B as the number of input lines. A net is said to be linear or completely linear if it can be written as: Xt+l = AXt + B Yt, where A is an n x n matrix of zeros and ones. Since we will be dealing with functions that have to take on integer values and we will encounter some expressions that do not, it will be convenient to define two functions that convert nonintegers into integers. The greatest integer function Lxj equals x if x is an integer and equals the next lowest integer if x is not an integer. The least integer function Vx~ equals x if x is an integer and equals the next greatest integer if x is not an integer.

2. Lengths of Control Sequences for General Nets Let D be the diameter of a net, that is, the m a x i m u m over all i a n d j of the length of the shortest input sequence that takes the net from state i to state j. Clearly, if N is the number of states in the net, N - 1 > D > 1, since the net must take at least one step to get to another state and at most N - 1 steps if it has to pass through all other states. Both of these bounds are attainable. F o r example, the upper bound would b e attained in a net whose state diagram consists of a single cycle in which a state can go to only one other state in one step. The lower bound would be attained in a net whose state diagram is a complete directed graph, that is, a net in which every state can be reached from any state in one step. A linear net with n input lines is this type of net. These examples imply that D is dependent on the number of States that can be reached from a state in one step. Let A be the m a x i m u m number of states excluding itself that any state can reach in one step, and let a be the m i n i m u m n u m b e r of states excluding itself that any state can reach in one step. We can show that the following inequalities hold: N - a >=D > LlOgA(N),.

(1)

Define S~ as the number of states that can be reached from a state in at most i steps. Then Si > a + 1, from the definition of a and the fact that a state can reach itself in zero steps. Clearly Si is a nondecreasing integer valued function. If S~+ 1 equals S/, no more states can be reached. Thus for a strongly connected net, S~ is strictly increasing if S~ is less than N. So S~+ 1 > S~ + 1, and S~ > a + i, if S~ is less than N. F r o m the definition olD, S~ equalS N, so that N > a + D, and the upper bound holds. The lower bound is obtained by noting that Z}=0 A j > S i. Summing this geometric series for i equal to D and simplifying the result gives the lower bound. In the special case when A equals 1 the above relation becomes i + 1 __>S~, from which we conclude that D = N - 1. We will now show that these bounds are attainable. F o r the upper bound let the net have a state set Q = {ql, q2 .... , qu}- Let the set of states that can be reached in one step from qi be T(qO and define T by the following relations:

1 __ a, then L = 1. If L = 1, then an input sequence of length 2(N - a) can be found to take any state 2 to any state y. If x can go to ql in i steps where i < N - a , and ql can go to y in j steps where j < N - a , then use the input sequence that takes x to ql in i steps, stays in ql for 2(N - a) - i - j steps and then goes to y in j steps. Thus: if a ' > a or L - - 1 if a' = a

2(N-a)>K,

( g - a) (L + 1) + 1 > K .

(3) (4)

Two special cases should be noted. If a' = a -- 1, then formula (4) gives an upper bound of ( N - 1 ) L + N. formula (2) gives the better upper bound (N - 2) L + N. If a ' = N , then the state diagram of the net is a complete directed graph, so that any state can reach any other state in one step. In this case K = 1 but formula (3) gives an upper bound of 2. T h e upper bounds given by formulas ( 2 ) " (4) are attainable. Of course, we have to look at the minimum upper bound given by the three formulas. The upper bounds will be a minimum when L = 1 and a = N - 1. F r o m formula (3) we find that the upper bound on K is 2. This bound will be attained by the following net. Let T(q) be the set of states that can be reached in one step from state q. The net will be defined by the following equations:

r ( q O = {ql, q2,..., qN} r(q~)= {qjIj + i} i > 2 . For this net K -- 2, since any state can reach any other state in two steps by going to qt in one step and then to the desired state in one more step, and since, for example, q2 can not go to q2 in one step. The m a x i m u m upper bound on K occurs when L=N-1 and a - - 1 . F r o m formula (1) this upper bound is ( N - 1 ) 2 + 1. This upper bound is attained by the net:

T(ql) = {q~+ l}

r(qN) =

i < N-1

{ql, q2}-

Starting from ql the state qN can be reached in N " 1 steps, the set of states qN-l, qN can be reached in 2 ( N - 1 ) steps, the set of states q2,q3,...,qN can be reached in (N - 1)2 steps, and each of the states can be reached in ( N - 1 ) 2 + 1 steps. This is the minimum number in which every state can be reached from qa. For any other state q~ there is a smaller number of steps in which every state can be reached. This upper bound on K has been previously given by Cull (1971b) and by K a m b a y a s h i and Yajima (1972).

140

F o r a lower b o u n d we recall that K must be at least as large as D. F r o m formula (1) we have: K ___D > L1ogA(N)j. This bound is attained for any net in which D attains the lower bound by adding an arrow from each state to itself. This does not increase A, and each state that is reachable in at most i steps, is reachable in exactly i steps. A similar lower bound is given by K a m b a y a s h i and Yajima (1972):

K >=rlogA,(N)l ,

(5)

v~here A' is the m a x i m u m n u m b e r of states including itself that any state can reach in one step. Since any state x must be able to reach any state y in exactly K steps, there must be at least as m a n y input sequences ofl6ngth K as there are states of the net. But there are at most (A') K input sequences of length K, so a necessary condition is that (A') K> N, and the lower bound follows.

IQ] = 2", and since the TP~ are non-overlapping, the number of equivalence classes equals 2"-". We are now in a position to apply our general results to nets with linear inputs. We m a y regard the diagram of equivalence classes as a state diagram of a general net. To go from a state of the net with linear inputs to another state of that net, we start in the equivalence class of the first and proceed to the equivalence class that has the desired state as a member of its next state set. We can use our bounds for general nets, but we must remember, when calculating upper bounds, to add one for the final transition from equivalence class to desired state. F o r N, the number of states of the general net, we use 2 " - ' , the number of equivalence classes. The m a x i m u m number of states reached from any state in one step is replaced by the m a x i m u m number of equivalence claSses reached in one step from any equivalence class. As shown above, this is at most 2". The m i n i m u m nmnber of equivalence classes reached in one step is at least one. Making these substitutions in formula (1), we obtain:

2" " >- D >- Ln/mj,

3. Nets with Linear Inputs In our study of control of nets we will m a k e use of the equivalence classes induced on the state set by the inputs. Two states are in the same equivalence class if their sets o f next states are identical. Clearly this" is an equivalence relation. If Q is t h e state set and Pi the ith equivalence class, then Q = u P i since an equivalence relation induces a partition of its set. Let TPi be-the next state set of the equivalence class P~. F o r a net with linear inputs, TP~ will have 2 ~ elements where m is the number of input lines into the net. This follows from the fact that a matrix with rank m will m a p a s p a c e into an m-dimensional space and m-dimensional binary spaces have 2 m members. We obtain the n u m b e r of equivalence classes from the fact that the TP~ do not overlap for linear inputs. Assume that there is a state x in c o m m o n between TP~ and TPj. Then x - F(Xz) + B Y1 and x = F(X;) + BY2, where Xi is in Pi, Xj is in P;, and Y1 and Y2 are some inputs. F r o m these equations, F( Xi) = F( X~) + B( Y2 + YO, recalling that subtraction is the same as addition in the binary field. Consider any element y in TPi; it is also in TP;, since y=F(X~)+ BYs =F(X~)+ B(Y3 + Y2 + Y1). Obviously this argument also holds for any element in TPj. Thus if TPf~TP; ~=0, then TP~= TPj. But this implies that every element in P~ and P; have the same next state set and are thus equivalent. Thus Pz = Pj. Therefore TP~nTP;=O, i+j. If the net is strongly connected, each state can be reached in one step from some other state, and thus Q=wTP~. Since ]TPz] = 2 m, and in a switching net with n components

(6)

for a net with linear inputs. Without using equivalence classes, we can also obtain the following bounds:

2" - 2" + 1 > D > Ln/mj. Clearly the bounds using equivalence classes are better. In either case the lower bound is invalid when m = 0, but in this case A = 1, and as we have shown before D = N , 1 = 2" - 1. The same procedure can be used to obtain bounds on K if the net is K-controllable. F r o m Eqs. (2) and (5): 1 + 2n-m + L(2 "-m - 2) > K > Vn/mq. (7) F r o m Eqs. (3) and (4): if a ' > a if a' = a

or L = I

2(2 " - m - a ) + l > K , ( 8 ) ( 2 " - " - a) (L + 1) + 2 > K , (9)

where L is the length of the shortest cycle in the diagram of equivalence classes; a is the m i n i m u m number of equivalence classes excluding itself that can be reached in one step from any equivalence class; and a' is the m i n i m u m number of equivalence classes including itself that can be reached from any equivalence class. Of course the m i n i m u m upper bound from Formulas (7) - (9) should be used. F o r example, when m = n, every equivalence class can reach every other equivalence class in one step. Here 2 " - m = 1, L = 1, a' = 1, and a = 0. F o r m u l a (7) shows that K = 1, but F o r m u l a (8) gives an upper bound of 3 for K.

141

As an example requiring the upper bound, consider the switching net defined by the following state diagram:

The diagram of equivalence classes is: P1

-~P~

101 ~011 ~ 111--*001 ~ 100~000

T

1

010~110, where we have used row vectors for column vectors. If we specify that the input matrix B is a 3 x 3 matrix all of whose entries are 1, or that B is the 3 x 1 matrix all of whose entries are 1, each state will be able to reach in one step both the state specified in the above diagram and its complement, that is, the state obtained by changing every 1 to a 0 and every 0 to a 1. With these specifications we obtain the following equivalence classes and next state sets: P~={000,111}

rPa = {001, 110} C/}3/}4

/}2={100,011}

TP2 -- {000, 111} = P1

= {100, 011} = P2

P3={010,001,101} P , = {110}

T P 4 = {0t0, lO1} C/}3.

We then obtain the following equivalence class diagram:

P4 --->P3 --+t~

-+

P1.

We can now compute K using the following diagram:

P4-+P3--+P2->P1--).P3P4-*P2P3--+Pa P2-* P1P3P4)

(-'P2 P3P --' P1P2

PI P2P3P,-'Q .

F r o m the diagram we find that K is at most 11. In fact K = 11, since 110 does not go to 010 in 10 steps. For this net D = 4, since it takes 4 steps to get from 110 to 001. The parameters of this net are: n = 3 , m = 1, 2"-m=4, L = 3 , and a = a ' = 1. F r o m Formula (6), we find that the upper bound on D is 4, which is attained by this net. Formula (7) gives an upper bound of 11, which is again attained by this net. The lower bounds of Formulas (6) and (7) are attained by the following linear net" Xt+ l =

0 1

Xt +

1 0

Yr.

This net has the following equivalence classes and next state sets: Px = {001, 101}

T P 1 = {100, ll0} C P3P4

P: = {011, 111}

TP2 = {111,101} C P~P:

P3 = {ooo, lOO}

TP3 = {000, 010} C P3P4

P4 = {010, 110}

T P 4 = {001,011} C P~P2.

We calculate K using the following diagrams: PI -* P3 P4 ~ P1Pz P3 P4 ~ Q Pe ~ P1P2--* P1P2 P3P4 ~ Q .

The diagrams for P3 and P4 are identical to these because of the symmetry of the equivalence class diagram. These diagrams tell us that K is either 2 or 3. In fact, both K and D are equal to 3 since it takes 3 steps to get from state 000 to state 100. The parameters of interest for this net are n = 3 and m -- 1. F r o m Formulas (6) and (7), we find that the lower bounds on both K and D are equal to 3, and these values are in fact attained by this net. 4. Linear Nets

Bounds for linear n e t s follow directly from the bounds for nets with linear inputs and the fact that the zero state with the zero input goes to the zero state. Thus 2 " - " >_D >_ Ln/m 3 and 2(2"-m -- a) + 1 > K >__rn/mn. Even though these bounds are better than for general nets, we have still not made use of all the structure implied by linearity. If the net is linear then: K--1

Xt+ K = AKxt + ~ AK-I-iBYt+I . i=o

If the net is K-controllable, Xt and Xt+K can be any vectors. Thus it must be possible to express any vector as a linear combination of the columns of the matrices B, AB, A Z B , . . . , A K - 1 B . For this to be true there must be n linearly independent columns in this set of matrices. For any matrix A there is a polynomial p(A) of lowest degree such that p(A) = 0. If the degree of this minimal polynomial is q, then a linear net is controllable if and only if it is q-controllable. Since if it is K-controllable for some K greater than q, then the K matrices, B, AB .... , A K - I B can be written as linear combinations of the q matrices B, AB, A2B, ...,Aq-~B, and the K matrices can have n linearly independent columns if and only if the q matrices do. We thus obtain: n > q ~ K >_D > Ln/mj. (10) Some of these bounds were obtained by Cohn (1962). We see that if a linear net is K-controllable with one linear input line then K = n, and further, that q = n. In fact, a linear net is controllable with one linear

142

input line if and only if q = n. We have just shown the necessity of q = n; to show sufficiency we recall, Birkhoff and M a c L a n e (1965), that when the degree of the minimal polynomial equals q there is a vector Z such that p ( A ) Z = 0, and for any lower degree polynomial }(A), } ( A ) Z ~ O. Thus choosing our input matrix B to be simply Z, we find that the set of vectors Z, A Z , AZ Z, ..., Aq- ~Z are linearly independent and contain n linearly independent vectors if and only if q = n. This result was also obtained by Cohn (1962). This result can be generalized. F o r a linear net, n + 1 - q linear inputs suffice to control the net. There is a vector Z such that Z, A Z , A2Z, ..., A ~ - I z are linearly independent. Pick n - q vectors that are linearly independent of these and use them together with Z as the columns of B. Then B has n - q + 1 linearly independent vectors and the matrices AB, A2B, ,.., A q- IB have q - 1 vectors linearly independent of the columns of B, since in particular they contain A Z , A 2 Z , . . . , A q - I z . Thus the matrices of B, AB, A2B, ..., A q- 1B have n linearly independent columns and the net is controllable. Although n + 1 - q inputs are sufficient they are not necessary. Consider the net given by the following equation:

(000 )001

Xt+

1 =

1 0 100

Xt+

Yr.

For this net the minimal equation is A 2 + I = 0. Thus q = 2 , and n + l - q = 3. But the rank of B equals 2 and this suffices for control since B, A B has 4 linearly independent columns. A lower bound on m can be obtained by using Formulas (5) and (10). We have q > K > rn/m!, and thus m > rn/ql. This lower bound is attained in the previous example, where n = 4, q = 2, and m = n/q = 2. T h a t this number is only necessary and not sufficient m a y be seen from the following example. 10 0 Xt + l =

0 1 00

Xt .

For this net the minimal equation is A(A + I) = 0, and q = 2 . Thus m > 2. Since q = 2 the net is controllable if and only if B, AB has 4 linearly independent columns. F o r any vector X that has 0 as its first component A X = X. Thus if B is to have two columns, neither of them can be vectors whose first component is 0. F o r any two vectors Yand Z that have 1 as their first component we find that A Y + Y = A Z + Z , since A Y is

simply Ywith the first component set to 0 and similarly of Z. Thus if B has two columns there are at most 3 linearly independent columns in B, AB. Thus m must be at least 3, and 3 suffices since n + 1 - q - - 3 . In fact, this is an example in which the upper bound is attained. F o r any K < q there is a matrix B with rank n + 1 - K such that the net X t + 1 = AXt + B 17, is K'controllable for some K' < K. Since K < q there is a vector Z such that Z, AZ, A2 Z, ..., A K- 1Z are linearly independent. The matrix B can be formed by picking n - K vectors that are linearly independent of these and using these n - K vectors and Z as the columns of B. Clearly the rank of B is n - K + 1 and there are K-1 vectors in AB, A 2 B , . . . , A K - I B , in particular AZ, A2 Z, ..., A K- ~Z, that are linearly independent of the columns of B. Thus there are n linearly independent columns in B, AB, A2B . . . . . A~;-~B and the net is controllable. If a linear net is K-controllable with m linearly independent inputs, then: r n--m 1 n+l--m>K>_ +1, - min(m,r(A)) -

where r(A) is the rank of A. Since K is the least integer such that B, AB, ..., A r~- aB has n linearly independent columns, Ax - ~B must have at least one column that is linearly independent of the columns of the previous matrices. Further, for any j < K - 1, AJB must have at least one column linearly independent from the columns of B, A B .... , AJ- I B; otherwise, A~B for i > j could have no columns linearly independent of the columns of B, AB, ..., A J- IB. Thus there are at least m + K - 1 linearly independent columns in B, AB, ..., Axe-lB. Since the number of linearly independent columns can be at most n, the upper bound follows. To obtain the lower bound we must obtain an upper bound on the number of linearly independent columns of B, AB, ..., AK-1B. The number of linearly independent columns in a pair of matrices is at most the number of linearly independent columns in the first matrix plus the number of linearly independent columns in the second matrix. The number of linearly independent columns in the product of two matrices is at most the minimum number of linearly independent columns in either matrix. Thus there are at most m + (K - 1) min(m, r(A)) linearly independent columns in either matrix. Thus there are at most rn + (K - 1) min(m, r(A)) linearly independent columns in B, AB, ..., AK- ~B, since there are m linearly independent columns in B, r(A) linearly independent columns in A, and at most min(m,r(A)) linearly independent columns in each AJB for j > 1. Since this

143 upper bound must be greater than or equal to n, the lower bound follows. If r ( A ) = 0 , then the lower bound as written is invalid. But in this case m must be equal to n, and the correct value K = 1 can be obtained. 5. The Number of Linear Inputs Needed to Control a Net

Consider an a u t o n o m o u s net:

x,+ 1 = F(X,). We would like to add to this net a set of linear input lines so that the net given by: X~+, = FtX,) + BYt is either strongly connected or K-controllable. We would like to add as few input lines as possible. As before we will refer to the number of input lines as the rank of B. This allows us to ignore redundant inputs, since if a column of B is linearly dependent on the other columns of B we can eliminate it and reduce the number of components in the Y vector by one. We can also keep the redundant columns in B and always make B an n • n matrix. A state q is cyclicif the net started in q at time t will be in state q at some later time. A set of cyclic states such that, if the net is started in one of the states it will be in each of the states in the set at some later time, is called a cycle. If a state is not cyclic, it is transient. A state that cannot be reached from any state in one step is called a first state. The set of transient states that can be reached from a first state is called a transient chain. For everytransient chain there is a state that can be reached in one step from two different states. For a net to be strongly connected there must he for every pair of states an input sequence that takes the net from the initial state to the desired state. A slightly weaker condition can be stated: a net is strongly connected if for every state and every first state there is an input sequence that takes the net from the state to the desired first state, and for every state and every isolated cycle (a cycle is isolated if no transient chains lead to it) there is an input sequence that takes the state to some state on the isolated cycle. This will make the net strongly connected since every state can be reached from either a first state or from a state on an isolated cycle. Consider a net that has only cycles in its state diagram. For this net to be strongly connected it must be possible to go from any cycle to any other cycle. In particular, for each cycle there must be some other

cycle from which it can be reached in one step. Let us say that state X on Cycle 1 can be reached in one step from state Z on Cycle 2. Then there is a state W (which m a y be X itself) on Cycle 1 that reaches X in one step. Z and W have one next state in c o m m o n and, if we are using linear inputs, they have all next states in c o m m o n and are thus equivalent. Further, W can reach a state on Cycle 2 in one step. Thus if a cycle can be reached from another cycle in one step, then either cycle contains a state that is equivalent to a state on the other cycle, and the cycles are mutually reachable in one step. If there is a third cycle, then this cycle or another one must be reachable in one step from one of the original two cycles. Then either a state on this new cycle is in the equivalence class of Z and W, or there is a state on one of these two cycles that is not in the equivalence class of Z and W and is equivalent to s o m e state o n the new cycle. Thus for every cycle after the first, the number of possible equivalence classes must be reduced by 1. Since the number of equivalence classes can be at most the number of states, we have that there can be at most 2 " - I C + 1 equivalence classes for a net that has I C cycles in its a u t o n o m o u s state diagram. For each transient chain there is a state on the transient chain that is equivalent to a state not on that transient chain. If there is only one transient chain, then a transient state is equivalent to a cyclic state and there can be at most 2" - 1 equivalence classes. If there is a second transient chain, then either a state on that transient chain is equivalent to a cyclic state or it is equivalent to a state on the other transient chain. In either case, the upper bound on the number of equivalence classes is reduced by 1. Thus there can be at most 2 n - - T C equivalence classes in a net with T C transient chains. If a net has both isolated cycles and transient chains, there can be at most 2" - T C - I C equivalence classes, since each transient chain decreases the upper bound by 1, and each isolated cycle decreases the upper bound by 1 by the above argument and the fact that there must be some isolated cycle that reaches a state not on an isolated cycle in one step. This gives us a lower bound on the number of linear inputs needed to strongly connect or control a net. We showed in Section 3 that a strongly connected net has 2 "-m equivalence classes and from our upper bounds we find that: m => r n - log2(2" - T C - I C ) q, or, if there are no transient chains: m > rn - log2(2" - I C +

1)q.

144

A set of states C is said to be fixed by an input I, if C + I = C; that is, if when the input I is added to any state in C, another member of C results. H o w m a n y nonzero inputs can fix a set? There can be at most I C I - 1, where [CI is the n u m b e r of states in the set. If there are R inputs that fix the set, then consider t h e set of states Xl, xa + I~, ..., xl + IR, where xa is a state in C. N o w no two of these states are equal, since equality of states would imply equality of inputs. Thus there are R + 1 states in this set. If C is fixed by each of these inputs, then all of the states in this set must be states of C. Since C has only [CI members, R can be at most [ C I - 1. There are sets that are fixed by [ C [ - 1 nonzero inputs. A j-dimensional subspace has 2 ~ elements, and each of these elements can be written as a linear combination o f j linearly independent vectors. If a linear combination of these basis vectors is used as an input, then the subspace is" fixed, since each state plus input is still a linear combination of the basis yectors. Since there are 2 j - 1 nonzero linear combinations of j linearly independent vectors, a subspace is fixed by [ C [ - 1 inputs, where [CI is the number of states in the subspace. Consider a net whose state diagram consists solely of cycles, say C1, C2, ..., Cio N o w each cycle can be fixed by at most ]Cil - 1 nonzero inputs. So the number of inputs that fix no cycle is at least: 1 --

~(IGI-

TC

2"-1-

~ (]Si[-1)>2"-I-2"+i+TC=TC. i=1

The + 1 in the inequality occurs because there is always at least one cyclic state. Starting with TC first states from which every state can be reached, we find that one input allows us to reach every state from at most LTC/2j first states. Iterating this result, we find that there are at most logz(TC ) linear inputs that allow us to reach any state from one first state, and thus that at most log2(TC) + 1 linear inputs suffice to make the net strongly connected. The + 1 is only required if we obtain at some stage in the process 3 first states from which we can reach all states. If two first states are obtained at some stage of the process, then one more input suffices to strongly connect the net. Thus we can replace log2(TC ) + 1 by rlog2(TC) 1, since 3 first states will not occur if TC is a power of 2. For a net with both isolated cycles and transient chains, we do not want to use inputs that either fix an isolated cycle or require a first state to be reachable only from states that can only be reached from the first state. There are at least TC + IC inputs for which neither of the above conditions obtain since: TC

IC

2 n~

inputs that cause each first state to be either reachable or potentially reachable from some other first state is greater than or equal to TC since:

1)=2"- 1-2"+IC=IC-

1.

2" - 1 -

IC

(IS,I- 1) -

i=1

i=1

>2"Thus if there are at least two cycles, there is an input that connects each cycle to Some other cycle. In the trivial case when there is only one cycle the net is already strongly connected. Starting with a net with IC. cycles, one linear input connects the states of the net in such a manner that there are at most LIC/2j disconnected sets. We can apply t h e same argument to this partition of the state set. Iterating the argument we find that at most log2(IC) linear inputs suffice to strongly connect the net. Let S~ be the set of states that can be reached only from the first state W~. A first state is a state that can be reached from no other state. If I(~(& + W~), that is, the set formed by adding the first state to each of the states reachable only from the first state, than W~ is reachable or potentially reachable from some other first state. A state X is potentially reachable from a state Z if X can be reached from any state that can reach Z. It is possible that Z can only be reached from itself. There are [Si] - 1 nonzero elements in (& + W~), since zero is in (S~ + Wi). Thus the number of nonzero

'~,

1-2"+

~

(ICjl- 1)

j=l

1+ TC+IC=

TC+IC.

Thus there is an input such that from TC + I C states every state can be reached before the input is added, and after the input is added every state can be reached from at most L(TC + IC)/2j states, Iterating this result we find that Vlog2 (TC + IC)! inputs suffice to strongly connect the net. Another way of giving the result is that 0ogz(TC + C)j inputs suffice, where C is the number of cycles either isolated or not. This follows since there is always a non-isolated cycle for each transient chain and we rounded up only because of the transient chains. Collecting our bounds we have:

klOg2(C)j ~

m >=rn -- 10g2(2" -- C + 1)7

(11)

for a cyclic net, and: Llog2(TC + C)j > Vlog2(TC + IC) ~ >=m > n - log2(2" - TC - 1C) for a net with transients.

(12)

145 These b o u n d s can be attained. F o r example, the upper b o u n d is needed for the net: Xt+l =Xt+

1;

that is, the net in which every state goes to its complement. Clearly there are 2"-~ isolated cycles, each of length 2. The upper b o u n d (10) says that n - 1 linear inputs will suffice to strongly connect the net. In fact, n - 1 inputs are necessary. Consider the following d i a g r a m : Z I~-,W

$

$

Z+I+L~I W + I This d i a g r a m says that if state Z goes to state W using input I, then I = Z + W + I , and W goes to W + 1 + I = W + I + Z + W + 1 = Z . Also W + 1 goes to Z + 1 and vice versa. Thus we started with 2"- x sets of two members each, and adding an input gives us 2"-2 sets of 4 members each. After adding j linearly independent inputs we will have 2 " - ~ - J sets of 2 i+ ~ members each. Thus we will need n - 1 linear inputs to strongly connect this net. These conditions will also occur if the vector 1 is replaced by any n o n z e r o vector. If the vector 1 is replaced by the vector 0, then we will have the identity net in which every state goes to itself. In this case, n linear inputs will be both necessary and sufficient to strongly connect the net. T o m a k e a strongly connected net controllable, we need at most one m o r e linear input, since we can a d d the input I = F ( X ) + X for some state X. This will allow X to reach X in one step and, as we have shown, a strongly connected net with a cycle of length one is controllable. Of course an input of this form m a y have already been added and the net will already be controllable. F o r the identity net, the n linear inputs that are required to m a k e it strongly connected also m a k e it c o n t r o l l a b l e - - i n fact, 1-controllable, since any state can reach any state in one step. F o r the affine nets we have been discussing, that have all cycles of length 2, the n - 1 inputs that are required to m a k e the net strongly connected d o not m a k e it controllable, since the lengths of all cycles in the state d i a g r a m are even and two relatively prime cycles are required for the net to be controllable. In fact, if a net can be strongly connected with m inputs, then it is either controllable or can be m a d e controllable with one m o r e input. Consider a net whose state diagram consists solely of cycles of length 2. F o r such a net, I C = 2"- ~ and T C = O. F r o m our b o u n d s (10): n-- I =log2(TC + IC) >-m > _ n - l o g 2 ( 2 " - IC + 1 ) = 1 ,

where m is the m i n i m u m n u m b e r of linearly independent columns in any input matrix B that strongly connects the net. W e have just displayed an example that attains the upper bound. We can also show that there are nets of this form for which the lower b o u n d is attained. T a k e an arbitrary ordering of the state vectors whose first c o m p o n e n t s are equal to 1. Let each state in this ordering be in a cycle of length 2 with the state obtained by complementing the previous state in this ordering. T h e n this net is strongly connected by the matrix B whose single c o l u m n consists solely of ones, since each cycle in the ordering will be connected with the previous cycle in the ordering and the next cycle in the ordering. Thus every cycle is connected to every other cycle, and so every state is connected to every other state and the net is strongly connected. Acknowledgment. I would like to thank the OSU Foundation for giving me the time, and Professor E.R.Caianiello and the Laboratorio di Cibernetica for giving me a congenial place in which to complete this work.

References Arbib, M. A.: The metaphorical brain. New York: Wiley 1972 Birkhoff,G., MacLane, S.: A survey of modern algebra, p. 297. New York: The MacMillan Company 1965 Caianiello, E.R.: Outline of a theory of thought-processes and thinking machines. J. theor. Biol. 2, 204--235 (1961) Cianiello, E.R., Luca, A.de, Ricciardi,L.M.: Neural networks and reverberations. Kybernetic 4, 10--18 (1967) Cohn, M.: Controllability in linear sequential networks. IRE Trans. Circuit Theory CT-9, 74--78 (1962) Cull, P.: Linear analysis of switching nets. Kybernetic 8, 31--39 (1971a) Cull, P.: Linearization and control of switching nets. Proc. 4th Hawaii Conference on Systems Sciences, 537--539 (1971b) Elspas, B.: The theory of autonomous linear sequential machines. IRE Trans. Circuit Theory CT4, 4 5 ~ 0 (1959) Kambayashi, Y., Yajima, S.: Controllability of sequential machines. Information and Control 21, 306n328 (1972) Kauffman, S]A.: Metabolic stability and epigenesis in randomly constructed genetic nets. J. theor. Biol. 22, 437467 (1969) Kauffman,S. A.: The organization of cellular genetic control systems. In: Cowan, J. (Ed.): Some mathematical questions in biology. II. Providence,R. I.: The American Mathematical Society 1972 McCulloch, W.S., Pitts, W.H.: A logical calculus of the ideas immanent in nervous activity. Bull. Math. Biophys. 5, !15--133 (1943) Moore, E.F.: Gedanken experiments on sequential machines. In: Shannon, C. E., McCarthy, J. (Eds.): Automata studies. Princeton, N.J.: Princeton University Press 1956 Mowle, F. : Controllability ofnonlinear sequential networks. J. ACM 17, 518--524 (1970) Paul Cull Departments of Computer Science and Mathematics Oregon State University Corvallis, Oregon 97331, USA

Control of switching nets.

Biol. Cybernetics 19, t37 145 (1975) 9 by Springer-Verlag t975 Control of Switching Nets Paul Cull Departments of Computer Science and Mathematics, O...
896KB Sizes 0 Downloads 0 Views