where k B is the Boltzmann constant and W is the number of possible configurations. In a more general formulation, if a system can be in states n with probabilities P n, the configurational entropy of the system is given by