Distributed Algorithms for Separable Optimization