×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*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.

# The Odd Pill2

## 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.
Replies continue below

### 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

(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.

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:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!