Added bipartite graph code