Given n nodes, if every node is connected to every other node (except itself) the number of connections will be n*(n-1)/2
How does one prove this ?
This is not a homework question. I have been away from CS text books for long and have forgotten the theory on how to prove this.
you have n - nodes, each have n -1 connections (each is connected to every node except itself), so we get n*(n-1)
. However, because connection (x,y) and (y,x) is the same (for all connections), we end up with n*(n-1)/2
.