Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Assuming each node has a constant, known and independent availability rate, A divide and conquer approach come to mind.</p> <p>Say you have <code>N</code> nodes.</p> <ol> <li>Split them into two sets of <code>N/2</code> nodes.</li> <li>For each side, compute the probability that any number of nodes (<code>[0,N/2]</code>) are down.</li> <li>Multiply and sum these as needed to find the probability that any number (<code>[0,N]</code>) of the full set is down.</li> </ol> <p>Step 2 can be done recursively and at the top level you can sum as need to find how often more than some number are down.</p> <p>I don't know the complexity of this but if I has to guess, I'd say at or below <code>O(n^2 log n)</code></p> <hr> <p>The mechanics of this can be illustrated on a terminal case. Say we have 5 nodes with up times <img src="https://chart.apis.google.com/chart?cht=tx&amp;chl=p_1...p_5" alt="p1...p5">. We can split this into segments <code>A</code> with<img src="https://chart.apis.google.com/chart?cht=tx&amp;chl=p_1...p_2" alt="p1...p2"> and <code>B</code> with <img src="https://chart.apis.google.com/chart?cht=tx&amp;chl=p_2...p_6" alt="p3...p5">. We then can process these to find the "N nodes up" times for each segment:</p> <p>For A:</p> <p><img src="https://chart.apis.google.com/chart?cht=tx&amp;chl=a_2=p_1p_2" alt="a_2"></p> <p><img src="https://chart.apis.google.com/chart?cht=tx&amp;chl=a_1=p_1(1-p_2)%2b(1-p_1)p_2" alt="a_1"></p> <p><img src="https://chart.apis.google.com/chart?cht=tx&amp;chl=a_0=%281-p_1)%281-p_2)" alt="a_0"></p> <p>For B:</p> <p><img src="https://chart.apis.google.com/chart?cht=tx&amp;chl=b_2=p_3p_4p_5" alt="b_3"></p> <p><img src="https://chart.apis.google.com/chart?cht=tx&amp;chl=b_2..b_0" alt="b_2"></p> <p>The final results for this stage can be found by multiplying each of the <code>a</code>'s with each of the <code>b</code>'s and summing appropriately.</p> <pre><code>v[0] = a[0]*b[0] v[1] = a[1]*b[0] + a[0]*b[1] v[2] = a[2]*b[0] + a[1]*b[1] + a[0]*b[2] v[3] = a[2]*b[1] + a[1]*b[2] + a[0]*b[3] v[4] = a[2]*b[2] + a[1]*b[3] v[5] = a[2]*b[3] </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. CO1) How can you generalize this approach to the case of distinct failure probabilities? Example for `N=20`: If the probabilities that the three nodes N2, N3 and N7 are down is different from N1, N4 and N5 you still have complexity `O(2^N)` since you need to take into account all those distinct cases. 2) How can you generalize this approach to the case of node correlations? I.e., if a failure of node No. 2 results in a failure of nodes [N/2-1,...,N]? Such a non-locality cannot be handled efficiently in a recursive algorithm.
      singulars
    2. COYour example case for A contains four terms, corresponding to a combination of four different cases leading to three possible outcomes. Complexity is thus `2^2=4`. Case B corresponds to four possible outcomes; had you explicitly written it down you would have b0, b1, b2, b3 with altogether `2^3=8` individual terms, each representing one of those eight cases. "Multiplying each of the `a`'s with each of the `b`'s and summing appropriately" generates six possible outcomes with altogether `2^5=32` terms. Thus, the complexity of your proposal is identical to the one in the original question.
      singulars
    3. CO@user8472: Multiplying each of the `a`'s with each of the `b`'s and summing appropriately generates six possible outcomes with altogether '4*3=12' terms. `a0*b0 ... a0*b3, a1*b0 ... a1*b3, a2*b0 ... a2*b3` for a much reduced complexity, and the improvement gets better higher up.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload