generates a connected random undirected graph, with a tree that typically works