This week's book giveaway is in the Cloud/Virtualizaton forum.We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!

# measurment puzzle

rehans oberoi
Ranch Hand
Posts: 174
You have 4 jars of pills. Each pill is a certain weight, except for contaminated pills contained in one jar, where each pill is weight + 1. How could you tell which jar had the contaminated pills in just one measurement?

Stefan Wagner
Ranch Hand
Posts: 1923
Do all jars contain the same numbers of pills and how much?
We may select as many as we like?

The contaminated pills are red!

Murali Mohan
Ranch Hand
Posts: 66
let the weight of each uncontaminated pill be 'x'
so weight of contaminated pill is 'x+1'

there are 4 jars ( say 1, 2 ,3 and 4)

now take 1 pill from jar 1
now take 2 pills from jar 2
now take 3 pills from jar 3
now take 4 pills from jar 4

weigh them all together.
now the weight will be 10x + n
where n is the jar number which contains the contaminated pills.

let me know if I am wrong.