initial code for graph partitioning based on abundance