Algorithms for new objectives in graph partitioning and generalizations