Discrete math - Prove that a tree with n nodes must have exactly n - 1 edges?

2.2k Views Asked by At

I'm new in discrete math. Can someone prove simply that a tree with $n$ nodes must have exactly $n - 1$ edges. I have researched the solution but I haven't founded yet. I know of course, a tree with n nodes must have exactly n - 1 edges. But, I can't prove it. Thank you. induction on $n$

1

There are 1 best solutions below

3
On

It's easy to see that any tree with $1$ node has $0$ edges. Now let's assume that any tree with $k$ nodes has $k-1$ edges. Now, given any tree with $k+1$ nodes there must exist at least one leaf. Remove a leaf and the connecting edge. The resulting tree has $k$ nodes and by our induction assumption it has $k-1$ edges. Hence, the tree with $k+1$ nodes must have $k$ edges. And from induction, we have the result.