[Degree of Unsaturation][1](DU) of an organic compound tells us about the total number of $\pi$ bonds(both double bonds and triple bonds) and number of rings/cyclic chains in the compound. Degree of unsaturation forms an integral part of the four tools used to identify the structure of an organic compound(some of the others being structure after hydration and ozonolysis (*there's one more i don't remember*)). Wikipedia states the formula of Degree of Unsaturation as: > $$\text{Rings + pi bonds}=C-\frac{H}2-\frac{X}2+\frac{N}2+1$$ >where C = number of carbons, H = number of hydrogens, X= number of halogens and N = number of nitrogens A more general formula is stated as >![Fundamental formula][3] >where $n_i$ is the number of atoms with valence $v_i$ ###What I'm interested is the underlying concept from which this formula is derived. [1]: http://en.wikipedia.org/wiki/Degree_of_unsaturation [2]: https://i.sstatic.net/n6vmm.png [3]: https://i.sstatic.net/qh7fk.png