Source: https://www.uncg.edu/cmp/faculty/srtate/330/primsproof.pdf