First draft of algorithm to find (bipartite) vertices of graph.