Network Algorithms and Complexity