Barber paradox
From open-encyclopedia.com - the free encyclopedia.
The Barber paradox is a paradox that relates to mathematical logic and set theory. The paradox considers a town with a male barber who shaves daily every man who does not shave himself, and no one else. Such a town cannot exist:
- If the barber does not shave himself, he must abide by the rule and shave himself.
- If he does shave himself, according to the rule he will not shave himself.
Thus the rule results in an impossible situation.
This paradox is attributed to the Bertrand Russell, a British logician who in 1901 constructed Russell's paradox to demonstrate the self-contradictory nature of Georg Cantor's naive set theory by formalizing the Barber paradox. The paradox also underlies the proof of Gödel's incompleteness theorem as well as Alan Turing's proof of the undecidability of the halting problem.
In Prolog, one aspect of the Barber paradox can be expressed by a self-referencing clause:
shaves(barber,X) :- male(X), not shaves(X,X). male(barber).
where negation as failure is assumed. If we apply the stratification test known from Datalog, the predicate shaves is exposed as unstratifiable since it is defined recursively over its negation.
de:Barbier-Paradoxon es:Paradoja del barbero et:Habemeajaja paradoks fr:Paradoxe du barbier ja:床屋のパラドックス pt:Paradoxo do barbeiro zh:理发师悖论