Diameter of bipartite graph

2.3k Views Asked by At

Sorry if the question is too basic. I know that a complete bipartite graph k_{n,m} has a diameter equals one when m=n=1 and 2 otherwise. My question is about a bipartite graph K_{n,n} with two partite sets of vertices U and V of size n where each vertix from U is adjacent to only one vertix from V. What is the diameter of this graph? Thank you

2

There are 2 best solutions below

1
On BEST ANSWER

Assume $n>1$. Since each vertex $a \in U$ is adjacent to exactly one vertex in $V$. This means either we have a one-one correspondence between vertices in $U$ and $V$ such that each vertex $u_i$ is adjacent to a corresponding $v_i \in V$. In which case there is no path between say $v_i$ and $v_j$ for $i \neq j$, consequently the diameter is infinite. The other scenario is when more than one vertex in $U$ is adjacent to the same vertex in $V$. In this scenario, at least one vertex in $v$ is isolated (this is where we are actually using the fact that $n>1$), hence no path to it. Then again the diameter is $\infty$.

Case $n=1$ is straightforward, where diameter is $1$.

1
On

If each vertex in $U$ is connected to only one vertex in $V$ that your graph consists of $n$ disconnected components. So the diameter is infinite unless $n=1$.