Group theory, entropy and the third law of thermodynamics