6

Suppose we have $n$ sites and, within those sites, $m$ equally spaced positions, so that $2$ of those $m$ positions are in the extremities of the $n$ points. For $n=10$, for example, there are only the possibilities, $m=2$, $m=4$ and $m=10$, as sketched:

enter image description here

Now, assume each site in red activates at a rate $f$, after which it triggers an activation wave that propagates in both direction at a speed $v$, activating neighboring sites, as shown

enter image description here

Once a site is activated, it remains so. Note that dormant (unactivated) red sites can become activated from neighbouring activating waves.

My question is: how can I calculate the expected time it takes for a site (red or black) to be activated? In other words: how long, on average, does one site stay unactivated.

I understand if this problem becomes easier if we consider $n=m$ and/or a ring (periodic case), but I would just like to know where to start and how to think about a problem like this.

My attempt: It seems that, as a starting point, might be easier to consider the ring with $m=n$

enter image description here

To calculate the expected time it takes for a site to be activated, we can use a first-passage time analysis. This involves determining the probability that a site remains unactivated up to a certain time, and then taking the inverse of that probability.

Let's denote the probability that a site remains unactivated at time $t$ as $P(t)$. The rate at which a site becomes activated is equal to the rate of activation $f$ plus the rate at which an activation wave reaches it, which is equal to the product of the rate at which the neighboring site is activated ($f$) and the probability that the activation wave reaches the site before it has already been activated $(1-P(t-v/n))$. Therefore, we can write the following differential equation for $P(t)$ $$ \frac{dP(t)}{dt}=-f(1-P(t-v/n))-f $$ To solve this equation, we can use the initial condition $P(0) = 1$ (since all sites start unactivated) and the boundary condition $P(t) = 0$ for $t\geq T$ (where T is the maximum time we are interested in).

Once we have solved for $P(t)$, we can find the expected time for a site to be activated by taking the inverse of the probability that the site remains unactivated at time t. This can be found by the formula $E[T] = -1/P'(0)$.

This seems relatively correct, although I am not too sure whether the differential equation is quite correct, as the rate of wave activation should include other potential sites (rather than just immediate neighbours). Perhaps consider a sum of the form $2\sum_j^{\lfloor{n/2}\rfloor}P(t-v|i-j|/n)$, for a focal site $i$? Somewhat I feel the answer should be simpler, but I might be wrong. Any ideas?

sam wolfe
  • 3,465

1 Answers1

3

I posted this already on a question about a smaller problem, but I am posting it here because it did resolve the general question.

First let me write out the nondimensionalization in this method. Let $T$ be the time to activation of our node of interest, let $t$ denote time as a variable, then introduce $\tilde{T}=fT$ and $\tilde{t}=ft$. Next introduce $\tilde{v}=v/f$, $s=1/\tilde{v}$. Throughout I will abuse notation by dropping tildes in the analysis.

The idea is to think of $T$ as an explicit function of the times the nodes would take to activate themselves if they were isolated. Let's call the self-activation time for node $i$ $A_i$. For ease of notation, I will index the nodes so that their distance from the node of interest is $|i|$ (thus there are nodes with negative index and nodes with positive index). In the ring network with all the nodes able to be activated, you have

$$T=\min_i \{ A_i + |i| s \}$$

since it takes time $|i| s$ for a wave from node $i$ to reach our node of interest. Note that in the ring network, the fact that the wave activates other nodes along the way does not matter.

This minimum is greater than some $t$ if all its components are, which occurs with probability

$$P(T>t)=\prod_i P(A_i>t-|i| s)=\prod_i \min \{ 1,\exp(-(t-|i| s)) \}.$$

So the expectation of the activation time for any one node is given as $E[T]=\int_0^\infty P(T>t) dt=\int_0^\infty \prod_i \min \{ 1,\exp(-(t-|i| s)) \} dt$. This integral can be split up at $s,2s,\dots,\lceil (n-1)/2 \rceil s$ for $n$ nodes, thus all the integrals can be done analytically.

The situation is slightly different between $n$ odd and $n$ even. When $n$ is odd, for each $k$, there are $2$ nodes at a distance of $k=1,2,\dots,(n-1)/2$ from the node of interest, for a total of $2k+1$ nodes at a distance of at most $k$. Additionally, we need to add up the distances up to $k$, each twice, which add up to $k(k+1)$. So we get

$$E[T]=\int_0^s e^{-t} dt + \sum_{k=1}^{(n-3)/2} \int_{ks}^{(k+1)s} e^{-(2k+1)t + k(k+1)s} dt + \int_{(n-1) s/2}^\infty e^{-nt+(n-1)(n+1) s /4} dt.$$

Doing the integrals yields:

$$E[T]=1-e^{-s} + \sum_{k=1}^{(n-3)/2} \frac{e^{-k^2 s}-e^{-(k+1)^2 s}}{2k+1} + \frac{e^{-(n-1)^2 s/4}}{n}.$$

Note that this formula works when $n=3$ with the sum understood as empty and thus zero. However, I don't see how to make it work when $n=1$.

When $n$ is even, for each $k$ there are $2$ nodes at a distance of $k=1,2,\dots,(n-2)/2$, and then there is $1$ node at a distance of $n/2$. Again we add up the distances, each twice, which add up to $k(k+1)$, but since there is only one node at a distance of $n/2$, the very last distance sum is $2+4+\dots+n-2+n/2=n(n-2)/4+n/2=n^2/4$. So we get

$$E[T]=\int_0^s e^{-t} dt + \sum_{k=1}^{(n-2)/2} \int_{ks}^{(k+1)s} e^{-(2k+1)t + k(k+1)s} dt + \int_{ns/2}^\infty e^{-nt+n^2s/4} dt.$$

Doing the integrals yields

$$E[T]=1-e^{-s} + \sum_{k=1}^{(n-2)/2} \frac{e^{-k^2 s}-e^{-(k+1)^2 s}}{2k+1} + \frac{e^{-n^2 s/4}}{n}.$$

Again this formula works when $n=2$ with the sum understood as empty and thus zero.

Reverting the change of variables, a general expression for any $n$ can be written as $$ E[T]=\frac1f\left[\sum_{k=0}^{\lceil(n-3)/2\rceil} \frac{e^{-fk^2 /v}-e^{-f(k+1)^2 /v}}{2k+1} + \frac{e^{-f(\lceil(n-1)/2\rceil)^2 /v}}{n}\right] $$ In particular, $E[T]=\frac1f$ for $n=1$.

Ian
  • 104,572
  • Thank you! I have added a possible general representation of the final answer. Let me know if you agree and I will accept the answer. – sam wolfe Jan 26 '23 at 16:02
  • @samwolfe That's a really nice representation of both cases and appears to be correct either way. – Ian Jan 26 '23 at 16:51
  • I have asked a follow-up question to this one, regarding non-constant activation rates $f_i$. Could you please take a look? Thank you – sam wolfe Feb 27 '23 at 17:42
  • I am attempting the general case of varying activation rates in this question. Let me know if you are interested in joining the discussion. Thanks! – sam wolfe Jul 04 '23 at 18:32
  • Hi @Ian, I have been revisiting this question, and I was wondering if anything could be said if we consider the time of passive activation, at each step, to be itself an exponentially distributed random variables, say $Y_i=\text{Exp}(v), \forall i$, so that, over $|i|$ steps, one would get $F_{|i|}\equiv \sum_i Y_i \sim \text{Erlang}(|i|,v)$. Notice that $E[F_{|i|}]=|i|/v$, which would collapse to your derivation. However I am having a hard time defining $T$ in this case, since I might be missing conditionality. $T=\min_i {A_i+F_{|i|}}$ can't be correct, right? – sam wolfe Sep 25 '24 at 18:47
  • @samwolfe Can you explain more clearly what modeling changes you are making to this setup? – Ian Sep 25 '24 at 21:55
  • Essentially, once a site is activated after time $A_i\sim \text{Exp}(f)$, it triggers two activation waves in both directions, as previously described. Now, instead of assuming these move at constant speed, we assume the time it takes each site to be passively activated by this wave is $Y_i\sim \text{Exp}(v)$, so that the time it takes for a wave to activate $k$ sites is $F_{k}=\sum_y Y_i\sim \text{Erlang}(k,v)$. With this approach, how is $T$ defined? In some way, I speed is no longer constant, but the rates of this passive times is ($v$). Notice also that $E[F_k]=k/v$. Is this clear? – sam wolfe Sep 26 '24 at 09:22
  • @samwolfe Not really. So each node has an exponential self-activation time. A node that has been hit by a wave switches to a presumably faster exponential self-activation time. Does it get even faster if it has been hit by multiple waves? – Ian Sep 26 '24 at 13:56
  • Only the first time its activated matters, either by activating on its own, or if a wave hits it. Once activated, it stays activated. At most it can be activated by two waves simultaneously (left and right), but I would argue that case has probability close to, if not, zero. In the constant wave speed case, waves could not "overlap", so this new case is a bit less obvious. I am wondering if we can still formulate $T$ without imposing too many conditions. Does that make sense? – sam wolfe Sep 26 '24 at 14:27
  • I was generally thinking about a geometrical argument, something along the following lines (assume waves coming from the left): $T=A_k+\sum_{i=1}^k Y_i$, for the first $k\geq 0$ such that $A_k<A_{k+1}+Y_{k+1}$. But I realized we might be missing a $k'>k+1$ that has a smaller time to reach the focal $i=0$. Perhaps taking the minimum of all the cases that satisfy $A_k<A_{k+1}+Y_{k+1}$? This argument essentially means that a fork coming from a $k+1$ position does not reach the site at $k$ in less that the activation time at $k$, so therefore the site $k$ must itself be an activation origin. – sam wolfe Sep 26 '24 at 14:27
  • @samwolfe I am still struggling with the modeling setup. You have a bunch of nodes, say in a ring. Each one has its own exponential clock, say Exp($\lambda$). One activates. Now that node's wave hits another node (I'll disregard whether there's a propagation time for right now). Now what is different about the node that was hit from before it was hit? – Ian Sep 26 '24 at 16:03
  • Check this sketch. The black line represents $T$ in both cases, for a single simulation. The constant case (left) is the one you solved here. Black dots above this line are all passively activated. I am asking about what we can say about $T$ in the case where the time between each wave step is also exponential (and over $k$ steps, Erlang). I ultimately expect the expected value to be the same in either case, because the expected value of an Erlang distribution is precisely, which is what we use in the constant case. – sam wolfe Sep 26 '24 at 16:35
  • This new case is more nuanced. For example, here, the right site activates on its own, and passively activates the site on the right, so any wave coming from the left site should be disregarded once this happens, so $T$ (black line) further to the left would not be the minimum in that interval. This does not happen in the constant case, as all "lines" have the same slope. On average, however, I expect this issue to be automatically sorted, since the rate $v$ is constant. I am trying to show that the expectation is the same, though formulating $T$ seems harder? – sam wolfe Sep 26 '24 at 16:45
  • One could theoretically define a set of indexes ${j}$ corresponding to the increasing order of ${A_j}$. At each $j$, update the index list by removing all indexes $k$ such that $A_k$ is above the generated path by $A_j$ (and remove corresponding generating paths). Like a light-cone. Keep doing this until we have no indexes, then define the minimum of all remaining paths at each site. Essentially we keep only the sites that fire on their own. I think this works, but unsure whether there is an obvious way of defining the random variable. Happy to move to chat. – sam wolfe Sep 26 '24 at 16:57
  • So I am picking this up: each node generates a wave and becomes activated at rate $v_1$. Once that happens, the wave teleports in all (?) directions from that self-activated node, then stays at the first node that it hits for Exp($v_2$) time, before continuing. In the meantime, more self-activations can be occurring. Do I have it straight now? This seems like the only way that the waiting times actually get added up. – Ian Sep 26 '24 at 21:31
  • Yes, that is precisely it! – sam wolfe Sep 27 '24 at 09:21
  • @samwolfe Can you throw up another question and we can talk there, now that I understand the rules of the new problem? – Ian Sep 27 '24 at 16:14
  • Yes, happy to do that. – sam wolfe Sep 27 '24 at 16:22
  • Here you go. I have added a few thoughts, perhaps some could help finding the solution, thought what I am really interested in is understanding that we should expect the same behaviour (on average), in the case of exponentially distributed step-wave times. Thanks! – sam wolfe Sep 27 '24 at 17:04