5

Consider the complete graph $K_4$ with four vertices; all vertices are connected by an edge to all other vertices. Suppose now that we flip an unbiased coin for each edge. If heads comes up, we leave the edge where it is, if tails comes up we remove the edge. What is the probability that the graph remains connected?

This boils down essentially to a counting question where I have to find the number of connected graphs with $4$ vertices. I had $2$ "parallel" edges there are $3$ such graphs we can make such that to connect the graph you'd only need a minimum of $1$ edge, e.g., $AB$ and $DC$ are "parallel". To find all of these graphs that are connected, we know that $A$ can connect to $D$, $C$ or both (so $3$ ways) likewise for $B$. Hence there are $3 \cdot 3 = 9$ ways we can do this. Also considering the fact that we have $3$ of the parallel type graphs (this is trivial to show) we have $3 \cdot 9$ configurations. However I missed atleast one class of graphs that I know of that my method didn't encapsulate. Those are graphs where $1$ vertex is alone connected with an edge to all others.

My answer was $$27 \cdot \frac{1}{2^6} = \frac{27}{64}$$ although I know it's incorrect since I've missed some configurations of connected graph.

cheesewiz
  • 366

3 Answers3

18

Here are a few approaches:

  1. We can try to complete the count of connected graphs more carefully.

  2. We can instead solve the problem recursively - look at what the first 3 vertices are doing, and then see how adding the last vertex helps (or doesn't).

  3. We can solve the problem in a different recursive style that generalizes well to higher vertex counts. (See this question for the generalization.)


For the first approach, it helps to subdivide into cases by the number of edges.

With $3$ edges, the connected graph must be a tree. We can invoke Cayley's formula to conclude that there are $16$ trees, but that might be overkill because we can count them directly: there's $12$ paths ($4! = 24$ ways to order the vertices along a path, divided by $2$ because reversing the path doesn't change the graph) and $4$ stars ($4$ ways to pick a vertex adjacent to all others).

With $4$ or more edges, the graph can no longer avoid being connected, so there are $\binom 64 + \binom 65 + \binom 66 = 22$ more cases.

In total, we count $38$ connected graphs, for a probability of $\frac{38}{64} = \frac{19}{32}$.


For the second approach, there are three cases to consider for what the first three vertices could be doing:

  1. With probability $\frac18$, there are no edges between them at all.
  2. With probability $\frac12$, there are two or more edges between them, and then they're all connected to each other.
  3. With the remaining probability of $\frac38$, there is only one edge.

In case 1, the fourth vertex must be adjacent to all three to connect the graph, which has probability $\frac18$. In case 2, it just needs one edge to them all: probability $\frac78$. In case 3, the fourth vertex must have an edge to the isolated vertex, plus to at least one of the other two vertices: probability $\frac38$. Altogether, we get $$\frac18 \cdot \frac18 + \frac12 \cdot \frac78 + \frac38 \cdot \frac38 = \frac{19}{32},$$ as before.


The third approach is a special case of this general answer. Let $p_k$ be the probability that a random $k$-vertex graph is connected. Then the probability that, in the $4$-vertex graph, the first vertex is in a component of order $k$ is exactly $\binom{3}{k-1} p_k (\frac12)^{k(4-k)}$: $\binom {3}{k-1}$ to choose the other vertices, $p_k$ to connect them all, and $(\frac12)^{k(4-k)}$ to make sure they're not connected to anything else. Adding up the cases over $k=1,2,3,4$ should get us $1$, so $$p_1 \cdot \frac18 + 3p_2 \cdot \frac1{16} + 3p_3 \cdot \frac18 + p_4 = 1.$$ We want to know $p_4$, but $p_1, p_2, p_3$ are much easier to find: $p_1 = 1$ (no edges to lose), $p_2 = \frac12$ (we need the single edge to be present), and $p_3 = \frac12$ (which we've already found in a previous approach). So $$\frac18 + \frac{3}{32} + \frac{3}{16} + p_4 = 1$$ which gives us $p_4 = 1 - \frac18 - \frac3{32} - \frac3{16} = \frac{19}{32}$.

Misha Lavrov
  • 159,700
7

Following up on this thought:

This boils down essentially to a counting question where I have to find the number of connected graphs with 4 vertices.

There are $\binom{6}{k}$ graphs with 4 vertices and $k$ edges, since there are $\binom{4}{2} = 6$ possible edges in total.

  • Graphs with 0, 1, or 2 edges are all disconnected, since they cannot connect all 4 vertices. These contribute: $\binom{6}{0} = 1$, $\binom{6}{1} = 6$, $\binom{6}{2} = 15$, totaling 22 disconnected graphs.

  • Any graph with $>3$ edges is connected. This is because $K_3$ has 3 edges, so any more edge will lead to connectivity.

  • Now let's consider those with 3 edges. Among the $\binom{6}{3} = 20$ graphs with 3 edges, most are connected, but 4 are disconnected. These 4 are the different forms of $K_3$ (any other graph will be connected).

Thus, total disconnected graphs = $22 + 4 = 26$, out of $2^6 = 64$ total graphs on 4 vertices.

This gives the probability to be $38/64$.

whoisit
  • 4,028
  • 1
  • 8
  • 29
3

If $C_n$ is the number of connected graphs with $n$ vertices as per A001187 and $G_n=2^{n \choose 2}$ is the total number of graphs with $n$ vertices, then it should be $\frac{C_n}{G_n}$ since each graph is equally likely.