title: Generate a Connected Graph java
body: <p>I want to write a function, which is given a set of vertices and then develops an edge between 2 vertices and repeats this until the graph becomes a connected graph). How can I tell when the graph has become connected?</p>