Skip to content

Instantly share code, notes, and snippets.

View keleffew's full-sized avatar
💭
working

Kevin Leffew keleffew

💭
working
View GitHub Profile
@super3
super3 / README.md
Created September 12, 2016 18:41
Storj Beach Size

beach-size

Because this script performs many factorials (and is poorly optimized), please consider your CPU before inputting large values

This is a quick-and-dirty script to describe the difficulty of locating a file on a distributed storage network without information regarding the locations of its shards. It computes the probability of locating all the shards of a file with a number of random non-repeating draws from a network containing a given number of shards.

This is a fairly simple application of a hypergeometric distribution. The population size (N) is the total number of shards on the network, the number of successes in the population (k) is the number of shards required to rebuild the file, the sample size (n) is the number of shards a searcher retrieves from the network, and the number of success of shards in the file (x) is equal to the number of shards in the file (i.e. all shards are required to rebuild the file).

The results