CS 297: Complex Systems
Assignment 2: Boolean Networks
In this assignment, you will simulate boolean networks and evaluate
the results. To start, let's first review boolean networks:
With this background, let's focus on the assignment.
We will study binary boolean networks characterized by
three parameters p, q and r that we will define
below. Your goal is to compute L and A
for randomly generated networks and study the effect
of varying the network parameters p, q and r.
We will next explain the parameter p, which
is going to govern network structure:
- You will start with the so-called ring binary network.
In this network, each node i (among nodes
0, ..., n-1) has precisely two incoming
edges from nodes i-1 and i-2. Note that for node 1, one
of the neighbors will be node n-1, and node 0 will have
neighbors n-1 and n-2.
At this point, each node has exactly two incoming edges and exactly
two outgoing edges.
- Given the starting "ring" configuration, we will repeatedly re-wire
the network as follows. Consider each node in turn. Choose the
edge that comes from the numerically farther node and toss
a p-biased coin (one that shows heads with probability
p). If you get heads, replace this incoming neighbor
with another one chosen randomly from any of the other nodes.
If this is done in turn for every node, then there will be
some re-wiring of the network depending on how large
p is. Note that this is very similar to the re-wiring
model used by Watts and Strogatz in creating small-world graphs.
- Thus, the parameter p determines how "random" the
the network structure is. For p = 0, there is no
change; for p = 1, there is a lot of re-wiring.
For small values of p, we'll get some re-wiring.
Indeed, some values of p should give the "smallworld"
structure.
Now, let's consider the the Boolean functions
at each node:
- To determine the Boolean function at a node, we will randomly
assign one of three functions AND, OR or XOR to the nodes. Let
q denote the probability that a node is assigned the Boolean
function AND. Let r denote the probability that a node
is assigned the Boolean function OR. Therefore, 1-q-r is the
probability that it is assigned XOR. Stated differently, the
triple (p, q, 1-p-q) determines the distribution
of these functions.
- Consider the following cases:
- (1,0,0). All nodes use the AND function.
- (0,1,0). All nodes use the OR function.
- (0,0,1). All nodes use the XOR function.
- (1/3, 1/3, 1/3). Equally likely between the three.
- Explore some other combinations.
For each of the cases above, obtain the measures for 8-node and
10-node graphs. If you have time, you can try more nodes.
The goal is to see whether which parameter
combinations result in interesting behavior.
Finally, let's consider some implementation issues:
- At first this will seem like a very long assignment. But upon
some reflection, we will see that it's actually quite straightforward.
- First consider the representation of the network graph.
This is easily represented by a binary matrix where the entry
i,j is 1 if there is a directed edge from node i
to node j.
- The network state can be represented in a 1-D array.
- The Boolean function for each node, can be recorded in
an array as well.
- Once the network structure
and Boolean functions are known,
the next state function is easy to compute.
- It is easy to generate all possible network states
(You will need to think about how to represent this).
- For each network state, you can compute the length
measure. As you go along, you can track the point attractors
and the number of leaf nodes (G).