I really like puzzles. Specifically The Riddler series at FiveThirtyEight. The puzzles give me a good excuse to:
- to try new things from a technical perspective
- exercise the more logical part of my brain - often a welcome change after hours of UI design
- tell stories!
The Riddler, as per Five ThirtyEight description is:
Welcome to The Riddler. Every week, I offer up problems related to the things we hold dear around here: math, logic, and probability. There are two types: Riddler Express for those of you who want something bite-size and Riddler Classic for those of you in the slow-puzzle movement.
Will You (Yes, You) Decide The Election?
You are the only sane voter in a state with two candidates running for Senate. There are N other people in the state, and each of them votes completely randomly! Those voters all act independently and have a 50-50 chance of voting for either candidate. What are the odds that your vote changes the outcome of the election toward your preferred candidate?
More importantly, how do these odds scale with the number of people in the state? For example, if twice as many people lived in the state, how much would your chances of swinging the election change?
Alligators, Sharks, Bridges and Friends
Four people have to cross an old, rickety bridge over deep, cold water infested with sharks, alligators, crocodiles and shrieking eels. The bridge is so old that it can hold no more than two people at any given time. It’s the middle of the night, so on every trip across the bridge, the person crossing needs to use the group’s only flashlight to cross safely. The four people who need to cross all walk at different speeds. One of them takes one minute to cross, one takes two minutes, one takes five minutes and one takes 10 minutes. If two people cross together, they need to stay together to share the flashlight, so they cross at the speed of the slower person. For example, the one-minute person can cross with the 10-minute person, and that trip would take 10 minutes.
How Many Bananas Does It Take To Lead A Camel To Market?
You have a camel and 3,000 bananas. (Because of course you do.) You would like to sell your bananas at the bazaar 1,000 miles away. Your loyal camel can carry at most 1,000 bananas at a time. However, it has an insatiable appetite and quite the nose for bananas — if you have bananas with you, it will demand one banana per mile traveled. In the absence of bananas on his back, it will happily walk as far as needed to get more bananas, loyal beast that it is. What should you do to get the largest number of bananas to the bazaar? What is that number?
Can You Solve The Puzzle Of The Picky Eater?
Every morning, before heading to work, you make a sandwich for lunch using perfectly square bread. But you hate the crust. You hate the crust so much that you’ll only eat the portion of the sandwich that is closer to its center than to its edges so that you don’t run the risk of accidentally biting down on that charred, stiff perimeter. How much of the sandwich will you eat?
Extra credit: What if the bread were another shape — triangular, hexagonal, octagonal, etc.? What’s the most efficient bread shape for a crust-hater like you?
Can You Solve The Puzzle Of The Pirate Booty?
Ten Perfectly Rational Pirate Logicians (PRPLs) find 10 (indivisible) gold pieces and wish to distribute the booty among themselves.
The pirates each have a unique rank, from the captain on down. The captain puts forth the first plan to divide up the gold, whereupon the pirates (including the captain) vote. If at least half the pirates vote for the plan, it is enacted, and the gold is distributed accordingly. If the plan gets fewer than half the votes, however, the captain is killed, the second-in-command is promoted, and the process starts over. (They’re mutinous, these PRPLs.)
Pirates always vote by the following rules, with the earliest rule taking precedence in a conflict:
- Self-preservation: A pirate values his life above all else.
- Greed: A pirate seeks as much gold as possible.
- Bloodthirst: Failing a threat to his life or bounty, a pirate always votes to kill.
Under this system, how do the PRPLs divide up their gold?
Extra credit: Solve the generalized problem where there are P pirates and G gold pieces.
Can You Slay The Puzzle Of The Monsters’ Gems?
A video game requires you to slay monsters to collect gems. Every time you slay a monster, it drops one of three types of gems: a common gem, an uncommon gem or a rare gem. The probabilities of these gems being dropped are in the ratio of 3:2:1 — three common gems for every two uncommon gems for every one rare gem, on average. If you slay monsters until you have at least one of each of the three types of gems, how many of the most common gems will you end up with, on average?
Can You Solve This Elevator Button Puzzle?
In a building’s lobby, some number (N) of people get on an elevator that goes to some number (M) of floors. There may be more people than floors, or more floors than people. Each person is equally likely to choose any floor, independently of one another. When a floor button is pushed, it will light up.
What is the expected number of lit buttons when the elevator begins its ascent?
Perplexing Puzzle of the Proud Partygoers
It’s Friday and that means it’s party time! A group of N people are in attendance at your shindig, some of whom are friends with each other. (Let’s assume friendship is symmetric — if person A is friends with person B, then B is friends with A.) Suppose that everyone has at least one friend at the party, and that a person is “proud” if her number of friends is strictly larger than the average number of friends that her own friends have. (A competitive lot, your guests.) Importantly, more than one person can be proud. How large can the share of proud people at the party be?