• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 16:16
CEST 22:16
KST 05:16
  • 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
[ASL20] Ro24 Preview Pt2: Take-Off0[ASL20] Ro24 Preview Pt1: Runway132v2 & SC: Evo Complete: Weekend Double Feature4Team Liquid Map Contest #21 - Presented by Monster Energy9uThermal's 2v2 Tour: $15,000 Main Event18
Community News
Maestros of The Game—$20k event w/ live finals in Paris24Weekly Cups (Aug 11-17): MaxPax triples again!13Weekly Cups (Aug 4-10): MaxPax wins a triple6SC2's Safe House 2 - October 18 & 195Weekly Cups (Jul 28-Aug 3): herO doubles up6
StarCraft 2
General
What mix of new and old maps do you want in the next 1v1 ladder pool? (SC2) : 2v2 & SC: Evo Complete: Weekend Double Feature Geoff 'iNcontroL' Robinson has passed away The GOAT ranking of GOAT rankings RSL Revival patreon money discussion thread
Tourneys
Maestros of The Game—$20k event w/ live finals in Paris RSL: Revival, a new crowdfunded tournament series Sparkling Tuna Cup - Weekly Open Tournament Monday Nights Weeklies Master Swan Open (Global Bronze-Master 2)
Strategy
Custom Maps
External Content
Mutation # 488 What Goes Around Mutation # 487 Think Fast Mutation # 486 Watch the Skies Mutation # 485 Death from Below
Brood War
General
BW General Discussion No Rain in ASL20? [ASL20] Ro24 Preview Pt2: Take-Off Flash On His 2010 "God" Form, Mind Games, vs JD BGH Auto Balance -> http://bghmmr.eu/
Tourneys
[ASL20] Ro24 Group B [ASL20] Ro24 Group C BWCL Season 63 Announcement [CSLPRO] It's CSLAN Season! - Last Chance
Strategy
Simple Questions, Simple Answers Fighting Spirit mining rates [G] Mineral Boosting Muta micro map competition
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread General RTS Discussion Thread Dawn of War IV 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 Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine The year 2050 European Politico-economics QA Mega-thread
Fan Clubs
INnoVation Fan Club SKT1 Classic Fan Club!
Media & Entertainment
Anime Discussion Thread Movie Discussion! [Manga] One Piece [\m/] Heavy Metal Thread
Sports
2024 - 2026 Football Thread TeamLiquid Health and Fitness Initiative For 2023 Formula 1 Discussion
World Cup 2022
Tech Support
High temperatures on bridge(s) Gtx660 graphics card replacement Installation of Windows 10 suck at "just a moment"
TL Community
The Automated Ban List TeamLiquid Team Shirt On Sale
Blogs
Evil Gacha Games and the…
ffswowsucks
Breaking the Meta: Non-Stand…
TrAiDoS
INDEPENDIENTE LA CTM
XenOsky
[Girl blog} My fema…
artosisisthebest
Sharpening the Filtration…
frozenclaw
ASL S20 English Commentary…
namkraft
Customize Sidebar...

Website Feedback

Closed Threads



Active: 5535 users

A Puzzling Fortnight - Day 2

Blogs > JeeJee
Post a Reply
JeeJee
Profile Blog Joined July 2003
Canada5652 Posts
Last Edited: 2010-02-11 17:28:55
February 11 2010 17:22 GMT
#1
So yesterday's puzzle is still kind of up in the air. Although initially it seems the game is not worth it (as the early replies indicated), I pointed out a strategy which may make the game worth it after all. Have a look, let me know if there's a mistake in the logic -- like I said I haven't solved it but I don't think it's as simple as it was first thought to be.

Moving on!

Today's puzzle:
You're gonna host a cheese & wine party and decided to stock up on wine. It's gonna be big, so you filled your cellar with 240 barrels of wine. Unfortunately, 48 hours before the party, someone tips you off that one of the barrels is poisoned. You decide to trick five of your servants into helping you figure out which is the poisoned barrel. If someone drinks from that barrel, they will die sometime in the next 24 hours. How do you find out which one is poisoned before the party starts?
Also note: you don't want to risk dying (durr) so only the 5 servants will be drinking.

Bonus: Could you have been able to stock up on more barrels and still be able to figure out which one's poisoned in 48 hours? What's the max # of barrels?

GL!

edit:minor wording changes

(\o/)  If you want it, you find a way. Otherwise you find excuses. No exceptions.
 /_\   aka Shinbi (requesting a name change since 27/05/09 ☺)
MayorITC
Profile Blog Joined October 2008
Korea (South)798 Posts
February 11 2010 17:32 GMT
#2
You can add 3 more barrels and still solve it. 243 is the max number.
PangO
Profile Blog Joined July 2009
Chile1870 Posts
Last Edited: 2010-02-11 17:42:44
February 11 2010 17:38 GMT
#3
On February 12 2010 02:32 MayorITC wrote:
You can add 3 more barrels and still solve it. 243 is the max number.

Yea, each element could be {0,1,2}... thats 3^5 = 243 possible combinations.
In Economics, the majority is always wrong. aka: MattRz
love1another
Profile Blog Joined December 2009
United States1844 Posts
Last Edited: 2010-02-11 18:14:28
February 11 2010 17:44 GMT
#4
Well, let's look at this from a pure namespace argument.

The maximum information that a servant can give is 3-fold.
They can
1-die in the first 24 hours.
2-not die in the first 24 hours, but die in the next 24 hours.
3-Not die by the time of the party.

Thus we can represent all such possibilities with the following notation:
[1-3]*5
For example, we could have the string 13231 mean
servant 1 died in the 1st 24 hours.
2 lived.
3 died in 2nd 24 hours.
4 lived
5 died in the first 24 hours.

Thus we have a simple answer to the Bonus question:
the maximum possible information that can be gleaned from 5 servants is bounded by
n <= 243 (though it might be +- 1 cuz I haven't really considered the boundary condition thoroughly)

Now a mapping between our string system and guilty barrel will be constructed through a decision tree, with each servant eliminating 2/3 of the remaining barrels.
Servant 1 Tries barrels 1-80 in the first 24 hours. Tries barrels 81-160 in the 2nd 24 hours. If he does not die, we know the guilty barrel is in the 161-240.
Servant 2 then tries, 1-25:81-106:161-186 in first 24 hours, then 26-52.... for the 2nd 24 hours etc.
As long as each subsequent servant's choice kills ~2/3 of the remaining universes, we are good.
Thus we have created a sufficient mapping. yay!

So what do I win?

Edit:I guess I probably shouldn't win anything until I devise a more concise algorithm.
Let us number the barrels from
00000 to 22212. 22220, 22221, 22222 aren't valid.

We want to create a mapping so that the first servant's status informs the first digit 0-2, the 2nd servant, 0-2, etc....
All we have to do then, is to have servant 1 drink from barrels labelled 0xxxx in the first 24 hours. Barrels labeled 1xxxxx in the 2nd 24 hours, and barrels labelled 2xxxx will be implicated if he is not dead.
Thus each servant contributes a single digit to the trinary string and we can easily find which barrel is poisoned.

If servant 1 dies in the first 24 hours, servant 2 lives, servant 3 lives, servant 4 dies in the 2nd 24 hours, and servant 5 lives, we know the poisoned barrel is
02212
Or converted to decimal
2* 3^0 + 1*3^1 + 2*3^2+2*3^3 + 0*3^4= 2+3 + 18+54= Barrel # 77
"I'm learning more and more that TL isn't the place to go for advice outside of anything you need in college. It's like you guys just make up your own fantasy world shit and post it as if you've done it." - Chill
PangO
Profile Blog Joined July 2009
Chile1870 Posts
February 11 2010 17:50 GMT
#5
I just finish lol, well done love, guess the game its over now
In Economics, the majority is always wrong. aka: MattRz
MayorITC
Profile Blog Joined October 2008
Korea (South)798 Posts
Last Edited: 2010-02-11 18:30:30
February 11 2010 18:15 GMT
#6
First step is understanding possible combinations for each number of slaves.
5 - 32
4 - 16
3 - 8
2 - 4
1- 2

What that means is that as long as you have 5 slaves alive, you can figure single out the poisoned barrel out of 32; 4 slaves alive means you can single it out from 16, and so on and so on.

So you give each slave 16 separate barrels to drink. In the event that one slave dies, you have 4 remaining slaves to test it from that batch of 16 and single it out.

Anyway, that's 16 x 5 barrels covered so far which is 80. 240 - 80 = 160 remaining barrels.

Next up, you give each combination of two slaves 8 barrels of wine to test. There are a total of 10 possible pairs of slaves. In the event that a pair dies, you have 3 remaining slaves to test that batch of 8 and single out the poisoned barrel on day two. That's another 80 barrels covered.

160 - 80 = 80 barrels left.

Then you give each combination of 3 slaves (10 total), 4 barrels of wine to test. In the event, 3 slaves die you know it's going to be from one of the batch of 4 barrels and will have 2 remaining slaves to single it out on day two. That's another 40 barrels covered.

80 - 40 = 40 left

Then you give each combination of 4 slaves (5 combinations total) 2 barrels of wine to drink. In the event, four slaves die, you will have 1 slave to single out the poisoned one from the two barrels on day two. That's 10 barrels covered.
40 - 10 = 30

Then the last grouping is all five slaves testing one barrel. There's only one combination of five slaves. If all five slaves die, then you know the one they drank is the poisoned one. That's another barrel covered.

30 - 1 = 29 barrels left.

In the event that no slave dies, they can cover the remaining 29 since the max number of possible testing with 5 slaves is 32.

Therefore you have a leeway of 3 more barrels since 32 - 29 = 3


32 + 5 x 16 + 10 x 8 + 10 x 4 + 5 x 2 + 1 = 243.

I just read love's explanation and all I can say is WTF? Aside from his edit of his answer, which was originally 253, some of the things in it makes no sense.

Servant 1 Tries barrels 1-80 in the first 24 hours. Tries barrels 81-160 in the 2nd 24 hours. If he does not die, we know the guilty barrel is in the 161-240.


Where did you come up with this magic number that each slave has to test 2/3 of the barrels?
love1another
Profile Blog Joined December 2009
United States1844 Posts
Last Edited: 2010-02-11 18:29:16
February 11 2010 18:26 GMT
#7
My edit more clearly and eloquently explains my solution. Once converted into trinary, it's much more straightforward to show that each must test (and therefore eliminate) 2/3 of the barrels. Clearly, from my mapping, you can see that each digit is 0-2, and 0 and 1 correspond to direct tests. Since exactly 1/3 of the entire space we are looking at has the nth digit as 0, and exactly 1/3 has the nth digit as 1, and exactly 1/3 has the nth digit as 2, it's clear as day why my initial proposition is true.
"I'm learning more and more that TL isn't the place to go for advice outside of anything you need in college. It's like you guys just make up your own fantasy world shit and post it as if you've done it." - Chill
MayorITC
Profile Blog Joined October 2008
Korea (South)798 Posts
Last Edited: 2010-02-11 18:45:11
February 11 2010 18:44 GMT
#8
Okay, but from a non-technical-usage-of-unnecessary-bullshit-jargon point of view, unless your mapping follows a different set of mathematical axioms than the ones we use in this dimension, your logic is flawed. Under no circumstances, should a single slave ever test 80 barrels of wine like how you proposed.

Anyway, there's a limit to how much of your namespace crap I want to wade in, but if trying to impress people with garbage disguised with sophisticated terms gets you off, then continue by all means. I'm done.
love1another
Profile Blog Joined December 2009
United States1844 Posts
February 11 2010 19:03 GMT
#9
Well, there's very little point in arguing when the point at hand is nonpolitical, but rather, unshakeable proveable fact. My algorithm stands shamelessly as is
"I'm learning more and more that TL isn't the place to go for advice outside of anything you need in college. It's like you guys just make up your own fantasy world shit and post it as if you've done it." - Chill
JeeJee
Profile Blog Joined July 2003
Canada5652 Posts
Last Edited: 2010-02-11 21:06:45
February 11 2010 21:01 GMT
#10
I'm confused.. MayorITC you realize your solution (which is exactly how I came to mine as well btw ) is pretty much the same as love1another's? In fact, if you add up all the barrels that each person tests, you will see they individually test 80 barrels each (excluding the 32 for the last day if nobody dies)
Not sure where the hostility comes from ^_^

edit: Just to expand on that..

Consider slave A drinks:
-from 16 during the "if 4 are left" phase - only 1 possibility there 16*1=16
-from 8 during the "if 3 are left" phase - where there are 4 possibilities 8*4=32
-from 4 during the "if 2 are left" phase - where there are 6 possibilities 4*6=24
-from 2 during the "if 1 is left" phase - where there are 4 possibilities 2*4=8

total = 16+32+24+8 = 80

in fact, you could say 81, if you count the case where all 5 drink from another barrel for the "if 0 are left" phase
(\o/)  If you want it, you find a way. Otherwise you find excuses. No exceptions.
 /_\   aka Shinbi (requesting a name change since 27/05/09 ☺)
Cambium
Profile Blog Joined June 2004
United States16368 Posts
Last Edited: 2010-02-11 21:54:22
February 11 2010 21:33 GMT
#11
On February 12 2010 02:44 love1another wrote:
+ Show Spoiler +

Well, let's look at this from a pure namespace argument.

The maximum information that a servant can give is 3-fold.
They can
1-die in the first 24 hours.
2-not die in the first 24 hours, but die in the next 24 hours.
3-Not die by the time of the party.

Thus we can represent all such possibilities with the following notation:
[1-3]*5
For example, we could have the string 13231 mean
servant 1 died in the 1st 24 hours.
2 lived.
3 died in 2nd 24 hours.
4 lived
5 died in the first 24 hours.

Thus we have a simple answer to the Bonus question:
the maximum possible information that can be gleaned from 5 servants is bounded by
n <= 243 (though it might be +- 1 cuz I haven't really considered the boundary condition thoroughly)

Now a mapping between our string system and guilty barrel will be constructed through a decision tree, with each servant eliminating 2/3 of the remaining barrels.
Servant 1 Tries barrels 1-80 in the first 24 hours. Tries barrels 81-160 in the 2nd 24 hours. If he does not die, we know the guilty barrel is in the 161-240.
Servant 2 then tries, 1-25:81-106:161-186 in first 24 hours, then 26-52.... for the 2nd 24 hours etc.
As long as each subsequent servant's choice kills ~2/3 of the remaining universes, we are good.
Thus we have created a sufficient mapping. yay!

So what do I win?

Edit:I guess I probably shouldn't win anything until I devise a more concise algorithm.
Let us number the barrels from
00000 to 22212. 22220, 22221, 22222 aren't valid.

We want to create a mapping so that the first servant's status informs the first digit 0-2, the 2nd servant, 0-2, etc....
All we have to do then, is to have servant 1 drink from barrels labelled 0xxxx in the first 24 hours. Barrels labeled 1xxxxx in the 2nd 24 hours, and barrels labelled 2xxxx will be implicated if he is not dead.
Thus each servant contributes a single digit to the trinary string and we can easily find which barrel is poisoned.

If servant 1 dies in the first 24 hours, servant 2 lives, servant 3 lives, servant 4 dies in the 2nd 24 hours, and servant 5 lives, we know the poisoned barrel is
02212
Or converted to decimal
2* 3^0 + 1*3^1 + 2*3^2+2*3^3 + 0*3^4= 2+3 + 18+54= Barrel # 77



This.

It's just trinary

I think this question (to me at least) would be harder without the bonus

real edit:

I absolutely love the two different approaches proposed in this thread

I think the trinary approach is more rigorous in terms of maths/computer science/computational mathematics, whereas the other approach is more or less "intuitive".

When you want something, all the universe conspires in helping you to achieve it.
love1another
Profile Blog Joined December 2009
United States1844 Posts
February 12 2010 08:05 GMT
#12
Compsci ftw <3
"I'm learning more and more that TL isn't the place to go for advice outside of anything you need in college. It's like you guys just make up your own fantasy world shit and post it as if you've done it." - Chill
InFdude
Profile Blog Joined July 2009
Bulgaria619 Posts
Last Edited: 2010-02-12 11:23:28
February 12 2010 11:13 GMT
#13
--- Nuked ---
love1another
Profile Blog Joined December 2009
United States1844 Posts
February 12 2010 12:14 GMT
#14
my solution is better <3
"I'm learning more and more that TL isn't the place to go for advice outside of anything you need in college. It's like you guys just make up your own fantasy world shit and post it as if you've done it." - Chill
Please log in or register to reply.
Live Events Refresh
Chat StarLeague
16:00
Chicago LAN Final Day
Razz vs Julia
StRyKeR vs ZZZero
Semih vs TBD
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
IndyStarCraft 196
JuggernautJason194
ProTech136
StarCraft: Brood War
firebathero 163
JulyZerg 72
Pusan 46
ggaemo 43
Dota 2
Pyrionflax211
capcasts56
XaKoH 9
League of Legends
Reynor87
JimRising 62
Counter-Strike
fl0m1975
Stewie2K949
flusha370
Foxcn315
Heroes of the Storm
Khaldor240
Other Games
Grubby2779
FrodaN1339
B2W.Neo982
mouzStarbuck291
RotterdaM261
Hui .100
Organizations
Other Games
gamesdonequick1442
BasetradeTV25
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 17 non-featured ]
StarCraft 2
• davetesta26
• tFFMrPink 21
• IndyKCrew
• sooper7s
• AfreecaTV YouTube
• Migwel
• intothetv
• LaughNgamezSOOP
• Kozan
StarCraft: Brood War
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• masondota22113
League of Legends
• Doublelift2229
Counter-Strike
• imaqtpie1253
Other Games
• Shiphtur330
• WagamamaTV300
Upcoming Events
Replay Cast
3h 44m
Afreeca Starleague
13h 44m
Queen vs HyuN
EffOrt vs Calm
Wardi Open
14h 44m
RotterdaM Event
18h 44m
Replay Cast
1d 3h
Afreeca Starleague
1d 13h
Rush vs TBD
Jaedong vs Mong
WardiTV Summer Champion…
1d 14h
Cure vs Classic
ByuN vs TBD
herO vs TBD
TBD vs NightMare
TBD vs MaxPax
OSC
1d 15h
PiGosaur Monday
2 days
Afreeca Starleague
2 days
herO vs TBD
Royal vs Barracks
[ Show More ]
Replay Cast
3 days
The PondCast
3 days
WardiTV Summer Champion…
3 days
Replay Cast
4 days
LiuLi Cup
4 days
MaxPax vs TriGGeR
ByuN vs herO
Cure vs Rogue
Classic vs HeRoMaRinE
Cosmonarchy
4 days
OyAji vs Sziky
Sziky vs WolFix
WolFix vs OyAji
BSL Team Wars
4 days
Team Hawk vs Team Dewalt
BSL Team Wars
4 days
Team Hawk vs Team Bonyth
SC Evo League
5 days
TaeJa vs Cure
Rogue vs threepoint
ByuN vs Creator
MaNa vs Classic
[BSL 2025] Weekly
5 days
SC Evo League
6 days
BSL Team Wars
6 days
Team Bonyth vs Team Sziky
BSL Team Wars
6 days
Team Dewalt vs Team Sziky
Liquipedia Results

Completed

Jiahua Invitational
uThermal 2v2 Main Event
HCC Europe

Ongoing

Copa Latinoamericana 4
BSL 20 Team Wars
KCM Race Survival 2025 Season 3
BSL 21 Qualifiers
ASL Season 20
CSL Season 18: Qualifier 1
Acropolis #4 - TS1
CSLAN 3
SEL Season 2 Championship
WardiTV Summer 2025
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
BLAST.tv Austin Major 2025

Upcoming

CSL Season 18: Qualifier 2
CSL 2025 AUTUMN (S18)
LASL Season 20
BSL Season 21
BSL 21 Team A
Chzzk MurlocKing SC1 vs SC2 Cup #2
RSL Revival: Season 2
Maestros of the Game
EC S1
Sisters' Call Cup
IEM Chengdu 2025
PGL Masters Bucharest 2025
MESA Nomadic Masters Fall
Thunderpick World Champ.
CS Asia Championships 2025
Roobet Cup 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open 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.