Why a complete graph has $\frac{n(n-1)}{2}$ edges? I'm studying graphs in algorithm and complexity,
(but I'm not very good at math) as in title:

Why a complete graph has $\frac{n(n-1)}{2}$ edges?

And how this is related with combinatorics?

A complete graph has an edge between any two vertices. You can get an edge by picking any two vertices.
So if there are $n$ vertices, there are $n$ choose $2$ =  ${n \choose 2} = n(n-1)/2$ edges.
Does that help?
