Self explanatory. Doh!

               Whoops! I keep talking about math, physics, and the ability to learn and I’m here making basic mistakes. O yea. Got myself caught in something. A kid caught me wrong at calculus, which is a good thing for both of us. Then, to rub it in, he made fun of me while I was busy fuming, by presenting me with a randomly googled logic problem. Should’ve used bing. Fail number two. For me, it’s a lesson in humility. For him, this will probably give him a push to continue learning – old farts like myself aren’t always right (hey, I resent that, I’m closer to 40 than I am to 50 – which, if you think about it logically, is rather ambiguous and could mean I’m anywhere in between 0 and 45). But I’ll get him for this.

               So how about that? Well, since I’m known to be rather proud and somewhat narcissistic (among other, even less flattering titles), I won’t reveal the first error. However, the logic problem I turned around to design a basic algorithm and I can safely reveal. Here’s the problem:

               You got 8 red pills. One’s real medicine the rest are placebos. If all pills look the same, but the real deal is heavier than the rest, what’s the fastest way to determine which is which and what’s the minimum number of operations (weight measurement by comparison) for detecting it? Assume all you have is a balance scale (a basic one, with two pans, no mass). And no calculators, either. Mano a mano, neuron to neuron. Booyah! Yea, about that…

               Kid got it in under 5 minutes. Me, on the other hand, after an hour, had to have him tell me the solution. I was thinking of recursive, backtracking, towers of hanoi-like programming. Brings back my Pascal days from the ‘80s and ‘90s. Oy, the humanity. I can’t bear the shame. Apparently I can’t calculate unassisted in my head anymore. Where’s my 386? I gotta buy him a beer, too. He he, I’ll make it a N/A, the bugger.

Post scriptum:

               Aye, I sometimes consider myself an old fart. Why? Because I can, I want to and it gives me a reason to sound wise and all-knowing (yea, about that…). White beard and all, Gandalf-like (I hate that one, the character not the actor). Also because I’m quite annoyed on seeing birthday dates like 2001, 2002, 2003, 2004 and so on (oh hey, I got married around then!). And I also feel old. But I won’t call anyone else old, not after I got passed by an 70-year old when I went hiking a few years back (and never again, since), while I was busy panting, coughing and spitting my lungs out. I’m only as old as I feel, unfortunately for me. Sir Christopher Lee (Saruman for those with Tolkien affinities, Count Dooku for those like me) is my hero. The bloody bloke just recorded a heavy metal record at 92 (years old), last year. After being a pilot and a special forces black ops in World War 2. Imagine that! No, google him if you don’t believe me, he’s the closest fellow I know to being a superhero. But then again, I’m always complaining my arse hurts after a day of telly watching and event/route/trajectory debugging so I’m a bad example.

               The solution to the above problem: two weight measurements. Take out two pills, divide the rest in two equal parts, and compare them (those equal parts). If they’re equal in weight, compare the two pills you took out – the heavier one is what we seek. If they’re not equal, take the heavier pile, remove one pill from it and compare the two remaining ones, if they’re equal, the pill you removed is the one we need. If not, locate the heavier one. Profit. Two comparisons. Bloody hell.

               Actually, I think I’ll have to have an article about Sir Lee soon(ish). The fellow is just too damn good. ‘Pon my word, hat’s off to you old chap.

Advertisements

Well? Post a comment:

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s