Monday, November 2, 2015

What is this Boole's Google Doodle?

I imagine the scene. You wake up this morning (yes, you), dizzy after a brave night of questionable choices, you fire up Google, and here it is! A new doodle! What is it?

Wait! There is the play button! Maybe it's another game! Like that time Pac-Man's Doodle made the world losing 120 million dollars in productivity! (Well, maybe this is not true). Or like the Halloween one, where you collected candy avoiding bats and ghosts. You passed the day collecting yellow candies. (Because you are a despicable person. Blue should have won!). Let's play!

Huh. What's that? Blinking... stuff? How do you play? You cannot. Green, red, yellow... Maybe it's a traffic light? You try to do the robot in rhythm, but no, it doesn't make sense. You click on it, and it goes to the search results page of "George Boole". Humph! "Who is this guy?" you say, reddened from rage "That's... that's... that's booloney, Google!" (The questionable choices are really catching up on you).

Yes, probably this doodle is not the most perspicuous. The people who knows who Boole is, I guess won't be too much excited by it, and the people who don't know the adjective boolean will not understand what's going on. Well, if you stumbled on this page with this question in mind, I'm here to help you!

So, the doodle of today is to celebrate the 200 years of George Boole's birth. Who is George Boole? This guy:

Boole, when it was not busy cultivating his magnificent sideburns (i.e., rarely), was a mathematician. A rather classical one, actually, he collected some results on differential equations and analysis that are still used. Yet, nothing to google-doodle about. His most important works are instead a small pamphlet called Mathematical Analysis of Logic, and the big budget sequel An Investigation of the Laws of Thought on Which are Founded the Mathematical Theories of Logic and Probabilities (hopefully the book is longer than the title). His idea was to pick Aristotelian logic and systematizing it, formalizing it. Conjunctions and disjunctions (and, or...) were not considered anymore grammatical structures, but mathematical ones. They were operations between sets. It was huge: Boole just kicked out the philosophers from logic, and made it a mathematical concept, in fact an algebraic one, therefore making possible all sorts of applications (and computer science is just one of the most famous).

How does it work? It's called Boolean algebra. In the most basic instance, it's just "true" and "false", and the operations AND, OR and NOT between them.
- AND is like multiplication: true AND true is true, all the others are false, e.g. false AND true is false
- OR is more or less like addiction: false OR false is false, all the others are true, e.g. true OR false is true
- NOT is clear: NOT true is false, and NOT false is true.

Now see again the doodle: it's just showing this operations! When x appears, it means x is true, otherwise x is false. So the "G" (i.e., x AND y) lights up only when both x and y appear, the "l"  (NOT x) only when x does not appear, and so on. There is another operation I haven't talked about: XOR. It's the "exclusive or", and x XOR y only if x or y appear, but not at the same time.

Wait, there's more! If you substitute "true" and "false" with "on" and "off", then you have how all the circuits in all the computers function. They are true physical manifestations of boolean operations: if you open your laptop* you look into it, you will find XOR gates, AND gates, and so on.

*I'm not going to be responsible for this.

But is this logic? Why are they called like conjuctions and disjunctions? In a more complicated instance, AND, OR and NOT are operations among sentences. If you have two sentences, "sentence A" and "sentence B", then "sentence A AND sentence B" is the conjunction of the two. That is... "sentence A and sentence B". Whoah, deep.

I don't think that clarified anything. The parallel is: "sentence A AND sentence B" is true if and only if both sentences are true, and x AND y is true if and only if x is true and y is true. So the operations respect the logic, and the logic defines the operations: AND is really just "and", OR is just "or", but instead of connecting sentences, they give you the truth value of the sentences connected. Move on.

You can see here that boolean operations are also operations on sets. AND is just the intersection, OR the union, XOR the symmetric difference. Try it on Google! Search for "Google is awesome" AND "Yog-Sothoth evocation ritual", and then for "Google is awesome" OR "Yog-Sothoth evocation ritual". Now! Or else! (Google is watching you trying). So you know now why a search engine is so grateful to Boole (and why you should always have in handy the mystic scimitar of Barzai).

Don't be less evil

There are many "boolean" things around. The aforementioned boolean algebras, but also boolean circuits, boolean expressions (those things in Excel that permits you to do magic), boolean functions, boolean models, boolean processors... Even a crater on the Moon named Boole!

Boolean algebras, by the way, are essential in Set Theory. They are the basic of the forcing method, the paradigm-changing method that in recent years permitted to prove many independency results, therefore establishing once and for all that mathematics is incomplete, many questions have no answer. It's easy: build a boolean algebra that does the trick, then find an ultrafilter of it (it should be generic, mind you!), then in the generic extension...

You know what? This is not the time to talk about this. This needs a whole other posts. So that's it, for now! Enjoy your Boole day AND have fun! OR NOT! Ha!

(wait for it...)


(I think I blew it)