Jonathan O’Callaghan in Nautilus:
The universe bets on disorder. Imagine, for example, dropping a thimbleful of red dye into a swimming pool. All of those dye molecules are going to slowly spread throughout the water. Physicists quantify this tendency to spread by counting the number of possible ways the dye molecules can be arranged. There’s one possible state where the molecules are crowded into the thimble. There’s another where, say, the molecules settle in a tidy clump at the pool’s bottom. But there are uncountable billions of permutations where the molecules spread out in different ways throughout the water. If the universe chooses from all the possible states at random, you can bet that it’s going to end up with one of the vast set of disordered possibilities. Seen in this way, the inexorable rise in entropy, or disorder, as quantified by the second law of thermodynamics, takes on an almost mathematical certainty. So of course physicists are constantly trying to break it.
One almost did. A thought experiment devised by the Scottish physicist James Clerk Maxwell in 1867 stumped scientists for 115 years. And even after a solution was found, physicists have continued to use “Maxwell’s demon” to push the laws of the universe to their limits. In the thought experiment, Maxwell imagined splitting a room full of gas into two compartments by erecting a wall with a small door. Like all gases, this one is made of individual particles. The average speed of the particles corresponds to the temperature of the gas—faster is hotter. But at any given time, some particles will be moving more slowly than others.
What if, suggested Maxwell, a tiny imaginary creature—a demon, as it was later called—sat at the door. Every time it saw a fast-moving particle approaching from the left-hand side, it opened the door and let it into the right-hand compartment. And every time a slow-moving particle approached from the right, the demon let it into the left-hand compartment.