• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 07:40
CEST 13:40
KST 20:40
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
Serral wins EWC 202519Tournament Spotlight: FEL Cracow 20259Power Rank - Esports World Cup 202580RSL Season 1 - Final Week9[ASL19] Finals Recap: Standing Tall15
Community News
[BSL 2025] H2 - Team Wars, Weeklies & SB Ladder2EWC 2025 - Replay Pack2Google Play ASL (Season 20) Announced35BSL Team Wars - Bonyth, Dewalt, Hawk & Sziky teams10Weekly Cups (July 14-20): Final Check-up0
StarCraft 2
General
#1: Maru - Greatest Players of All Time Greatest Players of All Time: 2025 Update Serral wins EWC 2025 Power Rank - Esports World Cup 2025 EWC 2025 - Replay Pack
Tourneys
Sea Duckling Open (Global, Bronze-Diamond) TaeJa vs Creator Bo7 SC Evo Showmatch Sparkling Tuna Cup - Weekly Open Tournament FEL Cracov 2025 (July 27) - $10,000 live event Esports World Cup 2025
Strategy
How did i lose this ZvP, whats the proper response
Custom Maps
External Content
Mutation # 484 Magnetic Pull Mutation #239 Bad Weather Mutation # 483 Kill Bot Wars Mutation # 482 Wheel of Misfortune
Brood War
General
Google Play ASL (Season 20) Announced Which platform caters to men's fashion needs? Help: rep cant save Shield Battery Server New Patch [G] Progamer Settings
Tourneys
[BSL] Non-Korean Championship - Final weekend [Megathread] Daily Proleagues [BSL20] Non-Korean Championship 4x BSL + 4x China CSL Xiamen International Invitational
Strategy
Does 1 second matter in StarCraft? Simple Questions, Simple Answers Muta micro map competition [G] Mineral Boosting
Other Games
General Games
Nintendo Switch Thread Stormgate/Frost Giant Megathread Total Annihilation Server - TAForever [MMORPG] Tree of Savior (Successor of Ragnarok) Path of Exile
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine UK Politics Mega-thread Russo-Ukrainian War Thread Stop Killing Games - European Citizens Initiative
Fan Clubs
INnoVation Fan Club SKT1 Classic Fan Club!
Media & Entertainment
Anime Discussion Thread [\m/] Heavy Metal Thread Movie Discussion! [Manga] One Piece Korean Music Discussion
Sports
2024 - 2025 Football Thread Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023 NBA General Discussion
World Cup 2022
Tech Support
Gtx660 graphics card replacement Installation of Windows 10 suck at "just a moment" Computer Build, Upgrade & Buying Resource Thread
TL Community
TeamLiquid Team Shirt On Sale The Automated Ban List
Blogs
Ping To Win? Pings And Their…
TrAiDoS
momentary artworks from des…
tankgirl
from making sc maps to makin…
Husyelt
StarCraft improvement
iopq
Socialism Anyone?
GreenHorizons
Eight Anniversary as a TL…
Mizenhauer
Flash @ Namkraft Laddernet …
namkraft
Customize Sidebar...

Website Feedback

Closed Threads



Active: 602 users

1000 Milk Jars

Blogs > Slithe
Post a Reply
1 2 3 Next All
Slithe
Profile Blog Joined February 2007
United States985 Posts
Last Edited: 2008-05-16 18:30:05
May 16 2008 18:06 GMT
#1
Another math puzzle.

You've got 1000 jars of milk, and exactly one of them is poisoned. You want to figure out which one is poisoned. What you have at your disposal is an infinite number of rats that you can feed the milk. You have 3 hours to figure out which one is the poisoned one, and the poison takes a nondeterministic amount of time between 2 and 3 hours to kill a rat.

The question is, what's the fewest number of rats you have to use to find out for sure which jar is poisoned?

Here's a trivial hint:
+ Show Spoiler +
We have an upper bound of 1000 rats, since you can feed each rat a different jar of milk, and the one that dies corresponds to the poisoned milk jar. Useful hint eh?


*****
goldrush
Profile Blog Joined June 2004
Canada709 Posts
May 16 2008 18:10 GMT
#2
How many 'doses' does each jar contain?
Slithe
Profile Blog Joined February 2007
United States985 Posts
May 16 2008 18:11 GMT
#3
Infinite
Slithe
Profile Blog Joined February 2007
United States985 Posts
May 16 2008 18:12 GMT
#4
Hmm actually the way I formulated this problem might be problematic, give me a sec to review
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
May 16 2008 18:14 GMT
#5
Kinda depends on how much milk you can get the rats to drink.

are we to suppose that we are able to feed rats milk infinitely fast, that it takes no time to open and close the jars of milk?
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
Last Edited: 2008-05-16 18:16:11
May 16 2008 18:15 GMT
#6
given that it takes 2 hours to feel the effect, my answer is
+ Show Spoiler +

999 rats.

keNn)
Profile Blog Joined February 2003
Philippines297 Posts
May 16 2008 18:16 GMT
#7
can 1 rat drink more than 1 jar of milk? if so only 1 rat will die.
^_^
Elements
Profile Joined September 2007
United States13 Posts
Last Edited: 2008-05-16 18:19:11
May 16 2008 18:17 GMT
#8
+ Show Spoiler +
log2(1000) rounded up equals 10 rats.

Each milk is fed to a unique subset of the rats, depending on which subset dies, then you know the milk that was fed to that group was poisoned. With 10 rats, there are 2^10 = 1024 different subsets, which is enough.
alffla
Profile Blog Joined November 2005
Hong Kong20321 Posts
May 16 2008 18:17 GMT
#9
999 rats?? xD
Graphicssavior[gm] : What is a “yawn” rape ;; Masumune - It was the year of the pig for those fucking defilers. Chill - A clinic you say? okum: SC without Korean yelling is like porn without sex. konamix: HAPPY BIRTHDAY MOMMY!
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
Last Edited: 2008-05-16 18:19:40
May 16 2008 18:19 GMT
#10
On May 17 2008 03:17 Elements wrote:
+ Show Spoiler +
log2(1000) rounded up equals 10 rats.

Each milk is fed to a unique subset of the rats, depending on which subset dies, then you know the milk it came from was poisoned. With 10 rats, there are 2^10 = 1024 different subsets, which is enough.


you have a time limit.

(even though i think this answer is what he wanted the correct answer to the riddle to be, he just made the time limit wrong )
goldrush
Profile Blog Joined June 2004
Canada709 Posts
Last Edited: 2008-05-16 18:25:17
May 16 2008 18:20 GMT
#11
+ Show Spoiler +


My strategy: assumes that even the smallest dose of the poison will kill the rat, you can mix the milk together and still retain the poison, you can split the milk into enough portions, the time of death is exactly 2 hours (not a single second off) and the rat can drink that bloody much.

1 rat. Feed it very, very small sample of a different jar of milk every 3 seconds and note what time it dies.

If you can't measure the time of death that accurately, then simply add more rats and stagger the milk intake, combined with feeding the different rats with different combination of milks

Elements
Profile Joined September 2007
United States13 Posts
Last Edited: 2008-05-16 18:24:23
May 16 2008 18:23 GMT
#12
On May 17 2008 03:19 travis wrote:
Show nested quote +
On May 17 2008 03:17 Elements wrote:
+ Show Spoiler +
log2(1000) rounded up equals 10 rats.

Each milk is fed to a unique subset of the rats, depending on which subset dies, then you know the milk it came from was poisoned. With 10 rats, there are 2^10 = 1024 different subsets, which is enough.


you have a time limit.

(even though i think this answer is what he wanted the correct answer to the riddle to be, he just made the time limit wrong )


The time limit is no problem, you do it simultanously.
An example might be better:
+ Show Spoiler +
with 4 jars and 2 rats,
rat 1 drinks jar 2 and 4
rat 2 drinks jar 3 and 4

two hours later...

if no rats die, it was jar 1
if only rat 1 dies, it was jar 2
if only rat 2 dies, it was jar 3
if both rat 1 and rat 2 die, it was jar 4
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
May 16 2008 18:25 GMT
#13
On May 17 2008 03:23 Elements wrote:
Show nested quote +
On May 17 2008 03:19 travis wrote:
On May 17 2008 03:17 Elements wrote:
+ Show Spoiler +
log2(1000) rounded up equals 10 rats.

Each milk is fed to a unique subset of the rats, depending on which subset dies, then you know the milk it came from was poisoned. With 10 rats, there are 2^10 = 1024 different subsets, which is enough.


you have a time limit.

(even though i think this answer is what he wanted the correct answer to the riddle to be, he just made the time limit wrong )


The time limit is no problem, you do it simultanously.
An example might be better:
+ Show Spoiler +
with 4 jars and 2 rats,
rat 1 drinks jar 2 and 4
rat 2 drinks jar 3 and 4

two hours later...

if no rats die, it was jar 1
if only rat 1 dies, it was jar 2
if only rat 2 dies, it was jar 3
if both rat 1 and rat 2 die, it was jar 4



yes but u have to wait 2 hours so by the time u get it narrowed down to less jars, you have no time let to do a second wave of experiments
Slithe
Profile Blog Joined February 2007
United States985 Posts
Last Edited: 2008-05-16 18:26:21
May 16 2008 18:25 GMT
#14
So the main thing I wanted to avoid was gold rush's answer which utilizes time to figure out when the rats die.

It should be that you cannot really discern any information about when the rats died, and therefore should be unable to figure out when the rat died simply by time.

@travis
The rats have infinite capacity, and you have the ability to feed the rats any amount of milk instantly. The main reason for the time limit is to make sure you can't feed the rats poison after a rat has already died.

@Elements
Congratulations you have solved the problem.
goldrush
Profile Blog Joined June 2004
Canada709 Posts
May 16 2008 18:26 GMT
#15
On May 17 2008 03:25 travis wrote:
Show nested quote +
On May 17 2008 03:23 Elements wrote:
On May 17 2008 03:19 travis wrote:
On May 17 2008 03:17 Elements wrote:
+ Show Spoiler +
log2(1000) rounded up equals 10 rats.

Each milk is fed to a unique subset of the rats, depending on which subset dies, then you know the milk it came from was poisoned. With 10 rats, there are 2^10 = 1024 different subsets, which is enough.


you have a time limit.

(even though i think this answer is what he wanted the correct answer to the riddle to be, he just made the time limit wrong )


The time limit is no problem, you do it simultanously.
An example might be better:
+ Show Spoiler +
with 4 jars and 2 rats,
rat 1 drinks jar 2 and 4
rat 2 drinks jar 3 and 4

two hours later...

if no rats die, it was jar 1
if only rat 1 dies, it was jar 2
if only rat 2 dies, it was jar 3
if both rat 1 and rat 2 die, it was jar 4



yes but u have to wait 2 hours so by the time u get it narrowed down to less jars, you have no time let to do a second wave of experiments


Thing is, after the first time, you already know exactly what jar it is. You haven't narrowed down the possibility; you've found the only jar that could be poison.
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
May 16 2008 18:27 GMT
#16
On May 17 2008 03:20 goldrush wrote:
+ Show Spoiler +


My strategy: assumes that even the smallest dose of the poison will kill the rat, you can mix the milk together and still retain the poison, you can split the milk into enough portions, the time of death is exactly 2 hours (not a single second off) and the rat can drink that bloody much.

1 rat. Feed it very, very small sample of a different jar of milk every 3 seconds and note what time it dies.

If you can't measure the time of death that accurately, then simply add more rats and stagger the milk intake, combined with feeding the different rats with different combination of milks





well given the specificity of the rules I would have to say this is a very clever answer. though it would never workd in the real world cuz digestion doesn't work like that hehe
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
May 16 2008 18:30 GMT
#17
I am so confused by what you guys are saying right now. with a 2 hour delay, how can u possibly find out with only 10 rats?



let's say it's the 50th jar out of the 1000 jars. how do you find out with only 10 rats?
goldrush
Profile Blog Joined June 2004
Canada709 Posts
May 16 2008 18:30 GMT
#18
Well, I assumed that if you gave the time limit and the time to die that they would be used...
KarlSberg~
Profile Blog Joined September 2003
731 Posts
Last Edited: 2008-05-16 18:37:41
May 16 2008 18:35 GMT
#19
+ Show Spoiler +
Does the poison take exactly 2 hours to kill a rat?

If so, give a dose from a different jar each 3.6 seconds to the same rat. See when it dies, substract 2 hours and you know exactly at what time it drank the poisoned milk.


I must admit this solution doesn't seem very feasible in a real situation... but nothing in the ridle says it is not =)

EDIT: ouch fuck, it does. Did I misread or was that the part that was edited in the OP?
There are 01 kind of people who know binary. Those who understand little endian and those who don t.
Slithe
Profile Blog Joined February 2007
United States985 Posts
Last Edited: 2008-05-16 18:40:43
May 16 2008 18:35 GMT
#20
@travis
+ Show Spoiler +

Let's say we represent every single jar in binary. This requires 10 binary digits (2^10 = 1024 > 1000). Each of the 10 rats corresponds to one of these digits.

After you have represented all your jars in binary, you take your first rat, and feed it milk from all the jars that has a 1 in the first digit. Take the second rat, and feed it milk from all the jars that has a 1 in the second digit. Do this for all 10 rats.

The number 50 in binary is 0000110010. Each digit of the 10 digit binary number corresponds to one of the 10 rats, so you will feed the 2nd, 5th, and 6th rat some milk from the 50th jar. After 2 hours, these three rats will die, and you will know that it had to be the 50th jar, because no other jar had exactly these 3 rats drink from it.
1 2 3 Next All
Please log in or register to reply.
Live Events Refresh
Next event in 50m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Harstem 374
StarCraft: Brood War
Britney 29570
Horang2 3945
Flash 1717
Jaedong 1006
Bisu 790
Barracks 739
Hyun 675
EffOrt 389
actioN 294
Larva 279
[ Show more ]
Mini 278
Killer 257
Soulkey 243
Last 175
GuemChi 128
Snow 122
ToSsGirL 122
JYJ112
Zeus 108
ZerO 100
Leta 99
Rush 63
sorry 43
Sharp 38
Backho 31
yabsab 31
Movie 28
zelot 26
sas.Sziky 24
Sacsri 24
sSak 22
Noble 18
Shinee 15
Hm[arnc] 14
Icarus 14
ajuk12(nOOB) 8
Aegong 4
Dota 2
Gorgc1763
XcaliburYe296
BananaSlamJamma287
Counter-Strike
olofmeister2103
x6flipin660
edward83
Other Games
singsing1941
B2W.Neo656
Fuzer 313
DeMusliM285
Happy216
SortOf94
ZerO(Twitch)13
Organizations
Other Games
gamesdonequick1046
StarCraft: Brood War
UltimateBattle 27
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• StrangeGG 74
• davetesta51
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Jankos612
Other Games
• WagamamaTV245
Upcoming Events
OSC
50m
uThermal 2v2 Circuit
4h 20m
The PondCast
22h 20m
Online Event
1d 4h
Korean StarCraft League
2 days
CranKy Ducklings
2 days
BSL20 Non-Korean Champi…
3 days
Mihu vs QiaoGege
Zhanhun vs Dewalt
Fengzi vs TBD
Online Event
3 days
Sparkling Tuna Cup
3 days
BSL20 Non-Korean Champi…
4 days
Bonyth vs TBD
[ Show More ]
OSC
5 days
Liquipedia Results

Completed

BSL 20 Non-Korean Championship
FEL Cracow 2025
Underdog Cup #2

Ongoing

Copa Latinoamericana 4
Jiahua Invitational
BSL 20 Team Wars
CC Div. A S7
IEM Cologne 2025
FISSURE Playground #1
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025

Upcoming

BSL 21 Qualifiers
ASL Season 20: Qualifier #1
ASL Season 20: Qualifier #2
ASL Season 20
CSLPRO Chat StarLAN 3
BSL Season 21
RSL Revival: Season 2
Maestros of the Game
SEL Season 2 Championship
WardiTV Summer 2025
uThermal 2v2 Main Event
HCC Europe
Yuqilin POB S2
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.