PETZOLD BOOK BLOG
Charles Petzold on writing books, reading books, and exercising the internal UTM
Babies Are Illogical: The “Lost” “Chapter” of “Code”
May 28, 2008
New York, N.Y.
I recently discussed
how I cut some pages from my 1999 book
Code: The Hidden Language of Computer Hardware and Software in a futile attempt to get the page count down. Those pages focused on some logic puzzles of the Victorian author beloved by geeks worldwide: the Rev. Charles Dodgson, a.k.a. Lewis Carroll.
Yesterday evening I rummaged around in my attic — actually I did the New York City equivalent, which involved visiting the Manhattan Mini Storage building on Spring and Varick — and found the box in which in the summer of 1999 I dumped all the existing printed and hand-written pages of Code and some magnetic media. The magnetic media turned out to be four 100-megabyte Zip disks, and fortunately we still own a Zip drive with a USB cable, and fortunately the disks were still readable. (It's only been nine years. I suspect the magnetic-media-anxiety-factor is much worse at the 20-year time period.)
Here's the original beginning of Chapter 10:
10. Babies Are Illogical
By profession, Charles Lutwidge Dodgson was a mathematician. Born in 1832 to a well-to-do family in Cheshire, England, he earned a degree in mathematics at Christ Church, Oxford, and became Mathematical Lecturer there in 1855, a post he held for over 25 years. But Dodgson’s talents went far beyond mathematics. Ever since childhood he enjoyed drawing pictures, writing stories and poems, and creating games and puzzles for the amusement of his family and friends. In 1856 he purchased a camera and photographic chemicals, and pursued his new hobby with near-total abandon. As a result, Charles Dodgson is today regarded as one of the best portrait photographers of Victorian England, and his photographs of children are unrivaled. Dodgson had a special rapport with children that was also revealed when he wrote and published under the pen name Lewis Carroll two enchanting books about an adventurous girl named Alice.
Although most of Charles Dodgson’s books on mathematics were written for his students and fellow mathematicians and published under his real name, a significant exception is the book Symbolic Logic, published in 1896 just two years before his death. Despite its forbidding title, Symbolic Logic was intended for a general audience—perhaps not for every reader of the Alice books but maybe some of them. It is a peculiar mix of difficult concepts in the field of mathematical logic enlivened with examples that are pure Lewis Carroll. The book culminates with a collection of 60 whimsical logic puzzles known as sorites (se-RYE-teez). The first one goes like this:
(1) Babies are illogical;
(2) Nobody is despised who can manage a crocodile;
(3) Illogical persons are despised.
Not all of the statements in a sorites need necessary be true. These certainly aren’t. (Most of us know likeable illogical persons and can easily imagine a despicable crocodile wrangler.) But the idea here is to assume that all the statements are true, and then to arrive at an overall conclusion. This a fairly easy sorites, and after mulling it over for awhile, most people are able to come to the correct solution:
Babies cannot manage crocodiles.
The 60 sorites in Symbolic Logic get progressively more difficult and more involved, and the last one in the book is a monster:
(1) The only animals in this house are cats;
(2) Every animal is suitable for a pet, that loves to gaze at the moon;
(3) When I detest an animal, I avoid it;
(4) No animals are carnivorous, unless they prowl at night;
(5) No cat fails to kill mice;
(6) No animals ever take to me, except what are in this house;
(7) Kangaroos are not suitable for pets;
(8) None but carnivora kill mice;
(9) I detest animals that do not take to me;
(10) Animals, that prowl at night, always love to gaze at the moon.
Clearly this is beyond the limits of the juggling power of most human brains. Some kind of clever technique would be useful—perhaps mathematical in nature.
The earliest extensive writings on the subject of logic date from the 4th century B.C.E. with the collection of Aristotle’s teachings known as the Organon....
I replaced this all with the sentences "What is truth? Aristotle thought that logic had something to do with it. The collection of his teachings known as the Organon (which dates from the fourth century B.C.E.) is the earlier extensive writing on the subject of logic....
Later in the chapter (equivalent to page 92 of the printed book) I deleted the following after discussing the "All men are mortal..." syllogism:
Using Boolean algebra may seem like overkill for proving the obvious fact (particularly considering that Socrates proved himself mortal 2,400 years ago), but let’s see how it helps with the first of Lewis Carroll’s sorites from Symbolic Logic. Of course, Lewis Carroll was familiar with the work of George Boole. Indeed, without George Boole few mathematicians would have been engaged in the study of logic in the late 19th century. Lewis Carroll used his own notation for solving syllogisms and sorites, but we can use Boole’s. Here’s the first of Lewis Carroll’s sorites again:
(1) Babies are illogical;
(2) Nobody is despised who can manage a crocodile;
(3) Illogical persons are despised.
In Symbolic Logic Lewis Carroll also helps out by defining the universe (that is, the things we’re talking about here) and suggested letters for the qualities of various classes that comprise this universe. Here’s his suggestion:
Univ. “persons”; a = able to manage a crocodile; b = babies; c = despised ; d = logical.
What’s implied here is that the universe is divided into the class of persons who can manage crocodiles and the class of those who cannot. The universe is also divided into people who are babies and people who are not, and into people who are despised and people who are not. And finally, the world is divided into logical people and illogical people.
“Babies are illogical.” This means that the intersection of the class of babies (B) and the class of persons who are illogical (1 – D) is the class of babies:
Like many of the statements here, this can also be written in other ways, for example, (B × D) = 0. This means that the intersection of babies and logical persons is nothing.
“Nobody is despised who can manage a crocodile.” This means that the intersection of the class of despised persons (C) and the class of persons who cannot manage crocodiles (1 – A) is the class of despised persons:
“Illogical persons are despised.” The intersection of the class of illogical persons (1 – D) and despised persons (C) is the class of illogical persons:
To solve this, we can begin by substituting the third equation in the first:
and then use the associative law to regroup:
But from the first equation we know that B × (1 – D) equals B, so:
Now substitute the second equation into this:
But we already know that (B × C) equals B, so:
which means that the intersection of the class of babies and the class of people who cannot manage crocodiles is the class of babies. At this point, the sorites is basically solved, but let’s go a little further using the distributive law:
The only way that this can be true is if (B × A) equals 0:
Thus, the intersection of the class of babies and the class of people who can manage crocodiles is 0. In other words: Babies cannot manage crocodiles. (But you knew that.)
Boolean algebra can also be used to determine if something satisfies a certain set of criteria. Perhaps one day you walk into a pet stop ...
The words sorites is Greek for "heap" and refers here to a heap of syllogisms. There is also a "sorites paradox" that involves a real heap of grain. Take one grain out and you still have a heap. By induction, you can continue removing grains and it still remains a heap even when no grains are left.
Boolean logic is a logic of classes. You can also solve sorites using predicates and implication. While working on Chapter 12 ("Logic and Computability") of my forthcoming book
The Annotated Turing: A Guided Tour through Alan Turing's Historic Paper on Computability and the Turing Machine I tried to get Lewis Carroll involved once again. This is a rather sketchy passage from an early draft of Chapter 12:
Analyzing Aristotelian syllogisms (“All men are mortal; Socrates is a man; hence…”) or the straightforward sorites devised by Lewis Carroll. Here’s a typical Lewis Carroll sorites of moderate difficulty:
(1) No kitten, that loves fish, is unteachable;
(2) No kitten without a tail can play with a gorilla;
(3) Kittens with whiskers always love fish;
(4) No teachable kitten has green eyes;
(5) No kittens have tails unless they have whiskers.
[Lewis Carroll, Symbolic Logic: Part I. Elementary (Macmillan, 1896), pg. 118.]
We could assign five letters or little words to these five sentences, but we wouldn’t know what to do with them because the letters do not represent anything about the structure of the sentence.
We can slightly modify our thinking by assigning letters (or words) not to sentences but to predicates.
A universe of discourse. We’re talking about kittens.
Monadic predicates: LovesFish, Teachable, Tailed, Whiskered, GreenEyed, GorillaFriendly.
(1) LovesFish → Teachable
(2) GorillaFriendly → Tailed
(3) Whiskered → LovesFish
(4) Teachable → – GreenEyed
(5) Tailed → Whiskered
By taking them in the order (2), (5), (3), (1), (4) we have:
GorillaFriendly → – GreenEyed
The conclusion, of course, is “No kitten with green eyes will play with a gorilla.” [Ibid, 160] But you knew that.
(Professor Dodgson uses very different notation and techniques.)
Google Book Search has a copy of
Symbolic Logic, and the book was also republished by Dover. The sample sorites begin on page 112, but be forewarned that some of the puzzles in this book are anti-Semitic and rascist, which comes as a shock even if you're accustomed to reading Victorian literature.
Although Symbolic Logic says "Part I. Elementary" on its title page, Carroll did not live to publish subsequent parts. The book Symbolic Logic, edited with annotations and an introduction by William Warren Bartley, III (Harvester Press, 1977) has a recreation of the uncompleted and long-lost Part II.
(c) Copyright Charles Petzold
www.charlespetzold.com