PDA

View Full Version : Interview Question


J_V
02-09-2005, 12:44 AM
Here is an interview question I heard. It is to be worked with pen and paper. I could not solve it.

Mary has 2 20oz glasses full of water. She also has one 14oz glass and one 8oz, both of which are empty. Without a measuring tool of any kind, find a way to end up with 6oz of water in each of the smaller cups, in exactly six steps.

Let's see who's a dimensional analysis specialist out there.

brassnuts
02-09-2005, 12:48 AM
Are you allowed to throw some water away? If so, this is really easy.

partygirluk
02-09-2005, 12:53 AM
1) Fill the 14 oz. glass.

2) Pour the 14. oz glass so that it fills the 8 0z. There is now 6 Oz. left in this glass.

So now we have:

20/20 and 6/20, 6/14 and 8/8

iii) Pour the 20/20 so that it fills the 6/20.

iv) Now do the opposite of iii)

v) Drink the water in the 8 0z. glass.

vi) Pour the 6/20 into the 8 0z. glass.

Dynasty
02-09-2005, 12:56 AM
[ QUOTE ]

v) Drink the water in the 8 0z. glass.

[/ QUOTE ]

Foul!

TheIrishThug
02-09-2005, 12:56 AM
20oz one poured into 14oz
leftover 6oz go into 8oz
repeat with the other, but empty the 14oz and fill it with the left over 6oz

jason_t
02-09-2005, 12:57 AM
step 1: fill the 14 oz. from one of the 20 oz. glasses
step 2: fill the 8 oz glass from the 14 oz. glass

the next two steps are superfluous; they insure we have six steps

step 3: pour the full 20 oz. glass into the partially filled 20 oz. glass
step 4: repeat step 3
step 5: empty the 8 oz. glass
step 6: pour the partially filled 20 oz. glass into the 8 oz glass

J_V
02-09-2005, 12:58 AM
No spilling or drinking.

Dynasty
02-09-2005, 01:00 AM
[ QUOTE ]

step 5: empty the 8 oz. glass

[/ QUOTE ]

Foul!

Piz0wn0reD!!!!!!
02-09-2005, 01:00 AM
Step 1, eyeball it.

Step 2, call the interviewer a jerk.

J_V
02-09-2005, 01:01 AM
I've been at it for an hour and I cannot figure it out for the life of me.

jason_t
02-09-2005, 01:02 AM
He didn't say so.

Edit: I see now he added a new post that says that. Solution given in reply.

partygirluk
02-09-2005, 01:03 AM
Start with: 20/20, 20/20, 0/14, 0/8.

i) Pour from the 20/20 so that it fills the 14.

20/20, 6/20, 14/14, 0/8.

ii) Pour from the other 6/20 into the 8.

0/20, 20/20, 14/14, 6/8.

iii) Use the remaining full 20 oz. glass to fill the 8 0z.

0/20, 18/20, 14/14, 8/8.

iv) Pour the 8 oz. into the empty 20 oz.

8/20, 18/20, 14/14, 0/8

v) Fill the 8 oz. glass from the 14 oz. glass.

18/20, 18/20, 6/14, 8/8.

vi) Use the 8 oz. glass to fill the 18/20.

8/20, 20/20, 6/14, 6/8.

What job do I get?

jason_t
02-09-2005, 01:06 AM
step 1: fill the 14.
step 2: pour the rest from step 1 into the 8
step 3: pour 2 from the other 20 into the 8
step 4: pour the 8 into the empty 20
step 5: fill the 8 from the 14
step 6: pour 2 from the 8 into the 20 with 18 in it (from step 3)

J_V
02-09-2005, 01:18 AM
Son of a freaking gun. I'm impressed. How did you get it? Was it trial error?

partygirluk
02-09-2005, 01:21 AM
Kind of trial and error. But with logic I was able to see which trials were more likely to work than others. I might come back and explain my thought process tomorrow, but it is 05:20 here and I have not slept.

jason_t
02-09-2005, 01:27 AM
You could try working backwards

There are only two first steps, and with some logic you can see which one leads to the right path. Each time you have a branch, you again reason logically to choose the right path based on the intuition you developed when you worked backwards.

I'll let you think about it on your own now.

Edit: Props to partygirl for solving it too.

Dynasty
02-09-2005, 01:33 AM
[ QUOTE ]

ii) Pour from the other 6/20 into the 8.

0/20, 20/20, 14/14, 6/8.

iii) Use the remaining full 20 oz. glass to fill the 8 0z.

0/20, 18/20, 14/14, 8/8.

[/ QUOTE ]

This is why the problem is difficult for most people, and possibly for you JV. You can easily understand the math and the idea of moving the water around. But, the idea of completing one of you goals (getting 6 oz in the 8 oz glass) and then "ruining" it by filling it up is counter-intuitive.

Also, the 2 oz movement is a the type of thing people don't look for. It's small. People tend to look for big impact plays.

Any2ForU
02-09-2005, 01:35 AM
[ QUOTE ]
What job do I get?

[/ QUOTE ]
Bartender...now quit wasting my time and pour me another!