Sunday, January 11, 2015

Flipping Coins

There are twenty coins sitting on the table, ten are currently heads and tens are currently tails. You are sitting at the table with a blindfold and gloves on. You are able to feel where the coins are, but are unable to see or feel if they heads or tails. You must create two sets of coins. Each set must have the same number of heads and tails as the other group. You can only move or flip the coins, you are unable to determine their current state. How do you create two even groups of coins with the same number of heads and tails in each group?

Find the Forgeries

You have 10 bags full of coins, in each bag are 1,000 coins.

But one bag is full of forgeries, and you can't remember which one.
But you do know that a genuine coins weigh 1 gram, but forgeries weigh 1.1 grams.

To hide the fact that you can't remember which bag contains forgeries, you plan to go just once to the central weighing machine to get ONE ACCURATE weight.

How can you identify the bag with the forgeries with just one weighing?

And what if you didn't know how many bags contain forgeries?


2 Eggs 100 Floors

You are given two eggs, and access to a 100-storey building. Both eggs are identical. The aim is to find out the highest floor from which an egg will not break when dropped out of a window from that floor. If an egg is dropped and does not break, it is undamaged and can be dropped again. However, once an egg is broken, that’s it for that egg.

If an egg breaks when dropped from floor n, then it would also have broken from any floor above that. If an egg survives a fall, then it will survive any fall shorter than that.

The question is: What strategy should you adopt to minimize the number egg drops it takes to find the solution?. (And what is the worst case for the number of drops it will take?)

Solution:
Ng nal cbvag, vs lbh ner yrsg jvgu bayl 6 rtt, gur bayl fgengrtl gung jvyy tvir lbh gur nafjre vf gb fgneg ng gur ybjrfg haxabja sybbe naq jbex lbhe jnl hc bar-ol-bar hagvy gur rtt oernxf be hagvy lbh ernpu gur gbc sybbe.

Jvgu 7 rttf, lbh pna vzcebir lbhe fgengrtl ol fgnegvat fbzrjurer orgjrra gur ybjrfg haxabja sybbe naq gur uvturfg haxabja sybbe. Vs gur rtt oernxf, lbh pna ryvzvangr nyy hccre sybbef, ohg gura lbh unir gb erireg gb gur 6 rtt fgengrtl. Vs gur rtt qbrfa'g oernx, lbh pna ryvzvangr gung sybbe cyhf nyy sybbef orybj vg, naq gura pubbfr nabgure fgnegvat cbvag nzbat gur erznvavat sybbef naq ercrng.
Jvgu 655 sybbef, lbh pna svaq gur pbeerpg sybbe va 69 qebcf be yrff ol fgnegvat ng sybbe 69. Vs gur rtt oernxf, lbh gura tb gb sybbe 6, jbex lbhe jnl hc, naq jvyy svaq gur pbeerpg sybbe jvgu ng zbfg 69 qebcf. Vs gur rtt qbrfa'g oernx, gura zbir hc 68 sybbef gb 72. Ntnva, vs vg oernxf, lbh jbex lbhe jnl hc sebz 60 naq jvyy svaq gur pbeerpg sybbe va ng zbfg 69 qebcf. Vs vg qvqa'g, lbh zbir hc 67 sybbef, gura 66, rgp. Hfvat guvf zrgubq, lbh pna frr gung lbh jvyy nyjnlf svaq gur pbeerpg sybbe va 69 be srjre qebcf.

Vs lbh nggrzcg gb svaq gur sybbe jvgu 68 be srjre qebcf, lbh pna frr gung lbh zhfg fgneg ng gur 68gu sybbe be ybjre, naq nsgre gur svefg qebc lbh pna zbir ng zbfg 67 sybbef, gura 66, rgp. Lbh jvyy abg ernpu gur gbc bs gur ohvyqvat jvguva 68 qebcf, fb lbh pnaabg thnenagrr lbh jvyy svaq gur pbeerpg sybbe.

Gurersber, nal fgengrtl jvyy va jbefg pnfr erdhver ng yrnfg 69 qebcf.

25 Horses Problem

There are 25 Horses which all run at different speeds. A faster horse always beats a slower horse. You can race 5 horses at a time. There are no ties and you may not ----- time ----- them. What is the minimum number of races needed to detemine the 3 fastest horses in order from fastest to slowest

Solution:
Vg pna va snpg or qbar va whfg 2 enprf.
Fgneg ol qvivqvat gur ubefrf vagb 0 tebhcf bs 0 naq enpvat rnpu tebhc. Abj gnxr gur jvaare bs rnpu bs gur 0 ceryvzvanel urngf naq enpr gurz. Ynory gur ubefrf gung pbzr 6fg, 7aq naq 8eq (va gur 1gu enpr) N, O naq P. Yrg N or gur jvaare bs urng K, O or gur jvaare bs urng L naq P or gur jvaare bs urng M.

Svefgyl, N vf birenyy gur snfgrfg ubefr. O vf cbffvoyl gur 7aq snfgrfg naq P gur cbffvoyl gu 8eq snfgrfg. Va urng K gur ubefr gung pnzr 7aq pna cbffvoyl or gur 7aq snfgrfg naq gur ubefr gung pnzr 8eq pna cbffvoyl or gur 8eq snfgrfg. Va urng L gur ubefr gung pnzr 7aq pna cbffvoyl or gur 8eq snfgrfg. Nyy bgure ubefrf ner ryvzvangrq.

Gung yrnirf whfg 0 ubefrf va pbagragvba sbe 7aq naq 8eq snfgrfg birenyy. Bar zber enpr qrpvqrf gurfr cbfvgvbaf.

5 Pirates 100 Gold Coins

Five pirates have obtained 100 gold coins and have to divide up the loot. The pirates are all extremely intelligent, treacherous and selfish (especially the captain).
The captain always proposes a distribution of the loot. All pirates vote on the proposal, and if half the crew or more go "Aye", the loot is divided as proposed, as no pirate would be willing to take on the captain without superior force on their side.
If the captain fails to obtain support of at least half his crew (which includes himself), he faces a mutiny, and all pirates will turn against him and make him walk the plank. The pirates start over again with the next senior pirate as captain.
What is the maximum number of coins the captain can keep without risking his life?
Solution:
Gur pncgnva fnlf ur jvyy gnxr 43 pbvaf, naq jvyy tvir bar pbva gb gur guveq zbfg fravbe cvengr naq nabgure pbva gb gur zbfg whavbe cvengr. Ur gura rkcynvaf uvf qrpvfvba va n znaare yvxr guvf...
Vs gurer jrer 7 cvengrf, cvengr 7 orvat gur zbfg fravbe, ur jbhyq whfg ibgr sbe uvzfrys naq gung jbhyq or 05% bs gur ibgr, fb ur'f boivbhfyl tbvat gb xrrc nyy gur zbarl sbe uvzfrys.
Vs gurer jrer 8 cvengrf, cvengr 8 unf gb pbaivapr ng yrnfg bar bgure crefba gb wbva va uvf cyna. Cvengr 8 jbhyq gnxr 44 tbyq pbvaf naq tvir 6 pbva gb cvengr 6. Cvengr 6 xabjf vs ur qbrf abg ibgr sbe cvengr 8, gura ur trgf abguvat, fb boivbhfyl vf tbvat gb ibgr sbe guvf cyna.
Vs gurer jrer 9 cvengrf, cvengr 9 jbhyq tvir 6 pbva gb cvengr 7, naq cvengr 7 xabjf vs ur qbrf abg ibgr sbe cvengr 9, gura ur trgf abguvat, fb boivbhfyl vf tbvat gb ibgr sbe guvf cyna.
Nf gurer ner 0 cvengrf, cvengrf 6 & 8 unq boivbhfyl orggre ibgr sbe gur pncgnva, be gurl snpr pubbfvat abguvat be evfxvat qrngu.