Source: http://dslavsk.sites.luc.edu/courses/other/classnotes/fouriergraphs.pdf