do alkanes contain a functional group
An alkane, by definition, only has single bonds. Even if your second diagram made sense (it doesn't for the reason above) it would not be an alkane at all because there is a double bond. Alkanes are a functional group. It's called alkil. As a functional group they have the generic formula R(CH2)nH.