7

Given a graph G(V, E), with |V | = n and |E| = 0 (that is, the graph is empty), and a static set F containing all the possible edges. Consider the following algorithm for generating a random graph.

Input : Empty Graph G(V, E), set of all possible edges F

Output: A connected random graph G

While G is not connected do

    Sample an edge e from F uniformly at random
    E ← E ∪ e

end

What is the best bound on the expected number of samplings performed by the algorithm?

user989
  • 81
  • Usually people talk about random graphs where each edge is included independently with a certain (usually fixed) probability $p$. There are very strong known relationships between $p$ and the expected number of connected components in the graph. You can use this to get an approximate answer to your question, since if you have $k$ randomly chosen distinct edges this is "almost" the same as setting $p = k / {n \choose 2}$ and including each edge (independently) randomly with probability $p$. – user2566092 Aug 29 '15 at 20:10
  • Are we removing $e$ from $F$ once it is chosen? – 727 Aug 29 '15 at 20:11
  • see below link, same question http://cs.stackexchange.com/questions/7373/how-many-edges-must-a-graph-with-n-vertices-have-in-order-to-guarantee-that-it-i – R.N Aug 29 '15 at 20:18
  • @RaziehNoori That is asking for the worst case number of distinct sampled edges needed to make a connected graph, not the expected value of the number of distinct sampled edges needed to make a connected graph when edges are chosen randomly one at a time. – user2566092 Aug 29 '15 at 20:23
  • Somewhat related: http://math.stackexchange.com/questions/584228. – joriki Aug 29 '15 at 20:54
  • @LJL No, We are not removing it from F. – user989 Aug 29 '15 at 20:57
  • What I want to know is how many times the while loop will run on average, i.e number of times an edge is chosen. – user989 Aug 29 '15 at 21:01
  • @LJL Whether it's removed or not removed from $F$, the two cases can be very tightly related because the number of distinct edges obtained from $k$ edges sampled with replacement has a very tight probabilistic relationship with $k$ (very little deviation from expectation), at least in terms of the ratio of the true number of distinct edges obtained to the expected number of distinct edges obtained. – user2566092 Aug 29 '15 at 21:01
  • @ user2566092 "There are very strong known relationships between p and the expected number of connected components in the graph" Can you please give such relationship? – user989 Aug 29 '15 at 21:03
  • Is the graph directed or undirected? – Marconius Aug 29 '15 at 21:12
  • @Marconius Graph is undirected. – user989 Aug 29 '15 at 21:16
  • The graph is an Erdos-Renyi random graph. Wikipedia is a decent source for this: https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93R%C3%A9nyi_model. In particular, if $p>\frac{(1+\epsilon)\ln n}{n}$ the graph is almost certainly connected, where $p$ is the probability that a randomly chosen pair of vertices is connected by an edge in $G$. Since there are $\binom{n}{2}=\frac{n(n-1)}{2}$ possible edges, the expected number of edges before $G$ becomes connected is $\frac{1}{2}(1+\epsilon)(n-1)\ln n$. As far as I can tell, the quantity $\epsilon$ is some small positive number (it may depend on n?). – Marconius Aug 29 '15 at 21:57

0 Answers0