Skip to content

saurabhr

  • Home
  • Analytics Apps
    • NBA Headshot Plot
    • NBA Player Combos
    • NBA Playoff Matchups
    • NBA Rotation Finder
    • Exploring the EFL Pyramid

I real­ly like puz­zles. Specif­i­cal­ly The Rid­dler series at FiveThir­tyEight. The puz­zles give me a good excuse to:

  • to try new things from a tech­ni­cal perspective
  • exer­cise the more log­i­cal part of my brain — often a wel­come change after hours of UI design
  • tell sto­ries!

 The Rid­dler, as per Five Thir­tyEight descrip­tion is:

Wel­come to The Rid­dler. Every week, I offer up prob­lems relat­ed to the things we hold dear around here: math, log­ic, and prob­a­bil­i­ty. There are two types: Rid­dler Express for those of you who want some­thing bite-size and Rid­dler Clas­sic for those of you in the slow-puz­zle movement. 

Will You (Yes, You) Decide The Election?

Source: Alexa Kerr — https://www.alexakerr.co.uk/

Solu­tion

You are the only sane vot­er in a state with two can­di­dates run­ning for Sen­ate. There are N oth­er peo­ple in the state, and each of them votes com­plete­ly ran­dom­ly! Those vot­ers all act inde­pen­dent­ly and have a 50–50 chance of vot­ing for either can­di­date. What are the odds that your vote changes the out­come of the elec­tion toward your pre­ferred candidate?

More impor­tant­ly, how do these odds scale with the num­ber of peo­ple in the state? For exam­ple, if twice as many peo­ple lived in the state, how much would your chances of swing­ing the elec­tion change?

Alli­ga­tors, Sharks, Bridges and Friends

Solu­tion

Four peo­ple have to cross an old, rick­ety bridge over deep, cold water infest­ed with sharks, alli­ga­tors, croc­o­diles and shriek­ing eels. The bridge is so old that it can hold no more than two peo­ple at any giv­en time. It’s the mid­dle of the night, so on every trip across the bridge, the per­son cross­ing needs to use the group’s only flash­light to cross safe­ly. The four peo­ple who need to cross all walk at dif­fer­ent speeds. One of them takes one minute to cross, one takes two min­utes, one takes five min­utes and one takes 10 min­utes. If two peo­ple cross togeth­er, they need to stay togeth­er to share the flash­light, so they cross at the speed of the slow­er per­son. For exam­ple, the one-minute per­son can cross with the 10-minute per­son, and that trip would take 10 minutes.

How Many Bananas Does It Take To Lead A Camel To Market?

Solu­tion

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 loy­al camel can car­ry at most 1,000 bananas at a time. How­ev­er, it has an insa­tiable appetite and quite the nose for bananas — if you have bananas with you, it will demand one banana per mile trav­eled. In the absence of bananas on his back, it will hap­pi­ly walk as far as need­ed to get more bananas, loy­al beast that it is. What should you do to get the largest num­ber of bananas to the bazaar? What is that number?

Can You Solve The Puz­zle Of The Picky Eater?

Solu­tion

Every morn­ing, before head­ing to work, you make a sand­wich for lunch using per­fect­ly square bread. But you hate the crust. You hate the crust so much that you’ll only eat the por­tion of the sand­wich that is clos­er to its cen­ter than to its edges so that you don’t run the risk of acci­den­tal­ly bit­ing down on that charred, stiff perime­ter. How much of the sand­wich will you eat?

Extra cred­it: What if the bread were anoth­er shape — tri­an­gu­lar, hexag­o­nal, octag­o­nal, etc.? What’s the most effi­cient bread shape for a crust-hater like you?

Can You Solve The Puz­zle Of The Pirate Booty?

Solu­tion

Ten Per­fect­ly Ratio­nal Pirate Logi­cians (PRPLs) find 10 (indi­vis­i­ble) gold pieces and wish to dis­trib­ute the booty among themselves.

The pirates each have a unique rank, from the cap­tain on down. The cap­tain puts forth the first plan to divide up the gold, where­upon the pirates (includ­ing the cap­tain) vote. If at least half the pirates vote for the plan, it is enact­ed, and the gold is dis­trib­uted accord­ing­ly. If the plan gets few­er than half the votes, how­ev­er, the cap­tain is killed, the sec­ond-in-com­mand is pro­mot­ed, and the process starts over. (They’re muti­nous, these PRPLs.)

Pirates always vote by the fol­low­ing rules, with the ear­li­est rule tak­ing prece­dence in a conflict:

  1. Self-preser­va­tion: A pirate val­ues his life above all else.
  2. Greed: A pirate seeks as much gold as possible.
  3. Blood­thirst: Fail­ing a threat to his life or boun­ty, a pirate always votes to kill.

Under this sys­tem, how do the PRPLs divide up their gold?

Extra cred­it: Solve the gen­er­al­ized prob­lem where there are P pirates and G gold pieces.

Can You Slay The Puz­zle Of The Mon­sters’ Gems?

Solu­tion

A video game requires you to slay mon­sters to col­lect gems. Every time you slay a mon­ster, it drops one of three types of gems: a com­mon gem, an uncom­mon gem or a rare gem. The prob­a­bil­i­ties of these gems being dropped are in the ratio of 3:2:1 — three com­mon gems for every two uncom­mon gems for every one rare gem, on aver­age. If you slay mon­sters until you have at least one of each of the three types of gems, how many of the most com­mon gems will you end up with, on aver­age?

Can You Solve This Ele­va­tor But­ton Puzzle?

Solu­tion

In a building’s lob­by, some num­ber (N) of peo­ple get on an ele­va­tor that goes to some num­ber (M) of floors. There may be more peo­ple than floors, or more floors than peo­ple. Each per­son is equal­ly like­ly to choose any floor, inde­pen­dent­ly of one anoth­er. When a floor but­ton is pushed, it will light up.

What is the expect­ed num­ber of lit but­tons when the ele­va­tor begins its ascent?

Per­plex­ing Puz­zle of the Proud Partygoers

Solu­tion

It’s Fri­day and that means it’s par­ty time! A group of N peo­ple are in atten­dance at your shindig, some of whom are friends with each oth­er. (Let’s assume friend­ship is sym­met­ric — if per­son A is friends with per­son B, then B is friends with A.) Sup­pose that every­one has at least one friend at the par­ty, and that a per­son is “proud” if her num­ber of friends is strict­ly larg­er than the aver­age num­ber of friends that her own friends have. (A com­pet­i­tive lot, your guests.) Impor­tant­ly, more than one per­son can be proud. How large can the share of proud peo­ple at the par­ty be?

  • Email
  • LinkedIn
  • Github
  • Twitter
  • Instagram
Proudly powered by WordPress
×