The unsaturation index of a molecule is defined as the sum of the number of bonds $\pi$ and the number of cycles present. Alkanes are saturated hydrocarbons as they do not contain $\pi$ bonds or cycles and have the molecular formula $C_nH_{2n+2}$. To calculate the unsaturation index of a compound, we only have to compare the number of hydrogens it has with those it would have if it were an alkane with the same number of carbons. This hydrogen difference divided by 2 gives us the unsaturation index.

Alkenes are compounds that contain carbon-carbon double bonds. Alkenes respond to the molecular formula $C_nH_{2n}$. For the same number of carbons they have two less hydrogens than an alkane, they are said to be unsaturated compounds (they have unsaturation).
Cycloalkanes also have the molecular formula $C_nH_{2n}$. The presence of a cycle or double bond decreases the number of hydrogens in the molecule by two. By determining the number of installations of a formula we can draw structures of the possible isomers.
For example, a compound of formula C 8 H 14 , has four fewer hydrogens than the alkane with the same number of carbons C 8 H 18 . Therefore, it presents two unsaturations that can be due to (1) two double bonds, (2) two cycles, (3) a double bond and a cycle, (4) a triple bond. The following molecules are possible isomers with the formula C 8 H 14 .
Degrees of unsaturation in compounds containing halogens. oxygens and nitrogens
• Halogens: Add the number of halogens to the number of hydrogens.
• Oxygens: Ignore oxygens.
• Nitrogens: Subtract the number of nitrogens from the number of hydrogens.
Problem: Calculate the degree of unsaturation of the following formulas:
a ) C4H8
Solution: The saturated alkanes of 4 carbons have the formula C 4 H 10 . The compound has one less hydrogen pair, so its degree of unsaturation is one.
b) C 9 H 16 Br 2
Solution: We add the halogens to the hydrogens obtaining the formula C 9 H 18 . The nine-carbon alkane has the formula C 9 H 20 . The test compound has a degree of unsaturation.