Commutative Rings and Graph Theory