Skip to Main Content
BitTorrent and practical network coding are efficient methods for sharing files in a peer-to-peer network. Both face the problem to distribute a given file using peers with different and dynamic bandwidth and only temporal availability. For this, BitTorrent partitions the files and uses the upload and download of each peer. In addition to this, practical network coding uses a random linear combination of the parts. The original file can be decoded by a matrix operation as soon as enough linear combinations have been gathered at a peer. It is known that practical network coding optimizes the network flow in any peer-to-peer network, yet suffers from the cost of read/write disk operations for encoding and decoding. In this respect, BitTorrent is very efficient, yet falls behind because it has to face the coupon collector problem when distributing parts. We present paircoding as an alternative which is regarding file sharing at least as good as BitTorrent and shares nearly the same computational disk access complexity with BitTorrent. In some scenarios paircoding outperforms BitTorrent regarding network flow and performs as well as practical network coding. Paircoding distributes only a linear combination of two parts which alleviates the coupon collector problem of BitTorrent without the computational overhead of practical network coding. For analytical proofs of these statements we formalize file sharing in a peer-to-peer network in a round model and introduce a computational model which allows to compare the efficiency of the file sharing algorithms in a distributed environment. Since BitTorrent tries to overcome the coupon collector problem with various policies we face a family of BitTorrent systems. We show that for each BitTorrent policy there is a paircoding policy which is at least as good regarding file sharing quality.