How to find the number of edges of $K_{n_1,n_2,...,n_m}$

81 Views Asked by At

How to find the number of edges of $K_{n_1,n_2,...,n_m}$ ?

it is easy to find the number of edge of $K_{n_1}$ , but how if i want to find the number of edges of $K_{n_1,n_2,...,n_m}$ ?

1

There are 1 best solutions below

0
On BEST ANSWER

Start by making it a complete graph by adding edges within each component of this multipartite graph.

Notice the number of edges you added is $\sum_{i=1}^m\frac{n_i(n_i-1)}{2}$.

The total number of edges now is $\frac{\sum_{i=1}^mn_i(\sum_{i=1}^mn_i-1)}{2}$ as this now a complete graph.

Taking the difference, this is the number of edges originally in the graph:

$\frac{\sum_{i=1}^mn_i(\sum_{i=1}^mn_i-1)}{2}-\sum_{i=1}^m\frac{n_i(n_i-1)}{2}$.