~ $ cd ..

Puzzles

Four Traingles

Given 6 toothpicks, can you make 4 triangles? Each triangle should have a side-length of a toothpick.

Balance Scale

There are 9 rocks of equal weight, except one which is slightly heavier. You have a balance scale. What is the minimum number of times you need to use the scale to find the heavier rock?

Lockers

There are 100 lockers in a row, initially all closed. You do 100 passes on the lockers where on the ith pass, you toggle every ith locker. Which lockers will remain open at the end?

Burning Ropes

Two ropes take 1h each to burn. The burning process is non-uniform. You have a lighter. How would you track exactly 45 minutes?

Counterfeit Coins

There are 10 bags, each bag contains 100 identical coins. Each bag contain 10g coins except one bag, which contains all 11g coins. Find the counterfeit bag using 1 usage of a digital scale that tells you exact weight.

Tiger and Sheep

There are 100 tigers and 1 sheep. If a tiger eats a sheep, it will become a sheep. A tiger will eat the sheep only if it knows it won't be eaten by another tiger, otherwise it wouldn't eat the sheep. Will the initial sheep be eaten?

Cave Torch

You're trapped in a large circular dark cave with torches spread across the wall, randomly lit or not lit. You can toggle a torch on and off. You can move clockwise or counterclockwise. Assuming you have infinite time and memory, how would you find the number of torches in the cave with certainty?

Noodle Loops

You have a bowl with 100 noodles. You continuously pick any two noodle ends with equal probability, and connect them. You repeat until there are no remaining noodle ends. After connecting the ends of all noodles, what is the expected number of noodle loops?

Zombie Crossing

You and 3 others are trying to escape zombies in the middle of the night. You must cross a bridge to escape. You have 1 flashlight, which must be used when crossing the bridge. The time it takes each of you to cross is 1m, 2m, 5m, 10m. Only at most two of you can cross the bridge at a time. How do you cross the bridge in 17 minutes?

Horse Racing

There are 25 horses. You can only race 5 horses at a time. You don't have a stopwatch. Can you find the top three fastest horses in 7 races?

Pirate Gold

There are 5 pirates and 100 coins. To divide the loot, the most senior pirate will propose a distribution. Then a vote will take place. If at least 50% of pirates agree, it will proceed, otherwise, the senior pirate will be thrown off and the process is continued until an agreed distribution. Assuming all pirates are rational and want to maximize their share, how will the coins be divided in the end?

Secret Salary

There are a group of Quants sat across a circular table. They are all interested in the average salary of the group. Formulate a strategy to determine the average salary without any quant knowing the exact salary of another quant.

Fair Coin

Given an unfair coin, can you find an algorithm to simulate a fair coin?

Card Swap

You are playing a card game with an opponent, 6 cards numbered 1-6. The goal is to pick the card with a higher value. You both pick a card and look, you have a 2. They look, and ask "let's swap"? Assuming you're both playing optimally, do you sawp?