Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Probability of the Bit Torrent technology

  1. Jan 11, 2009 #1
    Hi, I am not the greatest at math but I found an interesting probability question for you guys to think through. It has to do with the popular peer-to-peer program called BitTorrent, which people use to share files on the internet, typically ranging in file size from 5MB for a single song, to 4.5GB for a DVD movie. Bittorrent divides each file into segments and each segment is divided further into blocks. See below for an example:

    File: Movie
    Size: 600MB
    # of Segments: 1172
    Segment Size: 512KB
    # of Blocks: 32

    Bittorrent distributes these segments to other users on the network at random. The segments do not have to be distributed in order from 1 to 1172. Instead you may get #342, then #21, then #879, etc. Its all random for a very neat reason. Say the person who originally uploaded the DVD File onto the network, only stays online for a brief period of time. During this time, 5 Bittorrent users start downloading the File from this original uploader. But because the uploader does not stay online for very long, the 5 users only complete downloading about 80% of the File each. In fact, lets say each user downloads exactly 80% by some freak chance, so we can simplify the question. But clearly there would be a distribution of percentages based largely on each user's bandwidth, but I digress. What's neat is that even though each user has exactly 80% of the File, since the File was distributed in segments and each segment distributed randomly to the 5 users, you can see that its pretty likely that together, on aggregate, all 5 users' combined segments, may total 100% of the File. Or is it likely? This is what I'd like to know.

    Another question of interest, is given the same problem, at what percentage would one find it a 50/50 proposition that the 5 users do in fact have 100% of the File collectively?

    Finally, if we include blocks in our calculation, that is to say, each File is divided into segments and then into blocks and it is these blocks that are distributed randomly, at what percentage would would one find it a 50/50 proposition that the 5 users do in fact have 100% of the File collectively? Perhaps this is just like saying there are 1172x32 segments instead of 1172, as I say, I'm not great at math logic.

    Note, that this is my rough understanding of how Bittorrent works. I'm sure its not a perfectly accurate illustration, but I think the question is pretty well defined in and of itself.

    Cheers for your replies,

    Thank you.
  2. jcsd
  3. Jan 11, 2009 #2


    User Avatar
    Science Advisor
    Homework Helper

    If instead of each person having downloaded exactly 80% of the segments, let's say that each person has an 80% chance to have downloaded any individual segment. Then the chance that at least one person downloaded a given segment is 1 - (1 - 0.8)^5 = 99.9968%. The chance that all 1172 segments have been downloaded is then 0.999968^1172 ~= 68.7%.

    For this modified problem, there is a 50/50 chance when each person has a ~77.39% chance to download each segment.
  4. Jan 12, 2009 #3
    Very interesting, thank you.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook