[Math] How many trees does a forest with n vertices and m edges contain

combinatoricsgraph theorytrees

Concerning trees in graph theory:

How many trees does a forest with $n$ vertices and $m$ edges contain?

This has to do with combinatorics apparently but I'm struggling with these assignments since we skipped that topic.

I'm thinking it's related to $m-1$ or $n-1$ something.

Best Answer

First picture $n$ vertices with no edges. Then add the missing edges. Every time we add an edge, we combine two trees into one (as its vertices cannot come from the same tree - prove this). Therefore we end up with $n-m$ trees.