×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

The Odd Pill
2

The Odd Pill

The Odd Pill

(OP)
An interesting question brought to my attention last night.  Its supposedly a MS interview question.  Some people get it right away.

You have 5 bottles of pills.  Each bottle contains 100 pills.   In 4 bottles the pills weigh 10g each.  In 1 bottle the pills weigh 9g each.  All pills look identical.  Using only 1 measurement how do you find which bottle contains the 9mg pills?

hint:

CODE

The scale is not a difference scale.

RE: The Odd Pill

Submerge the bottles under water and see which one floats higher than the others.

/random stab in the dark/

-------------
Cuvou.com | My personal homepage
Project Fearless | My web blog

RE: The Odd Pill

2

CODE

take 1 pill from bottle 1
2 pills from bottle 2
3 from bottle 3
4 from bottle 4
5 from bottle 5

put these 15 pills together on the scale

subtract weight on the scale in g from 150g
diff in g points to bottle containing 9g pills

p5

RE: The Odd Pill

(OP)
nice job p5 :)

RE: The Odd Pill

My first solution was to read the bottles.

The only measurement solution I can think of would potentially require 2 measurements.  Put two bottles on each side of the difference scale.  If it balances then the odd bottle was the light one.  Otherwise, take the lighter of the two sides and weigh the two bottles against each other.

The real solution is pretty cool though.

RE: The Odd Pill

take 1 pill from bottle 1, 2 pills from bottle 2, 3 pilles from bottle 3, 4 pills from bottle 4, and 5 pills from bottle 5.  Weigh the 15 pills. subtract their weight from 150.  The resulting number is the number of the bottle you are looking for.

RE: The Odd Pill

I think you can go up to as many bottles as there are pills, so with 100 pills in each of 100 bottles you can still identify the 9g pills with only one measurement.

My alarm clock causes time travel. When I hit snooze, no apparent time passes before the alarm sounds again, but the universe has in fact moved forward through time by ten minutes!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close