You can make a very simple probabilistic approach:
1. Create an empty graph with n nodes 2. For each pair of nodes: -Flip a fifty-fifty-coin to decide whether to put an edge in there or not
You have a pair of O (n ^ 2) vertices, and this will also expect the running time of this algorithm, since the random graph generated by this procedure will most likely be tied to .
Therefore, in the end, to make sure that your schedule is really doubly connected, you simply run the usual procedure that you already know.
For a scenario (very unlikely) where the check returns βthe graph is not doubly connected,β simply repeat the procedure.
A really intriguing question: "Why will I get the binary graph whp?" I omitted the formal proof, which is a bit tedious, and by the way you ask, I suppose you just want something to work, and you don't care why it works. If I'm wrong, and you really need proof, I suggest you either ask mathoverflow or leave me a comment - maybe I will try to make it formal if I take the time.
For now, just to make you feel why this will work, consider the following approach to how it can be proved:
The number of graphs that are not doubly connected is equal to the number of graphs with at least one joint vertex.
Therefore, calculate the probability that one vertex is an articulation point. The idea is that if v is the vertex of the articulation, then it divides the vertices of n into two disjoint sets of size k and nk , so there is no edge between these sets. Now, intuitively, it should be more or less clear that k*(nk) flipping coins, all of which should lead to "without edge", is not very likely (mostly (1/2)^(k*(nk)) ). We still need to multiply by n (since for each node), but it still will not become real, and, as you can see now, it is very unlikely that a graph with a sufficiently large number "n" is not doubly connected,
(What is still not enough to consider "for each possible partition", that is, for different variants of k , and then, perhaps, be more careful, since in reality it will be ((n-1)-k) and k , and not (nk) and k , because the vertex in question is not part of either of the two sets ... I just say that these things illustrate details that still have to worry about formal proof ...)