Small knowledge, big challenge! This article is participating in the creation activity of “Essential Tips for Programmers”.

The concept we’re going to start with today is entropy. Entropy is a difficult concept to understand, so in this video, it will help you understand what entropy is. We’re not going to look at the profound implications of entropy in the future, like the heat death of the universe or something like that, but we’re going to focus on the basics, like what entropy is, and then we’re going to give you a visual explanation of what entropy is.

You’ve probably heard that entropy is a measure of disorder, but it can also be used to measure disorder in a system, but what does that really mean?

We’re going to understand how to calculate entropy by understanding what this equation really means, and don’t worry, you just need high school math to understand what’s going on.

Let’s start with a more abstract idea, where we have a box, and in this box, we have a certain number of particles, so let’s say for the moment that we have three particles in this box.

It doesn’t matter what these particles are, what matters is that each of these particles carries a certain amount of energy, and we’re going to assume that they can only carry a specified amount of energy.

So we’re going to draw five lines, and each of these lines represents an energy level, the amount of energy that can be carried by a particle at that position, and we’re going to increase the energy level from the bottom up, e, 2e, and here e is a unit of energy which doesn’t really mean anything but just to make things clear.

If we assume that the carrying capacity of cooperation is Etotal=5eE_{total} = 5eEtotal= 5E, then the sum of energies of the three particles in the box is required to be 5E, so how many combinations of the three particles, that is, how many micro states, There are 6 states

  • A,B(E) + C 3E
  • A,C(E) + B 3E
  • B,C(E) + A 3E
  • A,B(2E) + C E
  • A,C(2E) + B E
  • B,C(2E) + A E

Just to summarize, there are 6 permutations of 3 particles in a 5E energy box, that is, the system has 6 microscopic states, so how many microscopic states a system has is also important for understanding its entropy.


S = k B ln ( Ω ) S = k_B\ln(\Omega)
  • S entropy
  • ∣ Omega | Omega ∣ Omega said the number of micro state
  • KBk_BkB is Boltzmann’s constant

Graph entropy is a measure of the disorder of this particular system, as we’ve seen above, there are six different ways to combine particles, and the entropy of this system is equal to the boltzmann constant times the natural log of 6.

Assuming that the system can only contain 3E energy, then there’s only one way for three particles to combine and that’s 3E, so the microstate of the system is 1

In the first system, there are many combinations of particles, which means that the system has many micro states and the entropy value is relatively high. In other words, it is difficult for us to predict which micro state the system is in. So the system is disordered.

The second system has only one microstate, so we can determine the current state of the system, that is, the system is problematic, and the entropy value is low.

I’ve explained a little bit about how entropy is a measure of order, and if we go back to the system that we looked at before, which is 5e, and we have three particles in the box, and we have six different microstates, then when we calculate the entropy of the system, We’re making an implicit assumption that the probability of being in any of the six microstates is equal.