Welcome to EMC Consulting Blogs Sign in | Join | Help

Natalya Voskresenskaya Blog

Are you smarter than a 6th grader?

Try your problem solving skills.

Here is the problem I was presented with at the SharePoint Connections 2007. For some reason SharePoint folks did not want to hang out with me, so I've found myself in the company of "SQL Geeks" ... SQL is my OTHER favorite thing...

So here is the thing, one of the SQL gurus tells me the "problem" he had to solve at his job placement interview, he also specifically mentioned that the problem might not have a solution, it is just a way to explore your way of thinking.

Here it is:

1. you have 8 balls. all of them are of the same weight, but one.

2.   you do not know if this one ball is  heavier or lighter then the others

3.  you have the scale to measure the weight of these balls, but you can measure it only 3 times.

I'm opening the competition for all of you to tell me the right answer.  Send you ideas in form of comments.

The reason why I want to post it is that I've given this problem to my 11 year old son, who in turn was trying to get away from dong his extra curriculum activities (like vocabulary enhancement).

To make the story short he solved this problem in 1 hour!!!!!!

Hellooooooo, in ONE hour. it took me the whole flight from Orlando to New York  to even overcome the fact that this "problem" might have a solution.

Try your self out, I'll post the solution next week.

Published 17 November 2008 16:15 by Natalya.Voskresenskaya

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Mark said:

What's the question?

November 17, 2008 18:34
 

Lee said:

To answer specifically what you have posted, there is not enough information to come up with a solution.  For example, we don't know if the balls are the same size and appearance.

November 17, 2008 19:28
 

Natalya said:

Balls do look exactly the same

November 17, 2008 19:32
 

Natalya.Voskresenskaya said:

Let me clarify it.

All balls do look the same. the question is - how to identify the "odd" ball through only 3 weighing

November 17, 2008 19:36
 

Pedro Miguel said:

Hi Natalya. Here goes my shot:

I believe this works like the searching for record algorithm, that's why it was given at an SQL job interview. Goes like this:

Let's call the balls 1,2,3,4,5,6,7,8.

We need to first assess what Normal and what Odd means.

Weighing 1 = (1,2 | 3,4) ("|" represents the middle of the scale :-D )

If the scale is level, then the Odd is among 5,6,7,8 and Normal is 1,2,3,4

If the scale is not level, then Odd is among 1,2,3,4 and Normal is 5,6,7,8

So now we know what a Normal ball looks like (weighs like, that is), and we know where the Odd ball is.

Let's name the group where the Odd ball is "Odd-subgroup" with balls o1,o2,o3,o4 and the "Normal-subgroup" with balls n1,n2,n3,n4.

We repeat the process with the Odd-subgrup.

Weighing 2 = (o1 | o2)

If the scale is level, then Odd is among o3,o4 and o1,o2 are normal.

If the scale is not level, then Odd is among o1,o2 and o3,o4 are normal.

Now the Odd-Subgroup has been reduced. Let's call it o1,o2 irrespective what balls they are. The other 2 balls are now n's  :-)

We repeat the process, but this time weighing ONE Odd ball against what we know is a Normal ball, for example n1.

Weighing 3 = (o1 | n1)

If the scale is level, then the Odd ball is o2.

If the scale is not level, then the Odd ball is o1.

Did I get it right, Natalya ?

PM

November 17, 2008 22:34
 

vera73 said:

To simplify, I've divided the method into 3 stages: 1, 2 (a and b) and 3. It took me less than an hour to figure out :)

Stage 1: First you weigh 4 of the balls, 2 on each side of the scale. If the scale is even you know the ball is one of the remaining 4. Go to Stage 2a. If the scale is uneven, Go to Stage 2b.

Stage 2a: Then you weigh 2 of the remaining 4. If the scale is even, you know the 'odd' ball is one of the remaining 2. Go to Stage 3a below. If the scale is uneven, go to Stage 3b below.

Stage 2b: Remove two of the balls from the scale. If the scale is now even, the odd ball is one of the other 2. Go to Stage 3a. If the scale is uneven, go to Stage 3b.

Stage 3a: Remove one of the balls from the scale and put one of the remaining 2 balls on the scale. If it is now level, you know the odd ball is the one you haven't weighed yet. If the scale is uneven, you know the odd ball is the one you just put on the scale.

Stage 3b: Remove 1 of the balls from the scale and put one of the other balls on the scale. If it is now even, you know the odd one is the one you just removed. If it is uneven, you know the odd one is the ball that was left on the scale.

November 18, 2008 10:27
 

schneestorm said:

Three simple steps. Took me less then 3 minutes. Came to the same conclusion as vera73 but his/her post is more elegant and concise than mine would have been.

November 18, 2008 14:06

Leave a Comment

(required) 
(optional)
(required) 
Submit
Powered by Community Server (Personal Edition), by Telligent Systems