Subgraph isomorphism in random graphs. What am I forgetting?

335 Views Asked by At

We are asked to calculate the expected number of embeddings of graph $H$ in graph $G$. $G$ is a graph on $n$ vertices. Between each pair of vertices, with probability $p$ there is a blue edge, and with probability $1-p$ a red edge. Graph $H$ is a similar graph with $m = 4$ vertices.

So I thought about it and came up with two formulas. The first that would be easier to calculate, namely the formula that multiplies the number of locations $H$ could be placed in $G$, with the probability such a graph $H$ exists to begin with. Let $B$ be the number of blue edges in $H$ and then we would get the following.

$$E(H) = \binom {n}{m} * P(H)$$ $$P(X) = p^B * (1-p)^{(\binom{m}{2}-B)}$$

The second formula chooses a more practical approach. It would iterate every possible combination of edges in $G$, and counting the multiplication of its probability with the number of embeddings of $H$ in the given combination, to get the expected number of embeddings. Similar to calculating the expected value of a dice.

$$E(H) = \sum_{X \in all\_graphs\_G} P(X) * \#emb(X,H)$$

To verify I choose $m=3$, $n=4$ and $p=1/2$. I tried a graph H with $3$ red edges and another with $3$ blue edges and both formulas agreed on the expected value of $1/2$ embeddings. But when I chose to calculate for a single or double edge blue or red, the formulas didn't agree any more. It was then that I realized the first formula would always give $1/2$ as answer when $p=1/2$, which doesn't sound correct, while intuitively it felt correct.

I wrote it down, to verify, as can be seen below. So my question is where did I go wrong? Should the value be $1/2$ or $3/2$ and why?

1

There are 1 best solutions below

2
On BEST ANSWER

The line $E[X]={n \choose m}P(H)$ is incorrect (at least based on what you mean by $P(H)$). The correct line would be $$ E[X] = {n \choose m} E[\# \text{ of ways to embed }H\text{ in }G(m,p)]. $$ By replacing this second factor with $P(H)$, you are only counting one such way to embed the vertices. In the case where $H$ is two blue edges and one red edge, we have three possible ways to embed $H$ into $G(3,p)$. By symmetry, we would have that $$ E[\# \text{ of ways to embed }H\text{ in }G(m,p)] = 3 P(H), $$ where as you found $P(H) = (1/2)^3$.