 Okay, so we understand that if we have a system with n independent subsystems, or in particular if I have n individual particles that are independent from one another, I can write the partition function for the whole system as the product of the smaller partition functions, where each one of these partition functions is for one of the particles. If, as is often the case, the system we're interested in is one box containing many identical particles, let's say a box of gas containing lots of identical oxygen molecules. If those molecules are identical, as well as independent, then I don't have to calculate a separate partition function for molecule one, molecule two, molecule three. If the molecules are identical, their partition functions are all the same, and so then this expression just becomes q times q times q, n times, or q raised to the nth power. So that's a very convenient way to calculate the partition function, and to give you an example of how that's done, let's consider a very simple case. We're considering a case where the system only has two different energy levels. So the allowed energies, let's say, are zero for the ground state, or epsilon for the only other state that's accessible. So for that, and let's say we're going to consider a case with three different particles. Then there's a couple of different ways we could calculate the partition function for that system. For a single particle, the energies are only zero or epsilon. If I have all three particles, a box containing three of these particles, each one of which can have an energy of zero and an energy of epsilon, it's possible the energy could be as high as three epsilon in the full system. If all three of the molecules are in the excited state, the energy is three epsilon. If they're all in the ground state, the energy is zero. The energies could also be epsilon or two epsilon if only one of the molecules is excited or if two of the molecules are excited. So that's what the allowed energy levels look like for the full system of three particles. Here's what the energy levels look like for a single particle. We can calculate the partition function in two different ways. First, let's think about it the way we think about it. If we just think about the partition function of the whole system being e to the minus energy over kt for each of the allowed states of the system. The states of the system can be occupying any one of these energy levels. But there's also some degeneracy to worry about. There's more than one way the system can have an energy of epsilon, for example. So let's make sure we understand that. Let's write out all the different microstates the system can have, all the different full description of which particles in which state. So let's say particle one, particle two, particle three, I'll list individually which state they occupy whether they're in the ground state or the excited state. So let's say I could put all three of the molecules in the ground state so their energies are zero and zero and zero. Or I could put the third molecule in state, in the upper state with an energy of epsilon. Or if I consider all of these different possibilities, I could put the second molecule in the excited state or I could put both of those two molecules in the excited state. I haven't considered in any cases yet where the first molecule is excited so I can consider the first molecule in the upper state and both of the others in the ground state or just one of them excited or the other one excited or I could consider all three of them in the excited state. So those are all the eight different ways I have of putting the three molecules in these two energy levels. So if we count there's eight different states, two times two times two different ways of constructing these microstates. The total energy of the system, if they're all in the ground state that's zero, if only one of them is excited that's epsilon, that also considers this state. If two of the molecules are excited the energy is two epsilon and if all three of the molecules are excited the energy is three epsilon. So notice there's some degeneracy, there's three different ways to have an energy of two epsilon, there's also three different ways to have an energy of epsilon. So if we were to calculate the partition function with our original equation we'd say that the partition function is e to the minus energy over kT so it's, in fact let's use the fact that we know the degeneracies I can say it's a sum over energy levels, degeneracy times e to the minus energy over kT so I can write that as the energy could be zero so e to the zero is one, the degeneracy of that state is also one. The next energy to worry about is this energy epsilon so I've got e to the minus epsilon over kT but the degeneracy of that state there's three different ways to have an energy of epsilon likewise I could have an energy of two epsilon which has a degeneracy of three or I could have an energy of three epsilon which has a degeneracy of one. So there's the partition function for the system, if I write out all the microstates of the system collect them all into the different energy levels to calculate the degeneracy use that to write out the partition function I get this result or we could use this expression instead and that turns out to be a little bit easier so that was approach number one to the problem if I do the problem again and I notice the shortcut and say I've got n identical particles the big partition function is going to be the little partition function raised to the nth power the little partition function i.e. the partition function for one individual molecule is just e to the zero plus e to the minus epsilon over kT so that little partition function Boltzmann factor for each of the possible states that a single molecule can have there's only two states to worry about and I raise that to the third power because I have three molecules and then because I can do algebra on this term that turns out to be exactly the same thing as that so one plus a quantity cubed is equal to this polynomial one plus three times the quantity three times the quantity squared quantity cubed so I get the same answer regardless of which way I do it but it was a lot less work to just calculate a single molecule partition function in qubit rather than calculating all the individual microstates imagine the difference that would be if I were calculating the partition function not just for three molecules but for a box containing Avogadro's number of molecules there's no way I could possibly write out all the different microstates that that system can have although I could write out the individual partition function for one molecule and raise it to a large power like Avogadro's number so this tells us how to calculate a partition function when I have a bunch of independent particles but I've glossed over one important detail in how to calculate this partition function and that's we need to pay a little bit of attention to whether those molecules can in fact be distinguished from another one another and you've noticed I haven't talked about this word yet so everything I've done here is fine if I have distinguishable particles and I'll make sure and make clear what I mean by distinguishable particles and the opposite case where the particles are indistinguishable in the next video lecture.