Source: https://ptwiddle.github.io/MAS341-Graph-Theory-2017/OldLectureNotes.pdf