Look at the general molecular formulae for alkanes, alkenes and alkynes.