Sunteți pe pagina 1din 6

10/20/2015

AnalyticalPuzzlesVeryDifficult

LogicPuzzles
1.TheEmperor
Youaretherulerofamedievalempireandyouareabouttohaveacelebrationtomorrow.Thecelebrationisthemost
importantpartyyouhaveeverhosted.You'vegot1000bottlesofwineyouwereplanningtoopenforthecelebration,butyou
findoutthatoneofthemispoisoned.
Thepoisonexhibitsnosymptomsuntildeath.Deathoccurswithintentotwentyhoursafterconsumingeventheminutest
amountofpoison.
Youhaveoverathousandslavesatyourdisposalandjustunder24hourstodeterminewhichsinglebottleispoisoned.
Youhaveahandfulofprisonersabouttobeexecuted,anditwouldmaryourcelebrationtohaveanyoneelsekilled.
Whatisthesmallestnumberofprisonersyoumusthavetodrinkfromthebottlestobeabsolutelysuretofindthepoisoned
bottlewithin24hours?
Hint:Itismuchsmallerthanyoufirstmightthink.Trytosolvetheproblemfirstwithonepoisonedbottleoutof
eighttotalbottlesofwine.

Solution:10prisonersmustsamplethewine.Bonuspointsifyouworkedoutawaytoensurethannomore
than8prisonersdie.
Numberallbottlesusingbinarydigits.Assigneachprisonertooneofthebinaryflags.Prisonersmusttakeasip
fromeachbottlewheretheirbinaryflagisset.
Hereishowyouwouldfindonepoisonedbottleoutofeighttotalbottlesofwine.
1 2 3 4 5 6 7 8
PrisonerA X X X X
PrisonerB X X X X
PrisonerC X X X X
Intheaboveexample,ifallprisonersdie,bottle8isbad.Ifnonedie,bottle1isbad.IfA&Bdies,bottle4is
bad.
Withtenpeoplethereare1024uniquecombinationssoyoucouldtestupto1024bottlesofwine.
Eachofthetenprisonerswilltakeasmallsipfromabout500bottles.Eachsipshouldtakenolongerthan15
secondsandshouldbeaverysmallamount.Smallsipsnotonlyleavemorewineforguests.Smallsipsalso
avoiddeathbyalcoholpoisoning.Aslongaseachprisonerisadministeredaboutamillilitrefromeachbottle,
theywillonlyconsumetheequivalentofaboutonebottleofwineeach.
Eachprisonerwillhaveatleastafiftypercentchanceofliving.Thereisonlyonebinarycombinationwhereall
prisonersmustsipfromthewine.Iftherearetenprisonersthentherearetenmorecombinationswhereallbut
oneprisonermustsipfromthewine.Byavoidingthesetwotypesofcombinationsyoucanensurenomorethan
8prisonersdie.
Oneviewerfeltthatthissolutionwasinflagrantcontemptofrestaurantetiquette.Theemperorpaidforthiswine,
sothereshouldbenoneedtoprovetothegueststhatwineisthesameasthelabel.Iamnotevensureif
ancientwineevencamewithlabelsaffixed.However,itistruethatafterleavingthewineopenforaday,that
thismedievalwinewilltastemorelikevinegarthaniteverdid.C'estlavie.

http://www.folj.com/puzzles/verydifficultanalyticalpuzzles.htm

1/6

10/20/2015

AnalyticalPuzzlesVeryDifficult

2.TheStarkRavingMadKing
Astarkravingmadkingtellshis100wisestmenheisabouttolinethemupandthathewillplaceeitheraredorbluehaton
eachoftheirheads.Oncelinedup,theymustnotcommunicateamongstthemselves.Normaytheyattempttolookbehind
themorremovetheirownhat.
Thekingtellsthewisementhattheywillbeabletoseeallthehatsinfrontofthem.Theywillnotbeabletoseethecolorof
theirownhatorthehatsbehindthem,althoughtheywillbeabletoheartheanswersfromallthosebehindthem.
Thekingwillthenstartwiththewisemaninthebackandask"whatcolorisyourhat?"Thewisemanwillonlybeallowedto
answer"red"or"blue,"nothingmore.Iftheanswerisincorrectthenthewisemanwillbesilentlykilled.Iftheansweris
correctthenthewisemanmaylivebutmustremainabsolutelysilent.
Thekingwillthenmoveontothenextwisemanandrepeatthequestion.
Thekingmakesitclearthatifanyonebreakstherulesthenallthewisemenwilldie,thenallowsthewisementoconsult
beforeliningthemup.Thekinglistensinwhilethewisemenconsulteachothertomakesuretheydon'tdeviseaplanto
cheat.Tocommunicateanythingmorethantheirguessofredorbluebycoughingorshufflingwouldbebreakingtherules.
Whatisthemaximumnumberofmentheycanbeguaranteedtosave?
Hint:Tosolvethisproblem,youneedtopresumethateachwisemancancountthetotalnumberofredhatsin
frontofthemwithouterror,thatallthewisemenhavegreatattentiontodetailandthatallthewisemencare
aboutthegreatergood.

Solution:99.
Youcansaveabout50%byhavingeveryoneguessrandomly.
Youcansave50%ormoreifeveryevenpersonagreestocalloutthecolorofthehatinfrontofthem.Thatway
thepersoninfrontknowswhatcolortheirhatis,andifthepersonbehindalsohasthesamecoloredhatthen
bothwillsurvive.
Sohowcan99peoplebesaved?Thefirstwisemancountsalltheredhatshecansee(Q)andthenanswers
"blue"ifthenumberisoddor"red"ifthenumberiseven.Eachsubsequentwisemankeepstrackofthenumber
ofredhatsknowntohavebeensavedfrombehind(X),andcountsthenumberofredhatsinfront(Y).
IfQwaseven,andifX&Yareeitherbothevenorarebothodd,thenthewisemanwouldanswerblue.Otherwise
thewisemanwouldanswerred.
IfQwasodd,andifX&Yareeitherbothevenorarebothodd,thenthewisemanwouldanswerred.Otherwise
thewisemanwouldanswerblue.
Therecanbeanynumberofredhats,asthefollowingexamplesshow...
Prisoner Hathewears Numberofredhatshesees(Y) Redhatssavedforsure(X) Hesays
N/A

1 red

6 even(Q)

2 blue

6 even

0 even

blue

3 red

5 odd

0 even

red

4 blue

5 odd

1 odd

blue

5 blue

5 odd

1 odd

blue

6 red

4 even

1 odd

red

7 red

3 odd

2 even

red

8 red

2 even

3 odd

red

9 red

1 odd

4 even

red

http://www.folj.com/puzzles/verydifficultanalyticalpuzzles.htm

red

2/6

10/20/2015

AnalyticalPuzzlesVeryDifficult
10 red

0 even

5 odd

red

Anotherexamplemightalsohelp,asthispuzzleseemstotripupmostpeople...
Prisoner Hathewears Numberofredhatshesees(Y) Redhatssavedforsure(X) Hesays
1 blue

5 odd(Q)

N/A

blue

2 blue

5 odd

0 even

blue

3 red

4 even

0 even

red

4 blue

4 even

1 odd

blue

5 blue

4 even

1 odd

blue

6 red

3 odd

1 odd

red

7 blue

3 odd

2 even

blue

8 red

2 even

2 even

red

9 red

1 odd

3 odd

red

10 red

0 even

3 odd

red

3.TheFakeCoin
Youhavetwelvecoins.Youknowthatoneisfake.Theonlythingthatdistinguishesthefakecoinfromtherealcoinsisthat
itsweightisimperceptiblydifferent.Youhaveaperfectlybalancedscale.Thescaleonlytellsyouwhichsideweighsmore
thantheotherside.
Whatisthesmallestnumberoftimesyoumustusethescaleinordertoalwaysfindthefakecoin?
Useonlythetwelvecoinsthemselvesandnoothers,nootherweights,nocuttingcoins,nopencilmarksonthescale.etc.
Thesearemoderncoins,sothefakecoinisnotnecessarilylighter.
Presumetheworstcasescenario,anddon'thopethatyouwillpicktherightcoinonthefirstattempt.
Hint:Thebalancetellsyouwhichsideisheavierandwhichsideislighter.Youcanmovecoinsaroundandget
moreinformationthisway.

Solution:3.
Ifyouknewthefakecoinwaslighter,thenthesolutionwouldhaveaneasyexplanation.Butyoudonot.So....
Numberthecoins1through12.
1.Weighcoins1,2,3,4againstcoins5,6,7,8.
1.1.Iftheybalance,thenweighcoins9and10againstcoins11and8(weknowfromthefirstweighingthat8is
agoodcoin).
1.1.1.Ifthesecondweighingalsobalances,weknowcoin12(theonlyonenotyetweighed)isthecounterfeit.
Thethirdweighingindicateswhetheritisheavyorlight.
1.1.2.If(atthesecondweighing)coins11and8areheavierthancoins9and10,either11isheavyor9islight
or10islight.Weigh9against10.Iftheybalance,11isheavy.Iftheydon'tbalance,youknowthateither9or10
islight,sothetopcoinisthefake.
1.1.3If(atthesecondweighing)coins11and8arelighterthancoins9and10,either11islightor9isheavyor
10isheavy.Weigh9against10.Iftheybalance,11islight.Iftheydon'tbalance,youknowthateither9or10is
heavy,sothebottomcoinisthefake.

http://www.folj.com/puzzles/verydifficultanalyticalpuzzles.htm

3/6

10/20/2015

AnalyticalPuzzlesVeryDifficult

1.2.Nowif(atfirstweighing)thesidewithcoins5,6,7,8areheavierthanthesidewithcoins1,2,3,4.Thismeans
thateither1,2,3,4islightor5,6,7,8isheavy.Weigh1,2,and5against3,6,and9.
1.2.1.If(whenweweigh1,2,and5against3,6and9)theybalance,itmeansthateither7or8isheavyor4is
light.Byweighing7and8weobtaintheanswer,becauseiftheybalance,then4hastobelight.If7and8donot
balance,thentheheaviercoinisthecounterfeit.
1.2.2.If(whenweweigh1,2,and5against3,6and9)therightsideisheavier,theneither6isheavyor1islight
or2islight.Byweighing1against2thesolutionisobtained.
1.2.3.If(whenweweigh1,2,and5against3,6and9)therightsideislighter,theneither3islightor5isheavy.
Byweighing3againstagoodcointhesolutioniseasilyarrivedat.
1.3If(atthefirstweighing)coins1,2,3,4areheavierthancoins5,6,7,8thenrepeattheprevioussteps1.2
through1.2.3butswitchthenumbersofcoins1,2,3,4with5,6,7,8.

4.TheTraineeTechnician
A120wirecablehasbeenlaidfirmlyundergroundbetweentwotelephoneexchangeslocated10kmapart.
Unfortunatelyafterthecablewaslaiditwasdiscoveredtobethewrongtype,theproblemistheindividualwiresarenot
labeled.Thereisnovisualwayofknowingwhichwireiswhichandthusconnectionsateitherendisnotimmediately
possible.
Youareatraineetechnicianandyourbosshasaskedyoutoidentifyandlabelthewiresatbothendswithoutrippingitallup.
Youhavenotransportandonlyabatteryandlightbulbtotestcontinuity.Youdohavetapeandpenforlabelingthewires.
Whatistheshortestdistanceinkilometersyouwillneedtowalktocorrectlyidentifyandlabeleachwire?
Hint:Creatingasingleloopwillonlyhelpyouidentifyallthewiresbywalking40km.Youneedtogroupthemin
aratheroddmatrix.

Solution:20.
Atoneendlabelawire"A".Thenjointwowireandlabelthemboth"B',thentiethree(notalreadyjoined)wires
togetherandcallthemeach"C"....continueuntilallthewiresarejoinedtogetheringroupsof1,2,3,4,5,
etc....fora120strandcable.NOTESthatthelargestgroupwillhave15wires.
Nowwalktotheotherend.
Usinga(batteryandlightbulb)itisnowpossible,forexample,tofindthewirethatwasn'tjoinedtoanyofthe
others.Itissimilarlypossibletofindwhichwiresareinapair,whichisjoinedinagroupof3,etc.Eachtimea
groupisfoundthetechnicianshouldlabelitwiththeletterforthegroup,sothesinglewireislabeled'a',thepair
areeachlabeled"A",etc....thisnowmatchestheotherend.....theletterswillgoupto"O".Nowtake"A","B",up
to"O"andjointhemtogetherinagroupandlabeleachonewith"15",sowehavecable"A15","B15',"C15",up
to"O15".Takethesecondandlast"B'"wireand
joinitwitharemaining"C","D",upto"O"andlabeltheseeach"14'sowehave"B14","C14",upto"O14".
Repeatthisuntilattheendtherewillbeasingle"O"cabledlabeled"O1".
Nowwalktotheotherend.
Nowuntiealltheoldconnectionsandidentifythegrouplabeled"1","2","3"..."15"atwhichpointeachwireat
eachendhasauniqueclassification.
Alternativesolutionfromcitrog:
First,tiethe120wirestogetherrandomlyin60pairs.Next,gotothefarend,randomlylabelanywire1,and
connectthebatterytoit.Testwhichotherwireistiedtoitatthestartingend,andlabelthatwire2.Thenpick

http://www.folj.com/puzzles/verydifficultanalyticalpuzzles.htm

4/6

10/20/2015

AnalyticalPuzzlesVeryDifficult

anotherwireotherthan1or2,labelit3,andtieitto2,sonowthebatteryisconnectedto1,whichistiedto2at
theotherend,whichistiedto3attheendyou'reat.Nowtestwhichwireistiedto3attheotherend,andlabel
that4,etc.Whatyouwillwindupwithisall120wirestiedtoeachotherinacontinuoussequence.Thengo
backtotheendyoustartedat,leavingthebatterybehind,connectedtowire1.Beforeyouuntieallthewiresat
thestartingpoint,labeleachwiresothatyouknowwhichwirewaspairedwithwhich.Nowwithallthewires
untiedatthestartingpoint,testwhichwireisconnectedtothebattery,andlabelthat1.Whicheverwirewasin
thesamepairas1,labelthat2,andthentie1and2backtogether.Nowyoucanfind3,becauseit'stiedto2on
thefarend.Onceyoufind3,labelthewireitwastiedto4,etc.Thisassumesthattheresistanceofthewireis
smallenoughthatthebatterywillstilllightthebulbacross12,000kmofwire.

5.TheCardTrick
IaskAlextopickany5cardsoutofadeckwithnoJokers.
Hecaninspectthenshufflethedeckbeforepickinganyfivecards.Hepicksout5cardsthenhandsthemtome(Petercan't
seeanyofthis).IlookatthecardsandIpick1cardoutandgiveitbacktoAlex.Ithenarrangetheotherfourcardsina
specialway,andgivethose4cardsallfacedown,andinaneatpile,toPeter.
Peterlooksatthe4cardsigavehim,andsaysoutloudwhichcardAlexisholding(suitandnumber).How?
Thesolutionusespurelogic,notsleightofhand.AllPeterneedstoknowistheorderofthecardsandwhatisontheirface,
nothingmore.
Hint:Thereareonly4suits,sotherewillbeatleasttwocardsofonesuit,onehigherandanotherlower.By
carefulselectionandplacementthecardscanbeusedtoencodetheexactnumberandsuitoftheselectedcard.

Solution:Pickouttwocardsofthesamesuit.SelectacardforAlexwhereaddinganumbernogreaterthansix
willresultinthenumberoftheothercardofthesamesuit.AddingonetotheAcewouldcycletothebeginning
againandresultinaTwo.E.g.ifyouhaveaKingandaSixofDiamonds,handtheKingtoAlex.Theotherthree
cardswillbeusedtoencodeanumberfrom1through6.DeviseasystemwithPetertorankallcardsuniquely
from1to52(e.g.thetwoofheartsis1,thetwoofdiamondsisfourteenetc...).Thatwillallowyoutochoose
fromsixcombinations,dependingonwhereyouputthelowestandhighestcards.

6.TheWarden
Thewardenmeetswith23newprisonerswhentheyarrive.Hetellsthem,"Youmaymeettodayandplanastrategy.Butafter
today,youwillbeinisolatedcellsandwillhavenocommunicationwithoneanother.
"Intheprisonisaswitchroom,whichcontainstwolightswitcheslabeled1and2,eachofwhichcanbeineitheruporthe
downposition.Iamnottellingyoutheirpresentpositions.Theswitchesarenotconnectedtoanything.
"Aftertoday,fromtimetotimewheneverIfeelsoinclined,Iwillselectoneprisoneratrandomandescorthimtotheswitch
room.Thisprisonerwillselectoneofthetwoswitchesandreverseitsposition.Hemustfliponeswitchwhenhevisitsthe
switchroom,andmayonlyfliponeoftheswitches.Thenhe'llbeledbacktohiscell.
"NooneelsewillbeallowedtoaltertheswitchesuntilIleadthenextprisonerintotheswitchroom.I'mgoingtochoose
prisonersatrandom.Imaychoosethesameguythreetimesinarow,orImayjumparoundandcomeback.Iwillnottouch
theswitches,ifIwantedyoudeadyouwouldalreadybedead.
"Givenenoughtime,everyonewilleventuallyvisittheswitchroomthesamenumberoftimesaseveryoneelse.Atanytime,
anyonemaydeclaretome,'Wehaveallvisitedtheswitchroom.'
"Ifitistrue,thenyouwillallbesetfree.Ifitisfalse,andsomebodyhasnotyetvisitedtheswitchroom,youwillalldie
horribly.Youwillbecarefullymonitored,andanyattempttobreakanyoftheseruleswillresultininstantdeathtoallofyou"
Whatisthestrategytheycomeupwithsothattheycanbefree?

http://www.folj.com/puzzles/verydifficultanalyticalpuzzles.htm

5/6

10/20/2015

AnalyticalPuzzlesVeryDifficult

Hint:Takealongtermperspective.Solvethepuzzlerforthreeprisoners.

Solution:
Theteamnominatesaleader.Thegroupagreesuponthefollowingrules:
Theleaderistheonlypersonwhowillannouncethateveryonehasvisitedtheswitchroom.Alltheprisoners
(exceptfortheleader)willflipthefirstswitchupattheirveryfirstopportunity,andagainonthesecond
opportunity.Ifthefirstswitchisalreadyup,ortheyhavealreadyflippedthefirstswitchuptwotimes,theywill
thenflipthesecondswitch.Onlytheleadermayflipthefirstswitchdown,ifthefirstswitchisalreadydown,
thentheleaderwillflipthesecondswitch.Theleaderremembershowmanytimeshehasflippedthefirstswitch
down.Oncetheleaderhasflippedthefirstswitchdown44times,heannouncesthatallhavevisitedtheroom.
Itdoesnotmatterhowmanytimesaprisonerhasvisitedtheroom,inwhichordertheprisonersweresentor
evenifthefirstswitchwasinitiallyup.Oncetheleaderhasflippedtheswitchdown44timesthentheleader
knowseveryonehasvisitedtheroom.Iftheswitchwasinitiallydown,thenall22prisonerswillfliptheswitchup
twice.Iftheswitchwasinitiallyup,thentherewillbeoneprisonerwhoonlyflipstheswitchuponceandtherest
willflipituptwice.
Theprisonerscannotbecertainthatallhavevisitedtheroomaftertheleaderflipstheswitchdown23times,as
thefirst12prisonersplustheleadermightbetakentotheroom24timesbeforeanyoneelseisallowedintothe
room.Becausetheinitialstateoftheswitchmightbeup,theprisonersmustflipthefirstswitchuptwice.Ifthey
decidetoflipituponlyonce,theleaderwillnotknowifheshouldcountto22or23.
Intheexampleofthreeprisoners,theleadermustflipthefirstswitchdownthreetimestobesureallprisoners
havevisitedtheroom,twiceforthetwootherprisonersandoncemoreincasetheswitchwasinitiallyup.

More>>>

SiteMap|ContactUs

http://www.folj.com/puzzles/verydifficultanalyticalpuzzles.htm

6/6