Skip to content

Commit 99c69f3

Browse files
aneubecklook
andauthored
Update crates/consistent-hashing/README.md
Co-authored-by: Luke Francl <look@github.com>
1 parent 0935ea0 commit 99c69f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/consistent-hashing/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Putting it together leads to `S(k+1, n+1) = {n} ∪ S(k, m)` and `S(k+1, n) = {m
106106
### Property 2
107107

108108
The final part is to prove property 2. This time we have an inducation over `k` and `n`.
109-
As before, induction start for `k=1` and for all `n>0` is inherited from the `consistency_hash` implementation. The case `n=k` is also trivially covered, since the only valid set are the numbers `{0, ..., k-1}` which the algorithm correctly outputs. So, we only need to care about the induction step where `k>1` and `n>k`.
109+
As before, the base case of the induction for `k=1` and all `n>0` is inherited from the `consistency_hash` implementation. The case `n=k` is also trivially covered, since the only valid set are the numbers `{0, ..., k-1}` which the algorithm correctly outputs. So, we only need to care about the induction step where `k>1` and `n>k`.
110110

111111
We need to prove that `P(i ∈ S(k+1, n+1)) = (k+1)/(n+1)` for all `0 <= i <= n`. Property 3 already proves the case `i = n`. Furthermore we know that `P(n ∈ S(k+1, n+1)) = (k+1)/(n+1)` and vice versa `P(n ∉ S(k+1, n+1)) = 1 - (k+1)/(n+1)`. Let's consider those two cases separately.
112112

0 commit comments

Comments
 (0)