Optimal Peer Selection, Task Assignment and Rate Allocation for P2P Downloading

In a peer to peer file sharing system, there are usually multiple peers which store the copies of a requested file, and these peers may charge different costs for resource sharing. Moreover, the peers in the system are often connected in a network with heterogeneous link bandwidths. We propose two optimal algorithms for P2P file downloading, both based on the network flow theory. The first algorithm guarantees that the requested file can be downloaded in the shortest time,and the second algorithm guarantees that the file downloading can be done in the shortest time with the lowest cost. In both algorithms, the peer selection, task assignment and rate allocation problems are solved jointly, and duplicate downloading is avoided. Finally, we give a complexity analysis of the proposed algorithms.