We give an especially simple proof of a theorem in graph theory that forms the key part of the solution to a problem in commutative algebra, on how to characterize the integral closure of a polynomial ring generated by quadratic monomials.