Who Shaves the Barber? A Famous Paradox
You’re in need of a trim, and when you arrive at the local barbershop, you notice a strange set of rules nailed to the wall:
1. The barber shaves everyone who does not shave themselves.
2. The barber can only shave those who do not shave themselves.
We can more concisely define the barber as one who shaves all who do not shave themselves. But let’s assume the barber does not shave himself. According to the rule, the barber must shave himself, as the barber shaves everyone who does not shave themselves. So does the barber shave himself or not shave himself? In other words, who shaves the barber?
This paradox finds its roots in the late 1800s, when mathematicians like Cantor and Dedekind laid the foundations of set theory, a branch of mathematics that looks at math through the lens of sets. Sets are collections of mathematical objects, such as numbers, or anything that can be formally defined in our mathematical system. These collections are created by defining a common property. For example, we can call all rational numbers that do not contain a fraction a set of integers.
Set theory has a deceptively simple premise, but it’s a place where intuitive ideas result in quite unintuitive paradoxes. While it at first may seem natural to be able to create a set from any given property—this is called the unrestricted comprehension principle—mathematician Bertrand Russell discovered a paradox by creating what he calls a Russell set. A Russell set contains all sets that do not contain themselves, much like our situation with the barbershop rules. So, does the Russell set contain itself?
If the Russell set does not contain itself, it must be a part of the Russell set because it is now a set that does not contain itself. But, if it contains itself, it can no longer be a part of the Russell set as it now would be a set that contains itself. So we’re trapped in a paradox! Like Russell, we are forced to confront the axioms that make asking such a question possible. After all, mathematicians and logicians loathe contradictions in their systems. We must make it impossible to construct the Russell set in the first place. We do this by replacing the unrestricted comprehension principle with the separation axiom. The separation axiom restricts what can be a set and introduces the idea of classes. A class is simply a collection of elements that follows a rule and can be empty—thus, all sets are classes. But not all classes are sets, as some classes do not fulfill the rules laid out by the separation axiom—these are called proper classes. These proper classes can not be a part of other classes. So, the Russell set is not a set at all, but a proper class, and as classes only sort sets, it does not have to sort itself! It seems you found yourself in a barbershop that is so absurd, it simply cannot exist!