I have confused myself about the following variant of Maxwell's demon and I can't seem to find out where the energy went.
Consider this: You have a chain (one dimension) of spins (up/down) with a nearest-neighbor coupling. Energy is minimized if spins are aligned. Let us say the energy difference between alignment and not-alignment is E. The zero temperature state is either all up or all down. If we heat the state up to a temperature T, some of the spins will flip with a probability given by the Bolzmann-factor, depending on the ratio T/E. So far so good.
Now the finite temperature state has energy because the states aren't all aligned, but the distribution is thermal and it's no useful (free) energy. However, if you knew which spins are misaligned, you could selectively flip them. Let us say the system is such that you can flip them by shooting a photon with energy E at the spin. Eg, you shoot at the middle spin in a series of three. If it's up,up,up then the photon will be absorbed and you end up with up, down, up. If it's up, down, up, the photon stimulates emission and you get up, up, up plus two photons of energy E. If you have up, down, down, the photon doesn't change anything about the total energy. The same happens if you exchange all ups with downs.
Now the thing is this: If you do not know which spins you have to flip, your chances of gaining or losing energy by shooting photons at the chain are the same. You just convert one thermal state into the other. But if you knew which spins to flip, you could topple them over selectively and get energy out of the system. Essentially, you extract it from the thermal bath that did heat up the chain. That's possible (I think) because you are using information to reduce the entropy of the system.
My question is this: How do I see that the energy needed to measure the spin orientations in the chain is at least as large as the energy I can gain by flipping them selective once I have measured? It isn't clear to me why it should not be possible to measure them with some very low-energetic probe, eg measuring the local magnetic field with the Hall effect.