Two different electronic configurations for cerium

Depending on the textbook there are two different electronic configurations stated for cerium. On the one hand

$$[\ce{Xe}]\mathrm{4f^15d^16s^2}\quad$$

and on the other hand

$$[\ce{Xe}]\mathrm{4f^26s^2}$$

Are both configurations possible? If not, why so?

• There is no need to waste your time in memorizing the differences. Yes, you will hear and read "stories" of this electron configuration and that electron configurations without saying why so. I have yet to find a spectroscopist (asked so many leading ones) who can tell me how these electron configurations were obtained from either experiment or by theory. I bet your teacher will have no clue either. So the question you should ask is how would we experimentally distinguish your first configuration from the other. – M. Farooq Feb 5 '20 at 0:29