Monday, June 22, 2009

12 Balls Solution

Here’s the solution to the 12 Balls puzzle that I mentioned a few days (gosh…a few weeks now) ago . To state it again:

You have 12 identical-looking balls. One of these balls has a different weight from all the others. You also have a two-pan balance for comparing weights. Using the balance in the smallest number of times possible, determine which ball has the unique weight, and also determine whether it is heavier or lighter than the others.

The third branch following the 1st decision is left blank because it is very similar to the 1st one. The larger image file is available here.

12 Balls Solution

Friday, June 19, 2009

Closed for Cleaning!

I wish somebody would pay me to create an application that would detect that the work restrooms are closed for cleaning and update all employees automatically. We probably have 2 times during the day when they are being cleaned and somehow my calls are synchronized with that time.

Here’s how that application would work at a distant high-level:

1. Have a camera pointed at the restroom door that monitors the door for appearance of a yellow sign put between the door edges
-or-
(slightly cheaper) Install an infra-red monitor that is flipped whenever the yellow sign is put between the door edges blocking the monitor
-or-
(even cheaper and less automated) have the janitor flip a switch whenever they start the process.

2. The trigger chosen above should send a message to Microsoft Office Communicator server (or any other instant messaging application) where a resource for each of the restrooms is setup (just like the meeting rooms). That should turn the status of the bathroom to “Busy” or “Unavailable”.

This way, each interested person (with synchronized bladders) can add the restrooms to their contact list and find out if they are available without getting up.