Optimization Algorithms for Networks and Graphs