The lab's hardest graph is two triangles joined by a single edge: 1-2, 1-3, 2-3, 4-5, 4-6, 5-6, 3-4. Seven edges, six vertices, and a unique minimum cut of one edge — the bridge 3-4. There is exactly one way to succeed and the single edge has to survive all four contractions, which it does with probability 13/35 ≈ 0.3714. Over seeds 1 to 120 the algorithm succeeded 41 times and missed 79, the first miss being seed 1, which returned a cut of two edges.
One run at 0.37 is not an algorithm anybody would use. The question this page answers is what it costs to turn it into one, and the answer is exact.
Theorem · AmplificationLet one run of a Monte Carlo algorithm return a correct answer with probability at least p, and suppose a wrong answer is never better than a correct one, so that keeping the best of several runs keeps a correct answer if any run produced one. Then t independent runs return a correct answer with probability at least 1 − (1 − p)ᵗ.
Let Aᵢ be the event that run i returns a correct answer, so P(Aᵢ) ≥ p. The kept answer is incorrect only if every run was incorrect, which is the intersection of the complements.
The runs use independent randomness, so those complements are independent and P(no run correct) = Π P(not Aᵢ) ≤ (1 − p)ᵗ. The kept answer is therefore correct with probability at least 1 − (1 − p)ᵗ.
The hypothesis about wrong answers is where the “keep the best” step is discharged: without it, knowing that some run was correct does not tell you that the answer you kept is.
□
On the bridge graph that gives 1 − (22/35)ᵗ. The panel prints it at several values of t as exact fractions with decimals beside them, and the growth is the one to internalise: each extra run multiplies the failure probability by 22/35, so failure decays geometrically while the work grows linearly.
t P(at least one run succeeds) P(all t fail)
1 13/35 = 0.371429 0.628571
2 741/1225 = 0.604898 0.395102
5 0.901876 0.098124
10 0.990372 0.009628
smallest t reaching 9/10 : 5
smallest t reaching 99/100 : 10
smallest t reaching 999/1000: 15
The same arithmetic on an easier graph
Switch to the two triangles joined by two edges, where one run succeeds with probability 19/35. Now three runs reach 9/10, six reach 99/100 and nine reach 999/1000. Compare with the bridge graph's 5, 10 and 15. The success probability changed by less than a factor of two and the cost of a given target changed by about the same factor, which is what a geometric decay predicts: halving p roughly doubles the runs needed.
And on the four-cycle one run succeeds with probability 1, so the smallest t for every target is 1, and the panel prints 1 rather than a logarithm's rounded suggestion. That is the case where the general formula would still work and would be an odd thing to quote.
What repetition does not buy
It does not make the algorithm always correct. 1 − (22/35)¹⁵ is about 0.9991, which is not 1, and no finite t reaches 1. The panel's target menu offers 9/10, 99/100 and 999/1000 rather than certainty for that reason. If you need certainty you need a different algorithm; what repetition buys is a failure probability you choose, at a cost you can compute.
It also does not help if the runs share randomness. Independence is a hypothesis of the theorem, and it is the hypothesis that a real implementation is most likely to break — by reusing a seed, by deriving all t seeds from one in a way that correlates them, or by drawing from a generator whose low bits are a short cycle. The generator behind every lab on this course is a prime-modulus stream with a mixed seed for exactly that reason.
And it does not turn a one-sided guarantee into a two-sided one. Everything above rested on being able to prefer one answer to another. The next lesson's algorithm has the same structure from a different direction: a primality test whose positive findings are proofs and whose negative findings are silence, so that repeating it accumulates evidence in one direction only.