When organic chemists look at a chemical formula or a chemical    structure, they instinctively determine the    index of hydrogen deficiency of the    compound, the formal charge of each    atom, and the oxidation level of each    atom in the molecule. It's part of the way they think about    molecules. In order to figure out these three pieces of    information, they apply a set of simple rules. The discussion that    follows explains these rules.
        Degrees of Unsaturation and the Index of    Hydrogen Deficiency
        The valence of an atom specifies the number of bonds which that    atom forms to other atoms. Generally an atom's valence is dictated    by the filled    shell rules; the difference between    the number of electrons in a filled valence shell and the number    of valence electrons assigned to an atom equals the valence of    that atom. For example, in hydrogen, an element in Period 1, a    filled shell contains 2 electrons. Since a hydrogen atom contains    1 electron in its valence shell, it needs only one more electron    to fill its valence shell. Hydrogen is univalent. It takes eight    electrons to fill the valence shell of elements in Period 2 of the    periodic table. Thus nitrogen, which has 5 electrons in its    valence shell needs three more electrons to fill the shell. It    acquires those electrons by forming three bonds to other atoms;    nitrogen is trivalent.
        Carbon is tetravalent. This means that it forms four    bonds to other atoms in order to fill its valence shell. There are    several ways it can do this:
        - Carbon can form a single bond to each       of four different atoms. In methane,       CH4, the carbon atom is bonded to four hydrogen       atoms. In methanol,       CH3OH, the carbon is bonded to three hydrogen atoms       and an oxygen atom.
 - Carbon can form a double bond to one       atom and a single bond to each of two other       atoms. This is the case in       ethene,       H2C=CH2, where each carbon is doubly       bonded to the other and singly bonded to each of two hydrogen       atoms.
 - Carbon can form a triple bond to one       atom and a single bond to       another. Ethyne       (acetylene) is an example. It contains two carbon atoms that       are connected by a triple bond; each carbon is also bonded to a       hydrogen atom. (Draw a Lewis structure for ethyne.)
 - Carbon can form a double bond to each       of two different atoms. In       carbon       dioxide, CO2, the       carbon is doubly bonded to both oxygen atoms.
 
        When a carbon atom uses its four valence electrons to form    bonds to four other atoms, the carbon is said to be    saturated. The carbon in methane is    one example. The carbons in ethane,    C2H6, are another. Methane and ethane both    conform to the formula CnH(2n+2). They are    called saturated    hydrocarbons;    they contain only hydrogen and carbon, and each carbon atom is    bonded to four other atoms.
        It shouldn't be surprising that an alkene like ethene in which    each carbon atom is bonded to only three atoms is classified as an    unsaturated hydrocarbon. The general    formula for alkenes that contain one double bond is    CnH2n. Notice that such an alkene contains    two fewer hyrdogen atoms than an alkane with the same number of    carbon atoms. This is equivalent to 1 molecule of dihydrogen, and    the degree of    unsaturation of    ethene is said to equal 1. Figure 1 indicates why this is so.
        Figure 1
        Saturated and Unsaturated    Hydrocarbons
        
        In ethane each carbon uses its four valence electrons to form    bonds to four other atoms. In ethene they use them to form bonds    to three other atoms; rather than sharing one of their valence    electrons with another hydrogen, C1 and C2    share them with each other as indicated by the blue color coding    in the Figure.
        Extension of this idea reveals that the degree of unsaturation    of 
ethyne,    C
2H
2, is 2 since C
2H
6-    C
2H
2= H
4, which is equivalent to    2 molecules of dihydrogen. The triple bond accounts for 2 degrees    of unsaturation in ethyne
The concept of saturation may be applied to any atom or molecule.    Consider 
methanol,    H
3C-O-H, again, but this time focus on the oxygen atom    rather than the carbon. Oxygen is divalent. In methanol it is    bonded to two other atoms and is therefore described as a    saturated atom. In fact, the whole molecule is considered to be    saturated, which means that the degree of unsaturation of the    molecule is zero. To understand this, compare the molecular    formulas of methane and methanol; CH
4 vs    CH
4O. The number of hydrogen atoms is the same in these    two 1-carbon molecules.        
Contrast the case of methanol with that of formaldehyde,    CH2O, another 1-carbon molecule. The degree of    unsaturation in this molecule equals 1 ( CH4-    CH2O = H2). Formaldehyde contains a    carbon-oxygen double bond.
The molecular formula of cyclopropane is    C3H6. Its degree of unsaturation is 1. But    cyclopropane is a saturated hydrocarbon! Every atom is saturated.    Cyclopropane doesn't contain any multiple bonds. Still, it has    less than the maximum number of hydrogen atoms that a 3-carbon    compound can contain. It's not that the method of calculating the    degree of unsaturation does not work, but rather that cyclopropane    is not an acyclic saturated hydrocarbon. To appreciate how    a compound can have a less than the maximum number of hydrogens    and still be considered saturated, examine Figure 2. Then compare    the process shown in Figure 2 with the alternative outlined in    Figure 1.
        Figure 2
        Alkanes and    Cycloalkanes
        
        To differentiate between hydrogen deficiency that arises from    multiple bonds in a molecule and hydrogen deficiency due to the    presence of rings in a structure, chemists defined the term    index of hydrogen deficiency.    It is a more general term than degree of unsaturation, indicating    the total number of multiple bonds and/or rings in a molecule.    While the degree of unsaturation of cyclopropane is zero, its    index of hydrogen deficiency is 1. To extend this distinction, the    index of hydrogen deficiency of cyclobutene    is 2 while its degree of unsaturation is    1; it contains 1 double bond and one ring.
        Rule 1: Calculating the Index of    Hydrogen Deficiency
        To calculate the index of hydrogen deficiency of a compound,    subtract the number of hydrogens in its empirical formula from the    number of hydrogen atoms in a saturated acyclic hydrocarbon    containing the same number of carbon atoms, i.e.    CnH(2n+2). Divide the difference by 2.
        Each multiple bond and each ring contributes 1 degree of    hydrogen deficiency to a compound:
                         |              Structural Unit           |                        Contribution to Index of Hydrogen             Deficiency           |        
                 |              double bond           |                        1           |        
                 |              triple bond           |                        2           |        
                 |              ring           |                        1 | 
Taken by itself the index of hydrogen deficiency is not especially    useful. In combination with other data however, it can provide    important insights into chemical structure. Consider the following    two examples.        
Hexene, an alkene, and cyclohexane, an    alkane, have the same molecular formula,    C6H12, and the same index of hydrogen    deficiency, 1.
        
        A simple way to differentiate an alkene from an alkane involves    treatment of a sample with a dilute solution of dibromine,    Br2, dissolved in carbon tetrachloride,    CCl4. This is called the    Beilstein test. Dibromine is an    orange-red liquid. It reacts rapidly with alkenes to produce    compounds that are colorless. When a solution of dibromine in    carbon tetrachloride is added to an alkene, the orange-red color    disappears instantly. Alkanes and cycloalkanes do not react under    comparable conditions, and the orange-red color persists. So a    Beilstein test will immediately determine whether a hydrocarbon    that has an index of hydrogen deficiency of 1 is an alkene or a    cycloalkane.
Now imagine that you're a natural products chemist who has    isolated a terpene from the bark of a tree. Elemental    analysis indicates its molecular    formula to be C10H16. Two isomers that fit    this data are shown in Figure 3.
        Figure 3
        Two Isomeric Terpenes        
        In order to differentiate between these alternatives, you    perform an experiment; you measure the number of moles of    dihydrogen that are required to completely react with one mole of    your sample. Like dibromine, diydrogen reacts with the double    bond(s) in alkenes. Although the index of hydrogen deficiency of    both compounds is 3, the degree of unsaturation of structure    
1 is 1, while that of structure 
2 is 2. If your    compound has structure 
1, it will react with one mole of    dihydrogen. Structure 
2 will consume two moles. Measuring    the volume of dihydrogen consumed is simple. So is calculating the    number of moles of dihydrogen that is equivalent to that volume.    It entails manipulation of the 
ideal    gas law.