Efficient algorithm for broadcasting in delay tolerant networks