## Figures

## Abstract

The detection of the singleton attractors is of great significance for the systematic study of genetic regulatory network. In this paper, we design an algorithm to compute the singleton attractors and pre-images of the strong-inhibition Boolean networks which is a biophysically plausible gene model. Our algorithm can not only identify accurately the singleton attractors, but also find easily the pre-images of the network. Based on extensive computational experiments, we show that the computational time of the algorithm is proportional to the number of the singleton attractors, which indicates the algorithm has much advantage in finding the singleton attractors for the networks with high average degree and less inhibitory interactions. Our algorithm may shed light on understanding the function and structure of the strong-inhibition Boolean networks.

**Citation: **He Z, Zhan M, Liu S, Fang Z, Yao C (2016) An Algorithm for Finding the Singleton Attractors and Pre-Images in Strong-Inhibition Boolean Networks. PLoS ONE11(11):
e0166906.
https://doi.org/10.1371/journal.pone.0166906

**Editor: **Peter Csermely,
Semmelweis University, HUNGARY

**Received: **August 18, 2016; **Accepted: **November 4, 2016; **Published: ** November 18, 2016

**Copyright: ** © 2016 He et al. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.

**Data Availability: **All relevant data are within the paper. The code of the program can be seen on GitHub, and the URL is: https://github.com/zhiweihe2016/codAndDatas.

**Funding: **This work was supported partially by Natural Science Foundation of Zhejiang Province under Grant Nos. LY16A050001 (CY) and LY15A04001 (ZF), the National Natural Science Foundation of China under Grant Nos. 11675112 (CY), 11475253 (MZ), 11605142 (SL) and 51272159 (ZF). The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.

**Competing interests: ** The authors have declared that no competing interests exist.

## Introduction

Revealing how a genetic regulatory network is organized for its function is one of the main topics in system biology [1–3]. With the contribution of experimental physiologists, many precise details of gene interactions as well as their functions have been revealed [3]. Based on the experimental data, different kinds of mathematical models have been developed, such as master equations [4], Monte-Carlo method [5, 6], stochastic model [7, 8], ordinary differential equations (ODE) [9–13], Boolean network method [14–16] and other mathematical models [17]. Among all the models, the Boolean network is a simple but powerful mathematical model. It was originally introduced by Kauffman [14] and has been quickly developed into many different types, including the general Boolean network model [15], the AND/OR Boolean network model [16], and the strong-inhibition Boolean network model [18], and so on. In the general Boolean network model, the most details of the network are taken into account. It can perfectly yield insight to global behavior of the network, however, it is difficult to analysis the general Boolean network due to the complexity of large genetic regulatory network. Further, a much simpler AND/OR Boolean network model where many details of the network are neglected is presented. Recently, a strong-inhibition Boolean network model which is a biophysically plausible gene model has been obtained from the transition of the general Boolean network model, as the inhibitory interactions often dominate the activations in some important genomic regulations [18]. The model has been successfully used to reveal the backbone motif structure of the cell-cycle network and reconstruct the network structure from evolution data [18–20], since the model has more details of the network, and a simple rule which is similar to the AND/OR Boolean network model. It is very suitable to be applied to study the genetic regulatory network.

To capture the biological meaning of the genetic regulatory network, it is very necessary to identify the stable states of the dynamic system, such as the cyclic attractor and the singleton attractor. Two different attractors correspond to different functional states of the network. As an example, the cyclic and singleton attractor correspond to cell growth and differentiated states (or apoptosis) in the cell-cycle network, respectively [21]. It is noteworthy that the identification of the attractors is of great importance and is very useful in many applications, such as the treatment of human cancers [22, 23], genetic engineering [24] and validate hypotheses on the transcription processes [25]. In order to identify all attractors of the genetic regulatory network, so far several methods have been proposed, including the methods relying on binary decision diagrams [26, 27], constraint programming [28], feedback vertex sets [29, 30], linear mapping [31]. Moreover, many of these methods have been developed to be more general and effective [32–34].

In particular, the identification of the singleton attractor is especially important for revealing the function of the genetic regulatory network [30]. To find the singleton attractors of the genetic regulatory network in the context of a Boolean network, several algorithms have been proposed. For instance, Leone et al. firstly applied the SAT (the satisfiability problem of Boolean formulas in conjunctive normal form) algorithms to identify the singleton attractor in a Boolean network [35]. Based on this observation, Tamura and Akutsu showed that the detection problem of singleton attractor for a Boolean network with maximum in-degree *k* can be reduced to (*k* + 1)-SAT, and presented an algorithm for detecting the singleton attractor of an AND/OR Boolean network in *O*(1.787^{N}) time [36]. Subsequently, the authors and coworkers succeeded in improving the above algorithm, including proposed an *O*(1.587^{N}) time algorithm for determining the singleton attractor of an AND/OR Boolean network [37], an *O*(1.757^{N}) time algorithm for determining the singleton attractor of planar and nonplanar Boolean networks [38], the *O*(1.799^{N}) and *O*(1.619^{N}) time algorithm for determining the singleton attractor of Boolean networks with nested canalyzing functions and chain functions [39], respectively. In the *O*(1.799^{N}) time algorithm, it was implicitly assumed that the network does not contain the positive self-loop. While allowing for the presence of positive self-loop, the singleton attractor detection problem was solved in *O*(1.871^{N}) time [40]. Besides, Zhang et al. developed a quite fast algorithm using gene ordering [30]. It is shown that the algorithm can identify all singleton attractors for a random Boolean network with maximum indegree two with an average time *O*(1.19^{N}). However, the average computational time complexity would increase (approximately *O*(1.5^{N}) for maximum indegree ten) with increasing of maximum indegree. Recently, Zou proposed an algorithm by dividing the polynomial equation system into many subsystems [41]. Indeed, the problem of detection for the singleton attractor is still NP-hard [29, 30, 42]. Thus, it is not plausible to solve this problem efficiently in all cases. However, we can develop a new algorithm that is fast and can be applied in different mathematical models.

In this paper, we focus our attention on the strong-inhibition Boolean network model, and propose an algorithm for detecting the singleton attractors and pre-images of genetic regulatory network. Our algorithm is applied to the cell-cycle network of budding yeast, and can accurately identify all the singleton attractors of the network. Furthermore, we show that the average computational time increases exponentially with the growth of the network size *N*, and the order is approximately *O*(1.34^{N}). Moreover, we discover that the computational time is proportional to the number of the singleton attractors of network. Based on this observation, we find that our algorithm has much advantage in finding the singleton attractors for the networks with high average degree and less inhibitory interactions. We further extend the algorithm for studying the pre-image problem. The pre-image problem (or predecessor problem), to find the set of all possible inputs that evolve into the given output, has been addressed by Wuensche in [43]. In recent years, several algorithms have been introduced, such as reverse algorithm [44], probabilistic algorithm [45]. But it has also been shown to be NP-hard in general [46]. In this paper, we extend the previous singleton attractor detection algorithm to find the pre-images of any given state. All pre-images and even the basin of one singleton attractor are successfully and accurately found.

The paper will be arranged as follows: in Sec. II, the state transition model is introduced. In Sec. III, the algorithm for finding the singleton attractor is given. In Sec. IV, we show an example for finding the singleton attractor with this algorithm, and the computational time of the algorithm for finding singleton attractors is analyzed. In Sec. V, we present the algorithm of finding the pre-images of any target network state. Finally, we give a summary in Sec VI.

## State transition model

Boolean network model is a discrete dynamical model of genetic regulatory networks. In this model, each node has only two states, 1 or 0, representing “on” (active) or “off” (inactive) state, respectively. For a network system with *N* components, the network state at time *t* is denoted by *S*(*t*) = (*S*_{1}(*t*), *S*_{2}(*t*), …, *S*_{N}(*t*)). The network state in the next step is uniquely determined by the following rule [15]:
(1)
where *i*, *j* = 1, 2, …, *N*. *A* = {*a*_{ij}, *i*, *j* = 1, 2, …, *N*} is the adjacency matrix of the network, which denotes the interactions between all the components. *a*_{ij} can be positive, negative, or zero, standing for an activating interaction, inhibiting interaction or no interaction, respectively. Usually, *a*_{ii} take −1, 1, or 0, and *a*_{ij} take −*γ*, 1, or 0 for *j* ≠ *i*.

In fact, the inhibiting interactions are dominant for most biomolecular interactions, one prefers *γ* ≥ 1. Following the “dominant inhibition” assumption *γ* = ∞, which represents some typical biological transcriptional regulatory processes [47–49], the Eq (1) can be simplified into a logical equation [18]
(2)
where *r*_{ij} and *g*_{ij} represent the putative inhibitory and putative stimulatory edge from node *j* to *i*, respectively. The relation between *a*_{ij} and *g*_{ij}, *r*_{ij} is
(3)
where *i*, *j* = 1, 2, …, *N*. It should be noted that node *j* can’t have activating and inhibiting effect on node *i* at the same time, namely *g*_{ij} and *r*_{ij} can’t both take the value 1 for any fixed *i* and *j*. The addition, multiplication and bar in the Eq (2) represent the Boolean operator OR, AND, and NOT, respectively. This model is called strong-inhibition Boolean model due to the “dominant inhibition” assumption.

## The algorithm for finding the singleton attractor

To identify the singleton attractor which the network system will eventually evolve into a limited set of stable states, we should check all the states in the network state space. However, a great deal of time will be assumed for the large networks under this enumeration-based algorithm since the state space consists of 2^{N} different states. So it is very necessary to design more efficient method to identify the singleton attractor.

For the strong-inhibition Boolean model, the singleton attractors are solutions of the following equations
(4)
where *i*, *j* = 1, 2, …, *N*. We can obtain a concise equation by setting *S*_{i} = *S*_{i}(*t*),
(5)
Among all the interactions that regulate node *i*, we suppose that there are *h* positive interactions (*g*_{ij1} = *g*_{ij2} = … = *g*_{ijh} = 1) and *m* negative interactions (*r*_{ik1} = *r*_{ik2} = … = *r*_{ikm} = 1). Then Eq (5) can be written as:
(6)
where ∧ and ∨ represent AND and OR, respectively. And *X*_{i} = 1 if *g*_{ii} = 1; *X*_{i} = 0 if *r*_{ii} = 1; *X*_{i} = *S*_{i} if *g*_{ii} = *r*_{ii} = 0. According to the definition in Ref. [40], one can see that the right side of Eq (6) is a chain function, which is a special case of nested canalyzing function (nc-function). It was proved by Akutsu et al. that finding a singleton attractor for an nc-network with chain functions remains NP-hard [39].

Then, some rules are gotten by analysing Eq (5),

**rule 1.**if*S*_{i}= 1 and*r*_{ji}= 1, then*S*_{j}= 0;**rule 2.**if*S*_{i}= 1 and*r*_{ij}= 1, then*S*_{j}= 0;**rule 3.**if*S*_{i}= 1,*r*_{ii}= 1,*g*_{ij0}= 1 and ∑_{j ≠ j0}(*S*_{j}*g*_{ij}) = 0, then*S*_{j0}= 1;**rule 4.**if*S*_{i}= 0 and ∑_{j ≠ i}(*S*_{j}*r*_{ij}) = 0,*g*_{ij0}= 1 and ∑_{j ≠ j0}(*S*_{j}*g*_{ij}) = 0, then*S*_{j0}= 0;**rule 5.**if*r*_{ii}= 1 and ∑_{j ≠ i}(*S*_{j}*g*_{ij}) = 0, then*S*_{i}= 0;**rule 6.**if*g*_{ii}= 1 and ∑_{j ≠ i}(*S*_{j}*r*_{ij}) = 0, then*S*_{i}= 1;**rule 7.**if ∑_{j ≠ i}(*S*_{j}*r*_{ij}) = 0, and there is a node*j*_{0}such that*S*_{j0}*g*_{ij0}= 1, then*S*_{i}= 1.

According to these rules and the given network structure, the states of other nodes can be determined if we already know the states of part of nodes. The states of its neighbors may be determined with the rules 1 − 4 if the state of a node is known; its state may be determined with the rules 5 − 7 if the state of a node is unknown. What’s more, according to the rules 1 and 2, we can find that if *S*_{i} = 1 and the node *i* has more putative inhibitory connections, the states of its neighbors can be easily determined. Based on these rules, we can design the following algorithm to identify the singleton attractors.

**Step 1.**Input the network matrix*A*, and a network state*S*= (*S*_{1},*S*_{2}, …,*S*_{N}), where the states of*l*_{0}(0 <*l*_{0}≤*N*) nodes are unknown while the states of other*N*−*l*_{0}nodes are known. Those*l*_{0}nodes are variable nodes as their states can be 1 or 0.**Step 2.**Find the node*i*_{0}which has the most putative inhibitory connections among the variable nodes of the network.**Step 3.**Let and assign*S*_{i0}= 1. According to the rules 1 − 7, we can determine the states of more variable nodes, and obtain new network state*S*_{new}. Throughout this process, a case may occur: according to one rule, the state of a variable node can be determined as 1, but it is determined as 0 with another rules. This contradiction means that the assignment of*S*_{i0}= 1 is not appropriate, and the corresponding network state is not a singleton attractor of the network system, so we should remove it. On the other hand, if this case does not occur, we should remember the state*S*_{new}and count the number of its variable nodes*l*_{new}. Moreover, if*l*_{new}> 0, we should remember this state and wait the next turn to begin**Step 1**; if*l*_{new}= 0, which means that the states of all nodes are determined and a new singleton attractor is found, return this singleton attractor.**Step 4.**Let and assign*S*_{i0}= 0. Do the same as those did in**Step 3**.

Next, we will prove that the states found with our algorithm are exactly all the singleton attractors of the network. In our algorithm, we determine the states of variable nodes according to the rules and remove the state if contradiction appears. Actually, the states found with our algorithm are states that do not contradict with the rules, here we use set *U* to denote them. And we use set *V* to represent all the singleton attractors of the network. Because a singleton attractor must satisfy Eq (5), so it obeys the rules, thus *V* is a subset of *U*, namely *V* ⊂ *U*. Afterwards, we will prove that *U* is also a subset of *V*.

Suppose that *U* is not a subset of *V*, there must be a state *S*^{0} such that *S*^{0} ∈ *U* and *S*^{0} ∉ *V*. Accordingly, the state *S*^{0} obeys all the rules but does not satisfy Eq (5). Then, there must be a node’s state, assuming , such that
(7)
where or 1.

Firstly, assuming and inserting it into Eq (7), we obtain
(8)
Therefore, we get
(9) (10)
The Eq (9) indicates
(11)
And from Eq (10), we obtain
(12)
Obviously, it contradicts with the rule 6 through Eq (11) and if *g*_{ii} = 1. And if , then there must be a node *j*_{0} such that . So we can get
(13)
Through Eqs (11) and (13) and , one can see that it contradicts with the rules 4 and 7. Therefore, it is impossible that *S*^{0} which obeys all the rules does not satisfy the Eq (5), if .

Then, we assume . Inserting it into Eq (7), we obtain
(14)
Further, we get
(15)
If , then and *r*_{ii} = 1. It contradicts with the rule 5 since . If , then there must be a node *j*_{0} such that
(16)
Through Eq (16) and , we find that it contradicts with the rules 1 and 2. These results show that if , it is also impossible that *S*^{0} which obeys all the rules does not satisfy Eq (5).

Now we can conclude that the state *S*^{0}, which obeys all the rules but dissatisfies Eq (5), does not exist. It indicates that *U* is a subset of *V*, namely *U* ⊂ *V*. Therefore, *U* = *V* is proved. And we get the proof that the states found with our algorithm are exactly all the singleton attractors of the network. The code of this algorithm is provided in Supporting Information (S1 File).

## An example for finding the singleton attractor

To verify the validity of the above algorithm, we apply it to detect the singleton attractors of the cell-cycle network for budding yeast which is well studied in the research of cell-cycle process [15]. As shown in Fig 1(a), the network consists of 11 nodes and 34 edges. According to prior works, there are 7 singleton attractors among 2^{11} = 2048 states in the state space of the cell-cycle network, as shown in Fig 1(b). Next, we will show how to find these singleton attractors with our algorithm.

(a) The cell-cycle network of budding yeast. The green solid and pink dashed arrows represent positive and negative interactions, respectively. (b) Seven singleton attractors are found under the strong-inhibition Boolean model for the network in (a). The basin size for each singleton attractor is also given in the figure.

A flow chart for detecting all the singleton attractors of the network is shown in Fig 2. We obtain *S*_{1} = 0 according to the known network structure and the rule 5. Next, we begin to detect the states of the variable nodes. We firstly rank all nodes from large to small according to the number of their putative inhibitory connections, the order is node 10, 9, 8, 5, 7, 4, 6, 3, 2, 11, 1.

Firstly, the network state (*S*_{1}, *S*_{2}, …, *S*_{N}) is set to (0, *S*_{2}, …, *S*_{N}) with *l*_{0} = *N* − 1. Then, we get *S*_{7} = 1 according to the rule 7 by setting *S*_{10} = 1. Afterwards, *S*_{10} = 0 is obtained according to the rule 1. Now the contradiction appears, so the state *S* = (0, *S*_{2}, …, *S*_{9}, 1, *S*_{11}) should be removed. On the other hand, assign *S*_{10} = 0. It turns out that no more nodes’ state can be determined, so we remember the state *S* = (0, *S*_{2}, …, *S*_{9}, 0, *S*_{11}) with *l*_{0} = *N* − 2 and begin the next turn.

Secondly, we have network state *S* = (0, *S*_{2}, …, *S*_{9}, 0, *S*_{11}) with *l*_{0} = *N* − 2. Then, we get *S*_{8} = 0 and *S*_{4} = 0 according to the rules 1 and 2 by assigning *S*_{9} = 1. We obtain *S*_{3} = 0 and *S*_{7} = *S*_{11} = 0 based on these known states and the rules 4, 5. *S*_{6} = 0 according to the rule 5. Now, no more nodes’ states can be determined, so we remember the state *S* = (0, *S*_{2}, 0, 0, *S*_{5}, 0, 0, 0, 1, 0, 0) with *l*_{0} = 2 and wait the next turn. Assign *S*_{9} = 0, we can not determine the states of any nodes, so we remember the state *S* = (0, *S*_{2}, …, *S*_{8}, 0, 0, *S*_{11}) with *l*_{0} = 8 and begin the next turn.

Thirdly, there are two network states *S* = (0, *S*_{2}, 0, 0, *S*_{5}, 0, 0, 0, 1, 0, 0) with *l*_{0} = 2 and *S* = (0, *S*_{2}, …, *S*_{8}, 0, 0, *S*_{11}) with *l*_{0} = 8. For the first network state, we find that all cases are ok through the assignment of *S*_{2} = 0 or 1 and *S*_{5} = 0 or 1. Therefore, we can obtain 4 singleton attractors: *S* = (0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0), (0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0), (0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0) and (0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0). For the second network state, assigning *S*_{8} = 1, we obtain *S*_{11} = 1, and then we obtain *S*_{7} = 1 according to the rule 7. We can get *S*_{8} = 0 according to *S*_{7} = 1 and the rule 1, when contradiction appears. So this state should be removed. On the other hand, we assign *S*_{8} = 0, according to the rule 5, we have *S*_{11} = 0, and further *S*_{7} = 0. Then according to the rules 4 and 5, we obtain *S*_{2} = 0 and *S*_{6} = 0, respectively. Now, we can not determine the states of any nodes, so we remember the state *S* = (0, 0, *S*_{3}, *S*_{4}, *S*_{5}, 0, 0, 0, 0, 0, 0) with *l*_{0} = 3 and begin the next turn.

Fourthly, the network state is *S* = (0, 0, *S*_{3}, *S*_{4}, *S*_{5}, 0, 0, 0, 0, 0, 0) with *l*_{0} = 3. We assign *S*_{5} = 1, *S*_{4} = 0 is determined according to the rule 2. Further, we have *S*_{3} = 0 according to the rule 4. Therefore, we can return the singleton attractor *S* = (0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0). On the other hand, we assign *S*_{5} = 0, and find that the states of nodes 3 and 4 can not be determined. So we remember the state *S* = (0, 0, *S*_{3}, *S*_{4}, 0, 0, 0, 0, 0, 0, 0) with *l*_{0} = 2 and begin the next turn.

Fifthly, the network state *S* = (0, 0, *S*_{3}, *S*_{4}, 0, 0, 0, 0, 0, 0, 0) with *l*_{0} = 2 is gotten. Assigning *S*_{4} = 1, we have *S*_{3} = 1 according to the rule 3. So we return the singleton attractor *S* = (0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0). Next, we assign *S*_{4} = 0, we obtain *S*_{3} = 0 according to the rule 4. So we return the singleton attractor *S* = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0).

Finally, we get all the singleton attractors: *S* = (0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0), (0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0), (0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0), (0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0), (0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0), (0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0) and (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0). These seven states are exactly all the singleton attractors of the cell-cycle network of budding yeast as shown in Fig 1(b).

Furthermore, the singleton attractors of five classical networks are detected. As shown in Table 1, the number of singleton attractors (*NS*) and running time of our algorithm for each network are given in columns 4 and 5. We also give the results of the enumeration-based algorithm in columns 6 and 7. Comparing our algorithm with the enumeration-based algorithm, our algorithm can not only find the same number of the singleton attractors with the enumeration-based algorithm (columns 4 and 6), but also decrease extremely the running time (columns 5 and 7). Especially for the largest network (T-cell receptor), it took round 0.0468 seconds for our algorithm, whereas the enumeration-based algorithm spent more than 40 hours.

Next, we will show the computational time of our algorithm by numerical simulations on random gene regulatory networks. Similar to the ER random network [54], there exits interaction (*a*_{ij} ≠ 0) from node *j* to *i* (*i* = *j* is allowed) with the probability *p*. Usually, the parameter *p* is determined by *p* = 〈*k*〉/*N*, where 〈*k*〉 is the average degree of the network. Furthermore, *a*_{ij} ≠ 0 has been assumed to take an independent value (±1) distributed according to a two-point probability distribution function. More specifically, we adopt the following values at random:
(17)
The average degree is about 2 ∼ 4 for many biological networks, and the amount of inhibiting interactions is less than that of activating interactions [15, 55–57], so 〈*k*〉 = 3 and *r* = 0.4 are fixed. We set *N* = 50 and generate 500 sample networks. The CPU computational time for finding all the singleton attractors of each network with above algorithm is calculated and shown in Fig 3(a). As we can see, the singleton attractors of every network can be detected, and the time is no more than 1 minute. This indicates that the singleton attractors of a network can be found efficiently with our algorithm.

(a) The CPU computational time assumed of the algorithm for finding the singleton attractors of *M* (*M* = 500) random genetic regulatory network with *N* = 50, 〈*k*〉 = 3, *r* = 0.4. (b) Semi-logarithmic plot of the averaged CPU computational time (*avT*) as a function of the network size *N*. For each *N*, the value of *avT* is averaged over *M* (*M* ≥ 500) samples. And the error bars denote the range of CPU computational time, while the upper and lower ends of bars represent the maximum and minimum values, respectively. The straight dashed line is linearly fit of the data, indicative of the correlation *avT* ∝ 1.34^{N}.

The average CPU computational time *avT* as a function of the network size *N* is also computed. The result is shown in a semi-logarithmic plot in Fig 3(b), with a straight fit (dashed line) to guide an eye. The value of *avT* for each *N* is averaged over 500 samples. And the error bars denote the range of CPU computational time, where the upper and lower ends of bars represent the maximum and minimum values, respectively. In the figure, the average CPU computational time increases as the growth of network size *N*. This behavior is well characterized by the exponential relationship, *avT* ∝ 1.34^{N}. This exponential increase also exists between the maximum CPU computational time and the size of network.

Although the average and maximum CPU computational time increase exponentially with the increase of *N*, we do not know why the minimum CPU computational time is very short for each *N*, as shown in Fig 3(b). To understand this question, the maximum, average, and minimum number of the singleton attractors as the function of the size of system *N* are shown in Fig 4(a), respectively. From this figure, we find that the average and the maximum number of the singleton attractors increase exponentially with *N* increasing, and there is not exponential relation between the minimum number of the singleton attractors and the size of system. Furthermore, the sample networks with size of *N* = 50 are generated. We plot the CPU computational time against the number of singleton attractors (*NS*) of the sample networks, and show the result in Fig 4(b). We find that the computational time increases linearly with the number of the singleton attractors increasing. Based on these observations, the minimum CPU computational time nonexponentially increases with the size of system, as the exponential relation between the minimum number of the singleton attractors and the size of system does not exist.

(a) Semi-logarithmic plot of the maximum (*MaxS*), average (*avS*), and minimum (*MinS*) number of the singleton attractors of networks as the function of the size of system *N*. (b) Semi-logarithmic plot of the CPU computational time vs the number of the singleton attractors (*NS*). The straight line is linearly fit of the data to guide an eye.

Following the above observation, we may want to know what characteristics of networks could have small number of singleton attractors. So we calculate the average number of singleton attractors of networks for different average degree 〈*k*〉′*s* and inhibiting interactions probability *r*′*s*. In Fig 5(a) and 5(b), we show the semi-logarithmic plots of *avS* (the average number of singleton attractors) as a function of 〈*k*〉 and *r*, respectively. We can find that *avS* decreases extremely fast with the increase of 〈*k*〉 and increases exponentially with the increase of *r*. According to the above observation, these results indicate that less computational time is assumed to find the singleton attractors of the networks with high average degree and less inhibitory interactions.

(a) Semi-logarithmic plot of the *avS* as a function of the average degree 〈*k*〉 for networks with *N* = 50, *r* = 0.4. (b) Semi-logarithmic plot of the *avS* against the inhibiting interactions probability *r* for networks with *N* = 50, 〈*k*〉 = 5. Every data in the plots is averaged over *M* (*M* ≥ 500) samples.

## Finding the pre-images of any target network state

The pre-images are the set of all possible inputs which evolve into a given output. For the strong-inhibition Boolean model, the pre-images of a given state *S*^{0}(*t* + 1) (target state) are the solutions of
(18)
For simplity, we will use *S*_{j} to represent *S*_{j}(*t*). Through analysing this equation, we can still obtain the following rules if ,

**rule 1.1.**if*r*_{ij}= 1, then*S*_{j}= 0;**rule 1.2.**if*r*_{ii}= 1,*g*_{ij0}= 1, ∑_{j ≠ i}(*S*_{j}*r*_{ij}) = 0 and ∑_{j ≠ j0}(*S*_{j}*g*_{ij}) = 0, then*S*_{j0}= 1;**rule 1.3.**if*g*_{ii}= 0,*r*_{ii}= 0, ∑_{j ≠ i}(*S*_{j}*r*_{ij}) = 0 and ∑_{j ≠ i}(*S*_{j}*g*_{ij}) = 0, then*S*_{i}= 1;**rule 1.4.**if*g*_{ii}= 0,*g*_{ij0}= 1, ∑_{j ≠ i}(*S*_{j}*r*_{ij}) = 0, ∑_{j ≠ j0}(*S*_{j}*g*_{ij}) = 0 and*S*_{i}= 0, then*S*_{j0}= 1;**rule 1.5.**if*r*_{ii}= 1 and ∑_{j ≠ i}(*S*_{j}*g*_{ij}) = 0, then contradiction appears.- Some rules are given if ,
**rule 2.1.**if ∑_{j ≠ i}(*S*_{j}*r*_{ij}) = 0 and there is a node*j*_{0}such that*g*_{ij0}= 1, then*S*_{j0}= 0;**rule 2.2.**if*g*_{ii}= 0,*r*_{ii}= 0 and ∑_{j ≠ i}(*S*_{j}*r*_{ij}) = 0, then*S*_{i}= 0;**rule 2.3.**if*g*_{ii}= 1,*r*_{ij0}= 1, and ∑_{j ≠ j0}(*S*_{j}*r*_{ij}) = 0, then*S*_{j0}= 1;**rule 2.4.**if*r*_{ij0}= 1, ∑_{j ≠ i, j ≠ j0}(*S*_{j}*r*_{ij}) = 0 and*g*_{ii}= 1 or there is a node such that , then*S*_{j0}= 1;**rule 2.5.**if*g*_{ii}= 1 and ∑_{j ≠ i}(*S*_{j}*r*_{ij}) = 0, then contradiction appears.

If one observes carefully those rules, we find that the previous algorithm for detecting the singleton attractors can be extended to find the pre-images for any target network state. Here, we just need to input the target state in **Step 1** and replace the rules 1 − 7 with rules 1.1 − 1.5 and 2.1 − 2.5 in **Steps 3** and 4.

Next, we will prove that the states found with this algorithm are precisely all the pre-images of the target network state. Here, we still use *U* and *V* to stand for the set of the states found with this algorithm and the set of all the pre-images of the target network state, respectively. Obviously, any pre-image of *S*^{0}(*t* + 1) must satisfy Eq (18), and it follows certainly all the rules. So *V* is a subset of *U*, namely *V* ⊂ *U*. Therefore, to prove *U* = *V*, we just need to prove *U* ⊂ *V*.

Suppose that *U* is not a subset of *V*, then there must be a state *S*^{0}(*t*) such that *S*^{0}(*t*) ∈ *U* and *S*^{0}(*t*)∉*V*. The state *S*^{0}(*t*) obeys all the rules but does not satisfy Eq (18), namely, there is a node’s state which dissatisfies the equation. We assume that this state is , and we have
(19)
where or 1.

Firstly, assuming and inserting it into Eq (19), we obtain
(20)
This equation indicates
(21)
or
(22)
Through Eq (21), there must be a node *j*_{0} such that and *r*_{ij0} = 1, we can find that it contradicts with the rules 1.1. So it is necessary that , hence we have ∑_{j ≠ i}(*S*_{j}*r*_{ij}) = 0. If Eq (22) holds, one case is , *g*_{ii} = *r*_{ii} = 0 and , it contradicts with the rule 1.3 through ∑_{j ≠ i}(*S*_{j}*r*_{ij}) = 0; the other case is and *r*_{ii} = 1, we can observe that the contradiction appears according to the rule 1.5. Therefore, it is impossible that *S*^{0}(*t*) which obeys all the rules does not satisfy Eq (18), if .

Afterwards, we assume . Inserting it into Eq (19), we obtain
(23)
From this equation, we can get
(24) (25)
The Eq (24) indicates
(26)
And from Eq (25), we obtain
(27)
or
(28)
If Eq (27) works, then there must be a node *j*_{0} such that
(29)
Through Eqs (26) and (29), we can find that it contradicts with the rule 2.1. On the other hand, if Eq (28) is valid, two cases should be discussed: one case is *g*_{ii} = *r*_{ii} = 0 and , it contradicts with the rule 2.2 since Eq (26) holds; the other case is *g*_{ii} = 1 (*r*_{ii} = 0 at this time), combining with Eq (26), one can see that the contradiction appears according to the rule 1.5. In summary, if , it is also impossible that *S*^{0}(*t*) obeys all the rules and dissatisfies Eq (18) at the same time.

These results demonstrate that the state *S*^{0}(*t*), which obeys all the rules but dissatisfies the Eq (18), does not exist. Therefore, *U* is a subset of *V* (*U* ⊂ *V*), and *U* = *V* is proved. Now, we can conclude that the states found with our algorithm are precisely all the pre-images of the target network state.

As an example, we will show that how we find the pre-images of one singleton attractor (0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0) of the cell-cycle network of budding yeast. For this case, *S*^{0}(*t* + 1) = (0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0) in Eq (18). As shown in Fig 6, according to the known network structure and the rules 1.1 − 1.5 and 2.1 − 2.5, the states of many nodes are determined: we obtain *S*_{4} = *S*_{8} = *S*_{10} = 0 based on and the rule 1.1; then, *S*_{1} = 0 and *S*_{2} = 0 are gotten according to and the rules 2.1 and 2.2, respectively; according to and the observation 2.2, we obtain *S*_{3} = 0; according to and the observation 2.1, we obtain *S*_{7} = *S*_{11} = 0; then again according to and the rule 1.3, we obtain *S*_{5} = 1. Now, the remain nodes whose states can not be determined are nodes 6 and 9, so we remember the state *S* = (0, 0, 0, 0, 1, *S*_{6}, 0, 0, *S*_{9}, 0, 0) with *l*_{0} = 2.

For the network state *S* = (0, 0, 0, 0, 1, *S*_{6}, 0, 0, *S*_{9}, 0, 0) with *l*_{0} = 2. We assign *S*_{9} = 1 firstly. However, the state of node 6 can not be determined, and we find that *S*_{6} = 0 and *S*_{6} = 1 both are the solutions of the equations. So we return the pre-images *S* = (0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0) and (0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0). Then, we assign *S*_{9} = 0. According to the rule 1.4, we obtain *S*_{6} = 1 and the pre-image is *S* = (0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0). Finally, we successfully find three pre-images of the target network state *S*^{0}(*t* + 1): *S* = (0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0), (0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0) and (0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0).

We can also find the basin of any singleton attractor with this algorithm by reversely inferring the pre-images step by step: we can obtain the pre-images of the singleton attractor first, then find the pre-images of all these known pre-images, go on until all states of the basin are found. The basin of the singleton attractor (0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0) is displayed hierarchically in Fig 7, where we can clearly see how far a state is from the singleton attractor.

## Conclusion

In summary, we have presented a novel algorithm for finding the singleton attractors in strong-inhibition Boolean networks. The average case time complexity of the proposed algorithm is approximately *O*(1.34^{N}) which is much faster than the enumeration-based algorithm. It may not be faster than the out-degree based ordering algorithm in [30] for networks with very low maximum indegree. However, we find that the computational time assumed of the algorithm is proportional to the number of the singleton attractors, it shows that our algorithm will work much better for networks with less singleton attractors, especially for the networks with high average degree and less inhibitory interactions. What’s more, the algorithm can be extended to identify the pre-images of any network state and the basin of any singleton attractor. Therefore, the proposed algorithm could be effective and practical. We hope it has good applications in the study of biological networks. On the other hand, we can also know that the algorithm has its own limitations. For example, our algorithm completely relies on the strong-inhibition Boolean model, it may not be workable for other kinds of model, such as the general Boolean model. The computational time of the algorithm increases exponentially with the size of network, so it may not be applied to networks with several hundreds or more nodes. Moreover, we didn’t get the theoretical results of the time complexity of the algorithm though we have made great efforts. We hope some of these limitations can be overcome and this work can be further improved in the future.

## Supporting Information

### S1 File. Data and code of the algorithm.

This data set contains the code of the algorithm for finding the singleton attractors and pre-images in strong-inhibition Boolean networks. The adjacency matrices of five classical networks are also given.

https://doi.org/10.1371/journal.pone.0166906.s001

(ZIP)

## Acknowledgments

We thank members in our laboratory for inspiring discussions and helpful comments on earlier versions of the manuscript.

## Author Contributions

**Conceptualization:**MZ ZH.**Methodology:**MZ ZH.**Software:**ZH MZ SL CY.**Writing – original draft:**ZH CY ZF.**Writing – review & editing:**ZH CY ZF.

## References

- 1.
Kauffman SA. The origins of order: self-organization and selection in ecolution. Oxford: Oxford University Press; 1993.
- 2.
Rigoutsos I, Stephanopoulos G. Systems biology: Volume II: networks, models, and applications. Oxford: Oxford University Press; 2007.
- 3.
Alon U. An introduction to system biology: design principles of biological circuits. Chapman & Hall, Boca Raton, FL; 2006.
- 4.
Nicolis G, Prigogine I. Self-organization in nonequilibrium systems, from dissipative structures to order through fluctuations. Wiley, New York; 1977.
- 5. Gillespie DT. A general method for numerically simulating the stochastic time evolution of coupled chemical reactions. Journal of Computational Physics. 1976; 22(4): 403–434.
- 6. Gillespie DT. Exact stochastic simulation of coupled chemical reactions. The Journal of Physical Chemistry. 1977; 81(25): 2340–2361.
- 7. Cai XD and Yuan ZM. Stochastic modeling and simulation of the p53-MDM2/MDMX Loop. Journal of Computational Biology. 2009; 16(7): 917–933. pmid:19580521
- 8. Zhang YP, Qian M, Ouyang Q, Deng M, Li F, Tang C. Stochastic model of yeast cell-cycle network. Physica D. 2006; 219(1): 35–39.
- 9.
Goodwin BC. Temporal organization in cells: a dynamic theory of cellular control. Academic Press, London; 1963.
- 10. Chen KC, Csikász-Nagy A, Gyorffy B, Val J, Novak B, Tyson JJ. Kinetic analysis of a molecular model of the budding yeast cell cycle. Mol. Biol. Cell. 2000; 11(1): 369–391. pmid:10637314
- 11. Novak B, Pataki Z, Ciliberto A, Tyson JJ. Mathematical model of the cell division cycle of fission yeast. Chaos. 2001; 11(1): 277–286. pmid:12779461
- 12. Tyson JJ, Chen KC, Novak B. Network dynamics and cell physiology. Nat. Rev. Mol. Cell Biol. 2001; 2(12): 908–916. pmid:11733770
- 13. Csikász-Nagy A. Computational systems biology of the cell cycle. Brief Bioinform. 2009; 10(4): 424–434. pmid:19270018
- 14. Kauffman SA. Metabolic stability and epigensis in randomly constructed genetic nets. Journal of Theoretical Biology. 1969; 22(3): 437–467. pmid:5803332
- 15. Li FT, Long T, Lu Y, Ouyang Q, Tang C. The yeast cell-cycle network is robustly designed. PNAS. 2004; 101(14): 4781–4786. pmid:15037758
- 16. Bornholdt S. Systems biology: less is more in model large genetic networks. Science. 2005; 310(5747): 449–451. pmid:16239464
- 17. Jong d.H. Modeling and simulation of genetic regulatory systems: a literature review. Journal of Computational Biology. 2002; 9(1): 67–103. pmid:11911796
- 18. Wang GY, Du C, Chen H, Simha R, Rong Y, Xiao Y, Zeng C. Process-based network decomposition reveals backbone motif structure. PNAS. 2010; 107(23): 10478–10483. pmid:20498084
- 19. Xia QZ, Liu LL, Ye WM, Hu G. Inference of gene regulatory networks with the strong-inhibition Boolean model. New Journal of Physics. 2011; 13(8): 083002.
- 20. Wang GY, Rong YW, Chen H, Pearson C, Du CH, Simha R, Zeng C. Process-driven inference of biological network structure: feasibility, minimality, and multiplicity. PLoS ONE. 2012; 7(7): e40330. pmid:22815739
- 21. Huang S. Gene expression profiling, genetic networks and cellular states: an integrating concept for tumorigenesis and drug discovery. Journal of Molecular Medicine. 1999; 77(6): 469–480. pmid:10475062
- 22. Hupp T, Lane D, Ball K. Strategies for manipulating the p53 pathway in the treatment of human cancer. Biochemical Journal. 2000; 352: 1–17. pmid:11062053
- 23. Lane D. Exploiting the p53 pathway for cancer diagnosis and therapy. British Journal of Cancer. 1999; 80: 1–5. pmid:10466753
- 24. Ostergaard S, Olsson L, Johnston M, Nielsen J. Increasing galactose consumption by Saccharomyces cerevisiae through metabolic engineering of the GAL gene regulatory network. Nature biotechnology. 2000; 18(12): 1283–1286. pmid:11101808
- 25. Orlando DA, Lin CY, Bernard A, Wang JY, Socolar JES, Iversen ES, et al. Global control of cell-cycle transcription by coupled CDK and network oscillators. Nature. 2008; 453(7197): 944–947. pmid:18463633
- 26.
Garg A, Xenarios I, Mendoza L, De Micheli G. An efficient method for dynamic analysis of gene regulatory networks and in silico gene perturbation experiments. In Annual International Conference on Research in Computational Molecular Biology. 2007; pp. 62–76.
- 27. Garg A, Di Cara A, Xenarios I, Mendoza L, De Micheli G. Synchronous versus asynchronous modeling of gene regulatory networks. Bioinformatics. 2008; 24(17): 1917–1925. pmid:18614585
- 28. Devloo V, Hansen P, Labbé M. Identification of all steady states in large networks by logical analysis. Bulletin of mathematical biology. 2003; 65(6): 1025–1051. pmid:14607287
- 29. Akutsu T, Kuhara S, Maruyama O, Miyano S. A system for identifying genetic networks from gene expression patterns produced by gene disruptions and overexpressions. Genome Informatics. 1998; 9: 151–160. pmid:11072331
- 30. Zhang SQ, Hayashida M, Akutsu T, Ching WK, Ng MK. Algorithms for finding small attractors in Boolean networks. Eurasip J. Bioinf. Syst. Biol. 2007; 2007(1): 20180. pmid:18253467
- 31. Shlomi T, Berkman O, Ruppin E. Regulatory on/off minimization of metabolic flux changes after genetic perturbations. PNAS. 2005; 102(21): 7695–7700. pmid:15897462
- 32. Ay F, Xu F, Kahveci T. Scalable steady state analysis of Boolean biological regulatory networks. PloS ONE. 2009; 4(12): e7992. pmid:19956604
- 33. Zheng D, Yang G, Li X, Wang Z, Liu F, He L. An efficient algorithm for computing attractors of synchronous and asynchronous Boolean networks. PloS ONE. 2013; 8(4): e60593. pmid:23585840
- 34. Zheng D, Yang G, Li X, Wang Z, Hung WNN. An efficient algorithm for finding attractors in synchronous boolean networks with biochemical applications. Genet. Mol. Res. GMR. 2013; 12(4): 4656–4666. pmid:24222242
- 35. Michele L, Andrea P, Giorgio P, Osvaldo Z. Finite size corrections to random Boolean networks. Journal of Statistical Mechanics: Theory and Experiment. 2006; 2006(12): P10212.
- 36.
Tamyura T, Akutsu T. An
*O*(1.787^{n})-time algorithm for detecting a singleton attractor in a Boolean network consisting of AND/OR nodes. International Symposium on Fundamentals of Computation Theory. 2007; pp. 494–505. - 37.
Melkman AA, Tamura T, Akutsu T. Determining a singleton attractor of an AND/OR Boolean network in
*O*(1.587^{n}) time. Information Processing Letters. 2010; 110(14): 565–569. - 38. Tamyura T, Akutsu T. Algorithms for singleton attractor detection in planar and nonplanar AND/OR Boolean networks. Mathematics in Computer Science. 2009; 2(3): 401–420.
- 39. Akutsu T, Melkman AA, Tamyura T, Yamamoto M. Determining a singleton attractor of a Boolean network with nested canalyzing functions. Journal of Computational Biology. 2011; 18(10): 1275–1290. pmid:21554129
- 40. Melkman AA, Akutsu T. An improved satisfiability algorithm for nested canalyzing functions and its application to determining a singleton attractor of a Boolean network. Journal of Computational Biology. 2013; 20(12): 958–969. pmid:24073923
- 41.
Zou Y. An algorithm for detecting fixed points of Boolean network. ICME International Conference On Complex Medical Engineering, IEEE. 2013; pp. 670–673.
- 42.
Milano M, Roli A. Solving the satisfiability problem through Boolean networks. In Proceedings of the 6th Congress of the Italian Association for Artificial Intelligence on Advances in Artificial Intelligence, vol. 1792 of Lecture Notes in Artificial Intelligence. 1999; pp. 72–83.
- 43.
Wuensche A. The ghost in machine: Basins of attraction of random Boolean networks. Aritifical life III Proceeding, Santa Fe institude Studies in the Science of Complex Addison-Wesley; 1994.
- 44.
Wuensche A, Lesser MJ. The global dynamics of cellular automata: An atlas of basin of attraction fields of one-dimensional cellular automata. Addison-Wesley, Reading, MA; 1992.
- 45. Klotz JG, Bossert M, Schober S. Computing preimages of Boolean networks. BMC Bioinformatics. 2013; 14 (Suppl. 10): S4. pmid:24267277
- 46. Akutsu T, Hayashina M, Zhang SQ, Ching WK, Ng MK. Analyses and algorithms for predecessor and control problems for Boolean networks of bounded indegree. Information and Media Technologies. 2009; 4(2): 338–349.
- 47. Albert R, Othmer HG. The topology of the regulatory interactions predicts the expression pattern of the segment polarity genes in drosophila melanogaster. Journal of Theoretical Biology. 2003; 223(1): 1–18. pmid:12782112
- 48. Tan N, Ouyang Q. Design of a network with state stability. Journal of Theoretical Biology. 2006; 240(4): 592. pmid:16343546
- 49. Fortuna MA, Meli CJ. Do scale-free regulatory networks allow more expression than random ones? Journal of Theoretical Biology. 2007; 247(2): 331–336. pmid:17452043
- 50. Yang LJ, Meng Y, Bao C, Liu W, Ma C, Li A, et al. Robustness and backbone motif of a cancer network regulated by miR-17-92 cluster during the G1/S transition. PloS ONE. 2013; 8(3): e57009. pmid:23469179
- 51. Chaos A, Aldana M, Espinosa-Soto C, de Leon BGP, Arroyo AG, Alvarez-Buylla ER. From genes to flower patterns and evolution: dynamic models of gene regulatory networks. J. Plant Growth Regul. 2006; 25(4): 278–289.
- 52. Luis M, Ioannis X. A method for the generation of standardized qualitative dynamical systems of regulatory networks. Theor. Biol. Med. Model. 2006; 3(1): 13. pmid:16542429
- 53. Klamt S, Saez-Rodriguez J, Lindquist JA, Simeoni L, Gilles ED. A methodology for the structural and functional analysis of signaling and regulatory networks. BMC Bioinformatics. 2006; 7(1): 56. pmid:16464248
- 54. Erdös P, Rényi A. On the evolution of random graphs. Publ. Math. Inst. Hung. Acad. Sci. 1960; 5: 17–61.
- 55. Bornholdt S, Rohlf T. Topological evolution of dynamical networks: global criticality from local dynamics. Phys. Rev. L. 2000; 84(26): 6114–6117. pmid:10991137
- 56. Costanzo MC, Crawford ME, Hirschman JE, Kranz JE, Olsen P, Robertson LS, et al. YPDTM, PombePDTM and WormPDTM: model organism volumes of the BioKnowledge? Library, an integrated resource for protein information. Nucleic. Acida. Research. 2001; 29(1): 75–79. pmid:11125054
- 57. Lee TI, Rinaldi NJ, Robert F, Odom DT, Bar-Joseph Z, Gerber GK, et al. Transcriptional regulatory networks in Saccharomyces cerevisiae. Science. 2002; 298(5594): 799–804. pmid:12399584