1

Let $|V| = n$, an even number of vertices, and let $M$ be a perfect matching on these vertices. Suppose we choose uniformly at random a permutation $\pi$ from the symmetric group $\mathbb{S}_n$, and define a graph $G = (V, M \cup \pi(M))$.

What will be the expectation of the number of connected components of $G$?

It is easy to check that each connected component of $G$ is either a cycle or an isolated edge. Using the linearity of expectation and the symmetry argument, we can say that the expectation of the number of isolated edges is $\frac{n}{2} \cdot \frac{1}{n-1}$ (if I haven't messed up anything).

So, now I need to estimate the expected number of cycles, which is no greater than $\frac{n}{4}$, since two perfect matchings give us $n$ edges and the minimal size of a cycle here is 4.

Kuzja
  • 505
  • 1
    I am 99% sure that your problem is exactly the same as the noodle problem. If $(x_1,x_2)\in M$, then choose $\pi(x_1)=y_1$ and $\pi(x_2)=y_2$ is equivalent to tying two noodles together, at the endpoints $y_1$ and $y_2$. – Mike Earnest Apr 03 '24 at 18:41
  • Thank you! It seems that you are right, but I need to work on a proof a bit. – Kuzja Apr 03 '24 at 19:28

1 Answers1

1

Naming the edges of matching $M=\{m_1,m_2,\dots,m_{n/2}\}$, for each $k\in \{0,1,\dots,n/2\}$, define $M_k=\{m_1,\dots,m_k\}$ to be the set of the first $k$ edges. Then, let $$G_k=(V,M\cup \pi(M_k)).$$ That is, $G_k$ is the graph where we only add $k$ random edges to $(V,M)$. Finally, let $C_k$ denote the number of connected components of $G_k$. The goal is to find $\newcommand{\E}{\mathbb E}\E[C_{n/2}]$. Note that $C_0=n/2$.

I claim that for all $k$ such that $0\le k\le n/2-1$, that $$ \mathbb E[C_{k+1}-C_k]=-\left(1-\frac1{n-2k-1}\right). $$ First, note that $G_k$ always has $n-2k$ leaves (a leaf is a degree one vertex). There will be $n/2-k$ components of $G_k$ which are isomorphic to path graphs, each with two leaves. The remaining components of $G_k$ are loops. These facts are easily provable by induction.

Furthermore, conditional on $\pi(m_1),\dots,\pi(m_k)$, the next edge $\pi(m_{k+1})$ is equally likely to be any unordered pair of leaves in $G_k$. If these two selected leaves are in different components, then $C_{k+1}-C_k=-1$, because the two components merge. If the two selected leaves are in the same component, then instead $C_{k+1}-C_k=0$. Therefore, $\mathbb E[C_{k+1}-C_k]$ is the negative of the probability the two leaves are in different components.

Suppose $m_{k+1}=(a,b)$, and the first leave chosen is $\pi(a)=v$. Then there is a unique other leaf, $w$, in the same component as $v$. The probability that $\pi(b)$ is in a different component to $v$ is then one minus the chance that $\pi(b)=w$, so the probability is $1-1/(n-2k-1)$. This completes the proof of the claim.

Conclude by noting that $$ \mathbb E[C_{n/2}] =\mathbb E[C_0]+\sum_{k=1}^{n/2}\mathbb E[C_{k+1}-C_k] =\frac{n}{2}-\sum_{k=1}^{n/2}\left(1-\frac 1{n-2k-1}\right) =\sum_{k=1}^{n/2}\frac1{2k-1}. $$

Mike Earnest
  • 84,902