On Stability of Multi-Valued Nonlinear Feedback Shift Registers

Nonlinear feedback shift registers (NFSRs) are the main building blocks in many convolutional decoders, and a stable NFSR can limit decoding error propagation. Due to lack of efficient algebraic tools, the stability of multi-valued NFSRs has been much less studied.This paper studies the stability of multi-valuedNFSRs using a logic network approach. Amulti-valuedNFSR can be viewed as a logic network. Based on its logic network representation, some sufficient and necessary conditions are provided for globally (locally) stable multi-valued NFSRs, explicit forms are given for the set of basins, and the algorithm for obtaining the set of basins is provided as well. Finally, a new method is presented for constructing stable n + 1-stage NFSRs from stable n-stage NFSRs by the properties of D-morphism.


Introduction
Nonlinear feedback shift registers (NFSRs) are the main building blocks in many convolutional decoders. However, in the process of decoding, a decoding error tends to induce indefinitely long decoding errors. A stable NFSR is an alternative to limit this error propagation. Some studies have focused on the stability of NFSRs. In 1964, Massey and Liu [1] proposed that using a stable nonlinear feedback shift register (NFSR) as the main building block in a convolutional decoder is able to limit such an error propagation. In their NFSRbased decoder, the feedback function represents a decoding algorithm. They gave an example to highlight the application of the NFSR-based decoder. Mowle [2] proved that the number of -stage globally stable NFSRs is 2 2 − −1 and also showed that all these NFSRs are binomially distributed. In [3,4], the author gave the enumeration and classification of stable FSRs and an algorithm to generate all of them. A direct algorithm for the synthesis of stable NFSRs was proposed [5]. It is notable to point out that only binary NFSRs were concerned in the above work. In addition, Lempel [6] gave some results on -stable NFSRs. Since then, the stability of NFSRs has not been further studied due to lack of efficient mathematical tools, although numerous other efforts have been made on NFSRs over the past decades.
In [7][8][9], the authors studied the stability for binary NFSRs by viewing them as Boolean networks. A Boolean network is a finite state automaton evolving through Boolean functions. It was firstly introduced by Kauffman in 1969 to model a genetic network whose variables take only two possible values, "on" and "off " (or equivalently, 1 and 0, resp.) [10]. Over the last decades, Boolean networks have attracted much attention in many communities, such as biology [11][12][13], physics [14][15][16], system sciences [17][18][19][20][21], and control theory [22,23]. In the community of system sciences, Cheng and his collaborators [24] developed an algebraic framework for Boolean networks using a semitensor product approach. In the algebraic framework, a Boolean network can be equivalently converted into a conventional discretetime linear system. A logic network is a generalization of a Boolean network. The variables of a logical network usually take multiple values. If they take only two values, say 0 and 1, then the logical network is reduced to a Boolean network. The studies of multi-valued logical networks can refer to, for instance, [25][26][27].

Complexity
Multi-valued NFSRs have been investigated in several studies. For example, some construction methods were given for de Bruijn sequences generated from multi-valued NFSRs [28][29][30]. A necessary and sufficient condition was given for the nonsingularity of multi-valued NFSRs [31]. Recently, the multi-valued NFSRs were studied in [32][33][34]. Some necessary and sufficient conditions were given for the stability of multivalued NFSRs in [35].
In this paper, we study the stability of multi-valued NFSRs using a logic network approach. A multi-valued NFSR can be viewed as a logic network. Based on its logic network representation, we give the state transition matrix [34], which shows the simple relation with the truth table of the feedback function of the NFSR. From this viewpoint, it is more explicit than the state transition matrix introduced in [31], where the state transition matrices are expressed as the products of some structure matrices of the components of the vectorial function. In fact, from the cryptography perspective, it is very important and useful to show the explicit relation between the truth table of the feedback function and the state transition matrix in order to analyze and design an NFSR. This paper is an extension of our previous work [35], which is more complete and more substantial due to the following contributions: (1) Because the stability of an NFSR completely depends on the basin of the NFSR, we give the explicit forms for the set of basins, and the algorithm for obtaining the set of basins is provided as well. (2) A stable NFSR is an alternative to limit error propagation in the process of decoding; therefore we give a new method for constructing stable +1-stage NFSRs from stable -stage NFSRs over the binary field.
The remainder of this paper is organized as follows. Section 2 briefly reviews some related works on logic networks. Sections 3 and 4 are our main results. Some sufficient and necessary conditions are given for globally (locally) stable NFSRs in Section 3. In Section 4, we present the method to construct stable NFSRs, and examples are presented to show the effectiveness of the proposed method. The paper is concluded in Section 5.

Logic Network Representation of NFSR
In this section, we first briefly review the semitensor product of matrices and recall the multi-linear form of nonlinear logic function that is obtained by the semi-tensor product. Finally, we revisit the logic network representation of a multivalued NFSR, which is very useful to investigate the stability of NFSRs.
(iv) : the -th column of the identity matrix .
(vi) Δ : the set of all -dimensional vectors over Δ .
(viii) ( ): the order of a square matrix of dimension , that is, the least power satisfying = .
(ix) L × : the set of × matrices, whose columns belong to Δ . If ∈ L × , then it can be expressed as For the sake of compactness, it is briefly denoted by = [ 1 2 ⋅ ⋅ ⋅ ].

. . Semi-Tensor Product and Multilinear Form of Logic
Network. Semi-tensor product of matrices was introduced by Cheng [24]. It is a generalization of the conventional matrix product and works for any two matrices regardless of their sizes, while it retains all major properties of the conventional matrix product. Before reviewing the semitensor product, we first recall what the Kronecker product is.
Definition (see [36]). Let = ( ) and be matrices of dimensions × and × , respectively. The Kronecker product of and is defined as an × matrix, given by Definition (see [24]). Let and be matrices of dimensions × and × , respectively, and let be the least common multiple of and . The (left) semitensor product of and is defined as an / × / matrix, given by Clearly, if = , the semi-tensor product ⋉ is reduced to their conventional matrix product . A logical function with variables is a mapping from D to D . Let be the decimal number corresponding to the tuple ( 1 , 2 , . . . , ) ∈ D via the mapping = 1 −1 + Identify a variable ∈ D as a vector = − ∈ Δ . Then a logic function with variable from D to D is changed to a function from Δ to Δ .

. . Logic Network Representation of Multi-Valued NFSR.
An -stage multi-valued Fibonacci NFSR can be described as Figure 1. It is a collection of storage devices, whose contents are denoted by the variables 1 , 2 , . . . , , taking values from the set D = {0, 1, . . . , − 1}. Here the logical function ( 1 , 2 , . . . , ) is called the feedback function of the NFSR. For any ∈ {1, 2, . . . , − 1}, the content +1 is shifted to at each periodic interval determined by a master clock. However, to obtain a new value for the variable , we compute the function ( 1 , 2 , . . . , ) of all the present contents in the shift register. The state diagram of an -stage -valued NFSR is a directed graph consisting of nodes and directed edges. Each node represents a state of the NFSR, and an edge from state X to state Y means that X is shifted to the state Y. X is called a predecessor of Y, and Y is called the successor of X. Every state of an NFSR has a unique successor but may have no predecessor or a single predecessor or predecessors with a positive integer satisfying 1 ≤ ≤ . The state with more than one predecessor is called a branch state, while the state without predecessors is called a starting state. A sequence of distinct states, X 1 , X 2 , . . . , X , is called a cycle of length if X 1 is the successor of X , and X +1 is a successor of X for any ∈ {1, 2, . . . , − 1}. Similarly, a sequence of distinct x 2 x n f(x 1 , x 2 , · · · , x n ) Figure 1: An -stage nonlinear feedback shift register.
states, X 1 , X 2 , . . . , X , is called a transient of length , if the following conditions are satisfied: (1) none of them lies on a cycle; (2) X 1 is a starting state; (3) X +1 is a successor of X for any ∈ {1, 2, . . . , − 1}; (4) the successor of X lies on a cycle. For the sake of statement simplicity, in the sequel anstage NFSR means an -stage multi-valued Fibonacci NFSR over D .
Lemma 6 (see [34]). For an -stage NFSR with a feedback function , assume the truth table of to be [ 1 , 2 , . . . , ], arranged in the reverse alphabet order. en the NFSR can be equivalently expressed as a linear system where x ∈ Δ is the state and ∈ L × is the state transition matrix, expressed as

The Properties of Stable Multi-Valued NFSR
In this section, we first briefly review some existing basic concepts of the stability of NFSRs. Then we show that the error-propagation effect is closely related to the stability of an NFSR. Finally, we give some sufficient and necessary conditions for their stability.

. . Basic Concepts
Definition (see [2]). A state X( ) is called an equilibrium state of the logic network (6), if g(X( )) = X( ). For a -valued NFSR, the equilibrium state of its logic network representation (8) is also called an equilibrium state of the NFSR.
Note that an equilibrium state of an NFSR forms a cycle of length 1, that is, unit cycle, in the state diagram of the NFSR.
Definition . The set E is called the basin of an equilibrium state X of an NFSR, if E is a set of states eventually reaching the equilibrium state X.
Definition (see [1]). An -stage NFSR is globally stable to the equilibrium state 0, if, for any state X( ), there exists a positive integer such that the state transition function of its logic network representation (8) satisfies g (X( )) = 0; that is, 0 is the unique equilibrium state and there are no other cycles in the state diagram of the NFSR.
Definition (see [1]). An -stage NFSR is locally stable to the equilibrium state 0, if there exists some state X( ) ̸ = 0 such that for some positive integer the state transition function of its logic network representation (8) satisfies g (X( )) = 0.
Since an -stage multi-valued NFSR has an equivalent logic network representation in a linear system (10), accordingly, we give an equivalent definition of globally (locally) stable multi-valued NFSR as follows.
Definition . An -stage NFSR is globally stable to the equilibrium state 0, if, for any state x( ), there exists a positive integer such that the state transition matrix of its logic network representation (8) satisfies x( ) = .
Definition . An -stage NFSR is locally stable to the equilibrium state 0, if there exists some state x( ) ̸ = such that for some positive integer the state transition matrix of its logic network representation (8) satisfies x( ) = .
In the sequel, an NFSR is globally (resp., locally) stable meaning that an NFSR is globally (resp., locally) stable to the equilibrium state 0. From their definitions, it is easy to see that a globally stable NFSR must be locally stable but not the vice versa.

Definition
(see [2]). An NFSR is called a globally stable maximum transient NFSR if it is globally stable and has a single starting state.
. . Decoder NFSR. We show below that the errorpropagation effect is closely related to the stability of an NFSR. The relevant portion of a decoder is shown in Figure 2 and is seen to constitute an NFSR. The first terms of the syndrome sequence are stored in the shift register, and the current input is +1 , at the time when the decoder forms Δ 0 . Let the vector s = ( 1 , 2 , . . . , ) represent the shift register contents and let 0 denote the all-zero vector. s will be referred to as the state of the NFSR. The decoding algorithm is represented by the function ( +1 , s); that is, ( +1 , s) = Δ 0 . For any reasonable decoding algorithm, (0, 0) = 0, since this is the case where all parity checks are satisfied. From Figure 2, it should be clear that consecutive correct decoding decisions will clear the decoder of any spurious symbols introduced by a decoding error and hence will terminate the error propagation. The ability of the decoder to affect such a "reconvergence" is conveniently studied by considering the shift register to be loaded with some initial states s and the syndrome input sequence to be all zeros; that is, all succeeding parity checks are satisfied. Finally, the shift register will enter state 0 when reconvergence has been achieved. Thus the problem of studying error propagation will be reduced to the stability analysis of an NFSR in Figure 1.

Theorem 19. Let be the state transition matrix of the logic network representation ( ) in a linear system of an -stage NFSR. e NFSR is globally stable, if and only if there exists an integer ≤ − 1 such that each column of is equal to . Moreover, the NFSR is globally stable maximum transient, if and only if each column of −1 is equal to .
Proof. Necessity: As the equilibrium state 0 ∈ D is uniquely corresponding to the state ∈ Δ , that an -stage NFSR is globally stale to the equilibrium state 0 is equivalent to that the -stage NFSR is globally stable to the state . Clearly, any state of an -stage globally stable NFSR with one more starting state must be shifted fewer times to reach the equilibrium state 0 than the -stage globally stable maximum transient NFSR. For an -stage globally stable maximum transient NFSR, the starting state x 0 = must shift − 1 times to go through all other states and finally reaches the state (or, equivalently, the state 0) and keeps staying at this state. Therefore, = −1 is the largest power such that each column of is equal to . Sufficiency: There exists an integer ≤ − 1 such that each column of is equal to . Therefore, for the state with any ∈ {1, 2, . . . , }, we have = . According to Definition 9, the NFSR is globally stable. In particular, = −1 means that the starting state for any ∈ {1, 2, . . . , } eventually reaches the equilibrium state and keeps staying at this state. Thus, the result follows. Example . When = 3 and = 2, we consider two nonlinear feedback shift registers, NFSR1 and NFSR2. Their feedback functions are, respectively, as follows: Computations show that the state transition matrices of the logic network representations of both NFSRs, respectively, are 1 = 9 [3 4 7 2 6 8 1 5 9] (15) and 2 = 9 [2 6 7 2 6 9 1 5 9] .

. . Basin of the Equilibrium State of NFSRs
Definition . The set E is called the basin of an equilibrium state X of an NFSR, if E is a set of states eventually reaching the equilibrium state X.
We let E( ) be the basin of the equilibrium state . The stability of an NFSR in Figure 1 completely depends on the basin E( ). In the following, we will focus on how to get the basin of the equilibrium state. Reference [34] gives a way to find all starting states of an NFSR, shown in the following lemma.
Lemma 24 (see [34]  Proof. The result follows from Lemmas 6 and 24. In fact, it is easy to get the whole state transition graph of an NFSR when its state transition matrix is known. For any ∈ L × , ( ) = , we have that is the predecessor state of and is the successor state of ; that is, = ( ). For example, we consider the NFSR2 in Example 21. Its state transition matrix = 9 [2 6 7 2 6 9 1 5 9]. Obviously, only 3 9 , 4 9 , 8 9 ∈ ( ), and according to Lemma 24, they are all starting states of NFSR2. For the state 4 9 , it is easy to see that 4 9 = 4 ( ) = 2 9 , and 2 4 9 = 2 9 = 2 ( ) = 6 9 and 3 4 9 = 2 2 9 = 6 9 = 6 ( ) = 9 9 . Thus, according to Theorem 25, we have 4 9 , 2 9 , 6 9 , 9 9 ∈ E( ). Similarly, for the state 3 9 , 8 9 , we can also use the same method. Finally,  we have E( ) = { 1 9 , 2 9 , 3 9 , 4 9 , 5 9 , 6 9 , 7 9 , 8 9 , 9 9 }. All those features are consistent with the logic network expression of its state diagrams, which are shown in Figure 6. In the following, we strive to give an algorithm to obtain the basin E( ). We define E( ) to be the set of elements that represent the positions of the entry 1s of all elements in E( ). Precisely speaking, if E( ) = { 1 , 2 , . . . , }, then E( ) = { 1 , 2 , . . . , }. For the sake of convenience, we also called E( ) the basin. For an -stage NFSR, we first find its starting states according to Lemma 24. Let U be a set of starting states, and denote its cardinality as |U|. Suppose that the starting state set U has been obtained in terms of Lemma 24, and its elements are denoted by , = 1, 2, . . . , |U|. Let M = { 1 , 2 , . . . , |U| }, which is a set of the positions of the entry 1s of all the elements in the starting states U. Second, we assume that the state transition matrix of the NFSR = [ 1 2 ⋅ ⋅ ⋅ ] is known. Following by = ( ), we define a mapping Actually, Note that any starting state of an NFSR eventually reaches a cycle and keeps staying on it. E( ) is constituted by the starting states that eventually reach the state and the states that those starting states go through. Finally, we need to take away repeat states.
Finally, we give Algorithm 1 to obtain the basin E( ) for an -stage NFSR based on the mapping and the set M if we knew the starting states of the NFSR.

The Construction of Stable Feedback Shift Registers over the Binary Field
An -stage -valued NFSR can be described as Figure 1. Let the present state of the NFSR be s = ( 1 , 2 , . . . , ) ∈ D , and then the successor of s can be ( 2 , 3 , . . . , , ) ∈ D , ∈ {1, 2, . . . , − 1}; that is, the state s can have different successors. Then we construct directly the stable + 1-stage -valued NFSRs from the stable -stage -valued NFSRs by the properties of -morphism, which is not a trivial work. We will consider it in another new work, in which we will define a new mapping. Therefore, in this section, we first give a new method for constructing stable + 1-stage NFSRs from stable -stage NFSRs by the properties of -morphism over the binary field.

. . Synthesis eory of Stable FSRs
Lemma 27 (see [39]). Let be a cycle in , and let s be a state on . en the state −1 0 s is on one of the cycles −1 0 and −1 1 , and −1 1 s is on the other one.

Corollary 30.
is the state diagram of a stable -stage NFSR; then there exists an ( +1)-stage NFSR such that −1 is the state diagram of NFSR. Moreover, −1 is two self-dual in +1 .
According to (35), we obtain a 4-stage stable NFSR with a feedback function The state diagrams of the NFSRs with the feedback functions , , and are shown in Figures 7, 8, and 9, respectively.
In summary, the theorems and corollaries in Section 4.1 presented a procedure for constructing stable + 1-stage NFSRs from stable -stage NFSRs.
Step 1 determines the feedback function of the +1-stage NFSR from stable -stage NFSR according to Theorem 31. Step 2 is used in finding the feedback function of + 1-stage stable NFSR from + 1-stage NFSR obtained by step 1.

Conclusion
A stable NFSR is an alternative to limit this error propagation. This paper studied the stability of multi-valued NFSRs using a logic network approach. A multi-valued NFSR can be viewed as a logic network. Based on its logic network representation, we first gave some sufficient and necessary conditions for globally (locally) stable multi-valued NFSRs. Then, explicit forms have been given for the set of basins, and the algorithm for obtaining the set of basins is provided as well. The approach used in this paper is helpful to theoretically analyze multi-valued NFSRs. Finally, the method of constructing stable NFSRs is presented, so that we can get a stable + 1stage NFSR from stable -stage NFSR by the properties of -morphism. Nonlinear feedback shift registers are subject to impulsive effects and time-delay effects, which might be interesting to be considered in the future work.

Data Availability
No data were used to support this study.

Conflicts of Interest
The authors declare that they have no conflicts of interest.