Commit 5fbde474 authored by conmccoid's avatar conmccoid

Stoch. Net: New retry section to replace discussion on probability propagation

parent eb28a7ee
......@@ -182,4 +182,98 @@ However, one can represent the negation of a probability $p \in \bbp$ by
where $(\dagger p)^{-1}$ is the multiplicative inverse of $\dagger p$ and $\dagger 1/2 = -1$.
We are concerned with the propagation of probability over time through a stochastic network.
First we must define the stochastic network we are using.
The network changes over time.
While the set of nodes $\mathcal{N} = \set{1,...,N}$ remains constant, the set of weighted edges $\mathcal{E}(t) = \Set{(i,j,w)}{i,j \in \mathcal{N}}$ is measured during each time frame.
Each edge may be represented by a single number $b_{i,j}(t) \in \bbp$, indicating the probability of passing the infected condition from node $i$ to node $j$, or vice versa.
A value of zero indicates no edge between the two nodes.
The network at time $t$ is then defined by the symmetric matrix
B(t) = \begin{pmatrix} 1 & b_{1,2}(t) & \dots & b_{1,N}(t) \\ b_{1,2}(t) & 1 & & \vdots \\ \vdots & & \ddots & b_{N-1,N}(t) \\ b_{1,N}(t) & \dots & b_{N-1,N}(t) & 1 \end{pmatrix} .
Note that the diagonal elements are specified by the model.
In our case, we suppose that an infected node remains infected.
The time frames are discrete units, and so the variable $t$ is a natural number.
The network is then a matrix-valued single variable function, $B: \bbn \to \bbp^{N \times N}$.
The probability that node $i$ is infected at time $t$ is represented by $p_i(t)$, with $p_i: \bbn \to \bbp^N$.
The probability vector for the network is then the vector of these numbers:
\vec{P}(t) = \begin{pmatrix} p_1(t) \\ \vdots \\ p_N(t) \end{pmatrix} .
Consider the probability of node $i$ being infected at time $t+1$.
There are a number of possible ways for the node to have the infection.
Chiefly, it can have been infected at a previous time ($p_i(t)$).
Secondly, it can be infected during time frame $t$ by node $j$ ($b_{i,j}(t) p_j(t)$).
As there are $N$ nodes in the network, there are $N$ possible ways of being infected.
Naturally, $p_i(t)$ is the negation of the probability that none of the ways have occured:
p_i(t) = 1 - \prod_{j =1}^N (1 - b_{i,j}(t) p_j(t)).
This may also be represented by a probsum, and defines an inner product:
p_i(t) = b_{i,1}(t) p_1(t) \lor \dots \lor b_{i,N}(t) p_N(t) =\vec{b}_i(t)^\top \vec{P}(t).
The values of $\vec{P}(t+1)$ can be written as
\vec{P}(t+1) = \begin{pmatrix} \vec{b}_1(t)^\top \vec{P}(t) \\ \vdots \\ \vec{b}_N(t)^\top \vec{P}(t) \end{pmatrix} .
This helps define a new matrix-vector product, represented by $\otimes : \bbp^{N \times N} \times \bbp^N \to \bbp^N$.
This product simplifies the notation on the propagation of probability through the network:
B(t) \otimes \vec{P}(t) = \begin{pmatrix} \vec{b}_1(t)^\top \\ \vdots \\ \vec{b}_N(t)^\top \end{pmatrix} \otimes \vec{P}(t) = \begin{pmatrix} \vec{b}_1(t)^\top \vec{P}(t) \\ \vdots \\ \vec{b}_N(t)^\top \vec{P}(t) \end{pmatrix} = \vec{P}(t+1) .
\subsection{Results of testing}
Suppose at time $t$ that node $i$ is tested for infection.
We suppose that this test is perfect.
The question then is what effect does this test have on the probabilities of the network.
For this, we use Bayes' formula.
Consider an event $A$ and a second event $B$ that has some dependence on event $A$.
The probability that event $A$ occured given that event $B$ occurs is given by
P(A | B) = \frac{P(B | A) P(A)}{P(B)} .
Let $p_j^*(t_0)$ represent the probability that node $j$ is infected at time $t_0$ after it becomes known that node $i$ is infected at time $t$.
By Bayes' formula, this number is equal to
p_j^*(t_0) = \frac{p_j(t_0)}{p_i(t)} P( i(t) | j(t_0)) .
The last term, the probability that node $i$ is infected at time $t$ given that $j$ is infected at time $t_0$, is found by supposing that $p_j(t_0) = 1$ and propagating this information through the network to time $t$.
Since our model assumes persistence of the virus, $P(i(t) | i(t_0)) = 1$ and $p_i^*(t_0) = p_i(t_0) / p_i(t)$.
In theory, only those paths dictated by $B(t)$ that connect nodes $i$ and $j$ need be considered, but the selection of these paths may prove more computationally expensive than the use of the $\otimes$ operator.
However, this must be done for all time frames and all nodes not equal to $i$.
In applications, it will likely be necessary to consider only recent time frames and short paths.
% is there a matrix operation to propagate certainty backwards as there is for uncertainty forwards?
In the case of a single time frame (ignoring propagating the new probabilities forward, which I don't think apply) the value of $p_j^*(t-1)$ may be expressed as
p_j^*(t-1) & = \frac{p_j(t-1)}{p_i(t)} \vec{b}_i (t-1)^\top \begin{pmatrix} p_1(t-1) \\ \vdots \\ 1 \\ \vdots \\ p_N(t-1) \end{pmatrix} \\
& = \frac{p_j(t-1)}{p_i(t)} \vec{b}_i^\top(t-1) \vec{P}_j^*(t-1) \\
& = \frac{p_j(t-1)}{p_i(t)} \left ( p_i(t) \lor \dagger ( b_{i,j}(t-1) p_j(t-1) ) \lor b_{i,j}(t-1) \right ).
The vector on the second line, $\vec{P}_j^*(t-1)$, is equal to the vector $\vec{P}(t-1)$ with the $j$--th element replaced by 1.
The third line indicates that $p_j^*(t-1)$ may be found by removing the probability created by $p_j(t-1)$ on $p_i(t)$ and replacing it with that created by an infected node $j$ at time $t-1$.
This model includes the possibility of self-infection through loops in the network.
If node $i$ has a probability of infection then this probability may spread to node $j$.
If node $j$ comes into contact with node $i$, some of the probability it transfers will have originated in $i$.
Ideally, the propagation of probability would work only on loop-erased random walks or self-avoiding walks (not sure which).
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment