4

Consider two sites, linked as sketched

enter image description here

Initially, both sites are off (red). However, each activates (turns green) at a constant rate $f$. Once activated, a site remains activated. If one activates, it generates an activation wave (green line) which propagates at speed $v$ (given as the number of sites per time unit), as shown

enter image description here

Then, one of two things can happen: either the wave activates the neighboring site, provided it has not been activated yet, or the site activates on its own

enter image description here

How do we calculate the expected time it takes for one site to activate? In other words, what is the expected waiting time on one site? If there was only one site, the answer would simply be $1/f$, but I am struggling to frame the two (and possible $n$-case) scenario. Any suggestions?

My attempt: Given a time interval $dt$, the probability $P_f$ that one site is activated, within $dt$, on its own is simply $fdt$. However, the probability $P$ that a site is activated within $dt$ is given by $$ \begin{align} P(dt)=&P_1(\text{"site activates autonomously, given the wave didn't reach it within }dt\text{"})\\ &+P_2(\text{"wave activates the site, given it wasn't autonomously activated within }dt\text{"}) \end{align} $$ However, it seems relatively tricky to write these expressions. Intuitively, I would expect something like $$ P_1(t)=1-e^{-ft/v} $$ for example, but I have no particular motivation for this choice. It simply satisfies some expected asymptotics. Any ideas? Perhaps an approach based on first-hitting time analysis?

sam wolfe
  • 3,465
  • Do you just want the two node case? For that it is pretty painless: the first activation $X_1$ is exponential with rate $2f$, while the second activation $X_2$ is the minimum of $X_1$ plus an independent exponential with rate $f$ and $X_1+1/v$. This is the time for both states to activate; the law of the time for a specific state to activate is the average of the laws of $X_1$ and $X_2$, since it is equally likely that either state activated first. – Ian Jan 24 '23 at 19:31
  • With more than two nodes, I think this question is underspecified, though in your other question it seems that your interest is in bidirectional propagation of the signal between equally spaced nodes on a ring, which is well-defined but seems very unpleasant to work with in this way. – Ian Jan 24 '23 at 19:32
  • @Ian I was looking for something to start with (the case $n=2$ seemed reasonable enough), but yes, the long-term goal would be to answer the other question. I might not be approaching that problem in the best way (not too familiar with this field), but I would like to understand what the best approach would be and, naturally, if there is any hope of finding a closed formula for the expected time (dependent on $f,v$ and $n$) – sam wolfe Jan 24 '23 at 19:50
  • @Ian Also, please note that each site has the potential to generate that wave (a bidirectional case), but I have just sketched the case where the left one activates first. Please see the new sketch of the third picture, to make it clear – sam wolfe Jan 24 '23 at 19:54
  • Yes, I took that into account in my characterization for the two-node case (which you can manipulate to get the expectation). But the multi-node case is significantly more complicated in terms of keeping track of all the various waves moving around. – Ian Jan 24 '23 at 20:05
  • To be specific the expectation in the two node case is $\frac{1}{2} \frac{1}{2f} + \frac{1}{2} \left ( \frac{1}{2f} + \int_0^{1/v} f t e^{-ft} dt + (1/v) \int_{1/v}^\infty f e^{-ft} dt \right )$. So I guess this is $1/f - e^{-f/v}/(2f)$, which has the expected asymptotic behavior of tending to $1/(2f)$ as $f/v \to 0$ and to $1/f$ as $f/v \to \infty$. – Ian Jan 24 '23 at 20:20
  • @Ian That is quite interesting. Could you provide me with a reference to understand that expression a bit better? Would be great if you could expand it on an answer, as I am struggling to understand some of the terms. Regarding the general case, I totally understand, as there is the effect of "wave replacement" if they cross each other. I somewhat expect it to be achievable, but quite complicated indeed – sam wolfe Jan 24 '23 at 20:23
  • You just turn the crank with the description I gave in the first comment: the law of the activation time for a specific node is the average of the law of an exponential with rate $2f$ and the law of (an exponential with rate $2f$ plus (the minimum of $1/v$ and an exponential with rate $f$)). That averaging is taking into account that the first term applies when the node was the first to activate and the second term applies when the other node activated first. So you get the expectation as the average of those two expectations. – Ian Jan 24 '23 at 20:26
  • I think with three states you can do essentially the same thing because all three states are equidistant and all waves propagate at the same speed (thus the second wave, if it appears, doesn't matter, because the first wave will reach the node first anyway). But already with four states you have complexities with colliding waves to juggle. – Ian Jan 24 '23 at 20:27
  • There are two extreme cases with simple limiting behaviour. If $v\approx0$, then we can expect all nodes to self-activate before any wave comes in, i.e., every node follows a straightforward exponential distribution. At the other extreme, if $v\approx \infty$, the first node to self-activate will “immediately” activate all others (assuming a connected graph), so we are dealing with an exponential distribution again, but with $\lamda$ smaller by a factor of $n$. - An exact treatment for the intermediate case where self-activation and propagation are roughly of equal importance, may be harder.. – Hagen von Eitzen Jan 26 '23 at 04:11
  • … for an approximation we may try to assume that the nodes ultimately follow some exponential distribution, compute the probability that an edge is irrelevant because both ends activate faster than the propagation time by said distribution, use this to estimate the sizes of remaining graph components, and then the the infinite-speed approximation for such a component should match the modified exponential we started with — this is quite a load of intertwined approximations! – Hagen von Eitzen Jan 26 '23 at 04:45

1 Answers1

1

This analysis in the top part of the answer is correct but inefficient; I include it so that comments continue to make sense. See below the line for a better approach.

In the below I use the convention that Exp($\lambda$) means the exponential distribution with rate $\lambda$.

The two node case can be analyzed like this: first nothing is happening, then after a time with Exp($2f$) distribution, one node is activated. With probability $1/2$, that node was the one of interest, so we stop. With probability $1/2$, the other node was the one of interest, so now after an additional time $1/v$ we will stop. However, we can stop before that if the node just activates itself, which will happen after a time with Exp($f)$ distribution after the first activation. (Here I have exploited the memoryless property of the exponential distribution.)

So using the total expectation formula, conditioning on which state activates first, gives the following.

$$E[T]=\frac{1}{2} \frac{1}{2f} + \frac{1}{2} \left ( \frac{1}{2f} + \int_0^\infty \min \{ t,1/v \} f e^{-ft} dt \right ) \\ = \frac{1}{2f} + \frac{1}{2} \left ( \int_0^{1/v} t f e^{-ft} dt + \int_{1/v}^\infty (f/v) e^{-ft} dt \right ) \\ = \frac{1}{f} \left ( 1 - \frac{1}{2} e^{-f/v} \right ).$$

In the three nodes equally spaced on a ring case, everything is almost the same because a second wave will always reach our node after the first wave does. So you get

$$E[T]=\frac{1}{3} \frac{1}{3f} + \frac{2}{3} \left ( \frac{1}{3f} + \int_0^\infty \min \{ t,1/v \} f e^{-ft} dt \right ) \\ = \frac{1}{3f} + \frac{2}{3} \left ( \int_0^{1/v} t f e^{-ft} dt + \int_{1/v}^\infty (f/v) e^{-ft} dt \right ) \\ = \frac{1}{f} \left ( 1 - \frac{2}{3} e^{-f/v} \right ).$$

We see a pattern in these formulae, but unfortunately this pattern corresponds to a star-shaped network of nodes ($n-1$ nodes connected to our node of interest in the center) rather than to a ring of nodes. A larger ring of nodes is more complicated because there are more categories of nodes. For four, there are three categories of nodes: the node of interest, the two neighboring nodes, and the node on the opposite side. So you get a schematic like

$$E[T]=\frac{1}{4} E[T \mid \text{ node of interest activates first }] + \frac{1}{2} E[T \mid \text{ neighboring node activates first }] + \frac{1}{4} E[T \mid \text{ opposite node activates first }].$$

That last term is now more complicated, because it could happen that our node activates itself, or that a neighboring node activates itself before time $1/v$ and then the wave reaches our node in time $1/v$ after that, or that no further self-activations occur and our node activates in time $2/v$ after the first activation.


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 $\tilde{T}=fT$ and $\tilde{t}=ft$, then abuse notation by dropping tildes in the analysis. Next introduce $\tilde{v}=v/f$, $s=1/\tilde{v}$, then again abuse notation by dropping tildes in the analysis.

We can think of $T$ as an explicit function of the node self-activation times $A_i$. For ease of notation, I will index the nodes so that their distance from the node of interest is $|i|$. In the ring network you then 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, and each integrand is of the form $ae^{-bt}$, so you can evaluate them analytically and sum them.

A few particular cases:

  • Two nodes:

$$E[T]=\int_0^s e^{-t} dt + \int_s^\infty e^{-2t+s} dt.$$

  • Three nodes:

$$E[T]=\int_0^s e^{-t} dt + \int_s^\infty e^{-3t+2s} dt.$$

  • Four nodes:

$$E[T]=\int_0^s e^{-t} dt + \int_s^{2s} e^{-3t+2s} dt + \int_{2s}^\infty e^{-4t+4s} dt.$$

Now for the general case. 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. In addition, 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.$$

(The last term is just the $k=(n-1)/2$ term of the sum but with the upper limit replaced by $\infty$.)

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}.$$

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.$$

Ian
  • 104,572
  • Thank you for the answer. I have three questions: 1. Why did you assume time had a distribution $\text{Exp}(2f)$, where does the $2$ come from? 2. If $v=0$, I would expect $E[T]=1/f$, which is not consistent with the answer (unless you take the limit $v\to 0$). Could you clarify? 3. Why do we need to take the probability of selecting one of interest, since the problem is symmetric? – sam wolfe Jan 25 '23 at 11:22
  • 1
    @samwolfe 1. The time to the first activation is the minimum of two independent Exp($f$) variables, which is Exp($2f$) distributed. (This is one of many very convenient things about the exponential distribution.) 2. With $v=0$, of course the time to activation of any specific node is just Exp($f$) distributed and none of the other nodes matter at all. As for how that's consistent with this analysis, when $v=0$ there is no need to split the integral, so you just take the first integral with upper limit $\infty$, and you recover the same result as the limit with $v \to 0$, namely $1/f$. – Ian Jan 25 '23 at 11:51
  • @samwolfe 3. I analyzed the time until any particular node becomes activated. Which node I picked doesn't matter, they all work the same, but once I have picked it, it matters how far the node that activated first is from the node that I arbitrarily selected at the start. Did you want to examine some other random time instead? – Ian Jan 25 '23 at 11:51
  • @samwolfe I figured out a more elementary way to do the analysis that also handles the larger problem more easily as well. I'll post it later when I have time. – Ian Jan 25 '23 at 12:17
  • thank you so much for the clarifications. I will take a deeper look. I wonder, in the general case and from a probabilistic perspective, if somewhat making the assumption of only one possible activating wave simplifies the problem to an extent that we can extrapolate a general solution. This seems "somewhat feasible". Nonetheless, I would hope to avoid writing nested conditional probabilities or falling into a recursive argument, so I am looking forward to hearing about your approach. – sam wolfe Jan 25 '23 at 13:16
  • @samwolfe See the addition to the answer below the line. – Ian Jan 25 '23 at 15:30
  • What a brilliant and elegant answer. You actually answered the general question. Thank you so much! I feel now the cases where there are passive nodes ($n\neq m$ in the other question) and the non-periodic case should be fairly straightforward given your approach. – sam wolfe Jan 25 '23 at 23:10
  • if you would like to post this answer in the general question, I would be happy to award you the bounty associated with that one. Let me know! – sam wolfe Jan 26 '23 at 13:21