Possible Duplicate:
Every simple undirected graph with more than $(n-1)(n-2)/2$ edges is connected
At lesson my teacher said that a graph with $n$ vertices to be certainly connected should have
$ {frac{n(n-1)}{2}+1 space }$ edges showing that (the follow is taken from the web but says the same thing):
The non-connected graph on n vertices with the most edges is a complete graph on $n-1$ vertices and one isolated vertex. So you must have $ 1+ {frac{n(n-1)}{2} space}$ edges to guarantee connectedness.
My idea: a complete graph $K_{n-1}$ with $n-1$ vertices has ${n-1 choose 2}$edges, so ${frac{(n-1)*(n-2)}{2}}$ edges, added to the edge to connect the complete graph to the isolate vertex, so shouldn’t be ${frac{(n-1)*(n-2)}{2}}+1$ edges? What am I doing wrong? Thanks.
Asked By : newbie
Best Answer from StackOverflow
Question Source : http://cs.stackexchange.com/questions/7373
Answered By : Luke Mathieson
- Simple, directed graph?
- A directed graph that allows self loops?