Monday, June 25, 2007

Word to Your Moms

Last year when the fine folks at Merriam-Webster decided to add "google" to their dictionary, I was thrilled. The word had become so much a part of our daily conversations that English speakers everywhere had given it a life of its own. "Google" is no longer just the proper name it once was; today, it functions as both a noun naming an entity and place within the virtual world we call the Internet, and a transitive verb, complete with its own set of conjugations ("I googled it." "They're googling it right now." "You'll have to google it when you get home."). Google-users everywhere should take pride in the result of their collective efforts. The new addition to the dictionary is our small footprint in the history of this language, a fact that speaks to how well language evolves and adapts and how essential we are in helping that evolutionary process along. And think of all the possibilities that come with this territory: now we can talk about whether or not a word, phrase or name is "googleable" -- assess its "googleability," if you will. And so this boundless language continues to grow.

This year, the editors at Merriam-Webster are considering "smackdown" and "ginormous," among other potential additions. I don't know about you, but I'm holding out for two other candidates on the list: "sudoku" and "Bollywood." Who knows? Pretty soon, they just might join the ranks of "bling" and "biodiesel." And "google," of course.

Book Review: The Phantom Tollbooth

Anyone who has a passion for words and wordplay will enjoy reading The Phantom Tollbooth. In this charming children's book, author Norton Juster takes us on an adventure with his main character Milo, a young boy who enters a chaotic place called the Kingdom of Wisdom and finds that to restore order in the kingdom, he must save the banished princesses Rhyme and Reason.

When the story begins, Milo gets home one afternoon expecting to go through the same humdrum after-school routine he always goes through. But on this particular day, he arrives home to find a tollbooth waiting to transport him to a faraway place. Soon, Milo is traveling through the Kingdom of Wisdom, seeking to rescue Rhyme and Reason with the help of his companions, Tock the Watchdog and the Humbug.

Along the way, Milo meets some interesting and clever characters, such as the Whether Man (not to be confused with the Weather Man, "for after all it's more important to know whether there will be weather than what the weather will be") and Kakofonous Dischord, Doctor of Dissonance, whom Milo meets on the outskirts of the Valley of Sound. Page after page, Juster's clever puns and witty plays on words make his characters memorable and his storyline entertaining.

On his journey, Milo travels to several places within the Kingdom of Wisdom, learning useful things along the way. In Dictionopolis, for instance, he discovers the abundance of words and the importance of choosing the right word for the right occasion. On his way to Digitopolis, a land ruled by numbers, Milo ends up on the Island of Conclusions. There, he decides to himself, "From now on, I'm going to have a very good reason before I make up my mind about anything," and he learns that "you can lose too much time jumping to Conclusions."

Armed with the knowledge he has gathered on his journey through the Kingdom, Milo finally reaches the Mountains of Ignorance, where he and his faithful companions dodge and outwit various demons and ultimately save the princesses Rhyme and Reason. In the end, Milo is transported back to the present with a newfound curiosity about the world and a greater appreciation for learning.

Juster's humor throughout the story is at times subtle, at times downright silly, but often clever and thought-provoking, making this book an enjoyable read for young and old alike. They say there's a child in all of us, and The Phantom Tollbooth truly is a children's book for all ages.

Thursday, June 21, 2007

Amtrak, Anyone?

I was skimming some online news articles this morning when a recent headline declaring "Sewage-spewing plane disgusts passengers" caught my attention. Being a somewhat-frequent flyer, I was intrigued and had to know more. Let me tell you -- after having read that article, never again will I complain about delayed flights, middle seats, and "random" security screenings. Here's what happened...

Eight days ago, a Continental Airlines flight departed from Amsterdam, bound for New Jersey. At some point during the early part of the flight, a lavatory toilet overflowed and waste spilled into the aisles. (It was later determined that someone had flushed -- or attempted to flush -- latex gloves down the toilet, which caused the blockage and subsequent overflow.) In an unplanned stop, the plane landed in Ireland so that the problem could be fixed, but once the flight resumed and the plane was cruising somewhere over the Atlantic Ocean, the toilet started to malfunction again. Passengers were forced to minimize food consumption and hold their noses for several hours, until the plane landed in Newark, New Jersey. Needless to say, Continental has issued an apology, as well as travel vouchers, to the 168 travelers on board.

Eww. I guess what they say is true after all: Shit happens. Continental's management team is probably sitting with all their fingers and toes crossed right now, hoping that no lawsuits are sent their way. But let's take the glass-is-half-full approach. At least nobody on board had TB.

Wednesday, June 20, 2007

The Power of Object-Oriented Design


This morning at work, I was walking down the hall and I overheard the following conversation:

Person 1: "You have one class object for each one. It would be so easy to do."
Person 1 to Person 2, in reference to Person 3: "Look at him! He's so excited, he's got that 'I have to pee' look on his face."
Person 3: (smiling excitedly as if needing to pee, apparently)

Fan-tastic. And yet we wonder why people think we're strange.

Thursday, June 14, 2007

Picking Your Brain: Third and Final Installment (At Least for Now)

I will end this mini-series with the following brain teaser. This one's my favorite, because it's one of the most clever and challenging puzzles I've ever come across. Give it a go. The solution is quite beautiful.

The Infamous Twelve Pills Problem
You are given twelve pills, eleven of which are poisonous. The non-toxic pill weighs differently than the eleven toxic ones. Determine, using a two-platform relative weighing scale and no more than three weigh-ins, which is the non-toxic pill. (Note: You do not know beforehand whether the non-toxic pill is heavier or lighter than the toxic pills.) Level of difficulty: tougher than the toughest gangsta on the streets of CPT.

One of my friends suggested feeding the pills to twelve of his enemies and seeing which one survived. Not exactly what I had in mind, but it works. Now for the not-so-murderous solution...

Separate the 12 pills into 3 groups (call them groups A, B and C), each consisting of 4 pills. Place groups A and B on the scale, one group on each platform. If the weights are equal, you have two weigh-ins left and have determined that the good pill is in group C. For the second weigh-in, take 3 pills from group C and 3 pills from group A. If the weights are equal, the good pill is the remaining pill from group C. If the weights are unequal, the good pill is one of the three from group C that are on the scale, and you now know whether the good pill is heavier or lighter than the rest. The third weigh-in will then determine conclusively which is the good pill.

If, in the first weigh-in, groups A (pills A1, A2, A3 and A4) and B (pills B1, B2, B3 and B4) were found to be of unequal weight, then in the second weigh-in, put B1, B2, B3 and A4 on one platform of the scale, and C1, C2, C3 and B4 on the other platform. Depending on the relative weights, you'll be able to determine from the second weigh-in which of the following is true, and the third weigh-in then gives you the solution:
  1. The good pill is A1, A2 or A3, and you will know whether it's heavier or lighter than the bad pills based on the result of the first weigh-in. (This statement is true if B1+B2+B3+A4 = C1+C2+C3+B4 in the second weigh-in.)
  2. The good pill is B1, B2 or B3, and you will know whether it's heavier or lighter than the bad pills based on the result of the first weigh-in. (This statement is true if the scale flips, i.e., the lighter side from the first weigh-in is now the heavier side in the second weigh-in, when you move B1, B2 and B3 to the other platform with A4.)
  3. The good pill is either A4 or B4, and you will know whether it's heavier or lighter than the bad pills based on the result of the first weigh-in. (This statement is true if the scale doesn't flip in the second weigh-in.)
Lovely, no?

Wednesday, June 13, 2007

Picking Your Brain: Second Installment

Puzzle #4: You have eight marbles. One of them is defective and weighs less than the others. Given a balance to measure marbles against each other, how do you find the defective marble in two weigh-ins? Level of difficulty: easy.

Puzzle #5: You have an employee working for you for seven days. Each day, you pay the employee with a single link from a gold chain with seven links. If you are only allowed to make two cuts in the chain, how do you pay your employee at the end of each day? Level of difficulty: moderate.

Here are the solutions:

Solution #4: Let's label the marbles A, B, C, D, E, F, G and H. In the first weigh-in, we measure A, B and C against D, E and F. If they are equal, we know the lighter marble is either G or H, and we can use the second weighing to determine which one it is. If, on the other hand, A, B and C together are heavier or lighter than D, E and F, we have narrowed down which group of three contains the defective marble. Then in the second weigh-in, we measure two of those three marbles against each other. If one is lighter than the other, we know it's defective. If the two marbles are equal in weight, then the third marble in the group is defective.

Solution #5: You cut the chain with two cuts to make three pieces: one piece is a single link, the second piece is two links, and the third piece is four links. In other words, you make the first cut between the first and second links, and the second cut between the third and fourth links. Now, on the first day, you pay the employee with the single-link piece. On the second day, you take back the single-link piece and give the employee the two-link piece. On the third day, you give the employee the single-link piece, so he now has been paid three gold links. On the fourth day, you take back the single-link and two-link pieces, and give him the four-link piece. On the fifth day, you give him the single-link piece, so he now has five links. On the sixth day, you take back the single link and give him the two-link piece, so he now has six links. On the seventh day, you give him the remaining link.

Are we havin' fun yet?

Tuesday, June 12, 2007

Picking Your Brain

It might not be as fun as picking your nose, but since I've been on a logic-puzzle kick lately, I thought I'd post some brain teasers here. Indulge your inner geek and try your hand at some of these. More puzzles to come later this week.

Puzzle #1: You have 100 doors in a row that are all initially closed. You make 100 passes by the doors, starting with the first door. The first time through, you visit every single door and toggle the door (i.e., if the door is closed, you open it; if it's open, you close it). The second time through, you visit every second door (doors #2, 4, 6, etc.). The third time through, you visit every third door (doors #3, 6, 9, etc.). This continues until you only visit the 100th door. What state are the doors in after the last pass? Which are open and which are closed? Level of difficulty: easy.

Puzzle #2: Two ropes that burn non-uniformly each burn in one hour. Using only the two ropes and a box of matches, how do you measure fifteen minutes? (Note: All you know about the ropes is that they burn non-uniformly, so in 30 minutes, it may be the case that only 10% of the rope has burned. If that is true, it must follow that the remaining 90% will burn in 30 minutes as well, since the entire rope takes one hour to burn. Furthermore, you cannot assume that the two ropes burn in the same non-uniform way, i.e, if you light both ropes at the same time, they'll both burn in one hour, but at any point during that hour, the unburned length may be different for the two ropes.) Level of difficulty: moderately easy.

Puzzle #3: You are in front of two doors. One door leads to wealth and the other leads to nothing of value, but you don't know which door is which. There are two people standing near the doors, one who always lies and one who always speaks the truth; again, you don't know which person is which, but both of these people know what's behind each door. You are allowed to ask one yes/no question to one person to determine which door leads to the riches. What do you ask and to whom? Level of difficulty: moderate.

Warning: Solutions are below so look away now if you're still working on the puzzles!

Solution #1: The cleanest solution is to determine how many factors the number on the door has. If the number of factors is odd, then that door is toggled an odd number of times, and therefore is open by the end of the 100th pass. (Remember, all the doors start out closed.) If the number of factors is even, then by the same logic, that door is closed by the end of the 100th pass. For instance, door #8 will be opened in the first pass, then closed in the second pass, then opened in the fourth pass, and then closed in the eighth pass, never to be toggled again. Door #9 will be opened in the first pass, closed in the third pass, and then opened in the ninth pass, never to be closed again. Following this pattern, all doors numbered with a perfect square (1, 4, 9, 16, 25, 36, etc.) will be open at the end of the 100th pass. The rest will be closed.

Solution #2: Light one rope on both ends. At the same time, light the other rope at one end. The first rope (the one lit on both ends) will burn completely in 30 minutes. At the end of the 30 minutes, light both ends of what remains of the second rope. The remainder will then burn in 15 minutes.

Solution #3: Ask either person (since you don't know which is which) the following question: "If I ask the other person if the door on the left leads to wealth, will he/she say yes?" If the person answers "no," then the door on the left leads to wealth. If the person answers "yes," then the door on the left leads to nothing. Here's the logic: Let's assume the door on the left leads to wealth. If you ask the truth-teller the question, he'll say "no" because that's what the liar would say. If you ask the liar the question, he'll say "no" because he knows the truth-teller would say "yes." Either way, a "no" response indicates that the door on the left leads to wealth. On the other hand, if the door on the left leads to nothing of value, the truth-teller would answer "yes," because that's what the liar would say, and the liar would answer "yes" because the truth-teller would say the opposite.

Okay, now you can go back to picking your nose.

Monday, June 4, 2007

Evan Almighty

I'm thrilled to say that this year's Spelling Bee champion is Evan O'Dorney, a thirteen-year-old from the great state of California who happens not to care much for spelling. The implicit irony in his participation and victory made the Bee even more enjoyable to watch. But I think Evan's equanimity throughout the entire event, as he conquered words like "pappardelle" and "schuhplattler," is what makes him truly unique and inspiring to his audience.

Evan's performance wasn't the only exciting thing about the 2007 competition. In the fifth round, Samir Patel, the speller who was favored to win, was eliminated with the word "clevis," spelling it as "clevice." He later told an interviewer, "If I had been slow and cautious like I always am, I would have got it right. I outsmarted myself." Whatever, man. You're a disgrace to the Indian community. Can you spell "failure"?

Fortunately, Samir's arrogance and unsportsmanlike attitude were tempered by the likes of Jonathan Horton, a competitor from Arizona who insisted on giving all spellers within a seven-foot radius an enthusiastic high-five after each round, and Joseph Henares of Connecticut, whose entire face would light up with even the slightest clue about a word's orthography. These kids make the Bee so worthwhile to watch, reminding us that even when they're struggling to spell big, big words that they'll probably never use, it's the little things in life that count.