Graph Partitioning Code