Can You Spy on the Infinite Corridor?
You’re using a flat mirror to peek around what is apparently a very, very long corner. (Cue spy music.) What’s the smallest mirror you can use to see everything there is to see?
Welcome to Fiddler on the Proof! The Fiddler is the spiritual successor to FiveThirtyEight’s The Riddler column, which ran for eight years under the stewardship of myself and Ollie Roeder.
Each week, I present mathematical puzzles intended to both challenge and delight you. Beyond these, I also hope to share occasional writings about the broader mathematical and puzzle communities.
Puzzles come out Friday mornings (8 a.m. Eastern time). Most can be solved with careful thought, pencil and paper, and the aid of a calculator. Many include “extra credit,” where the analysis gets particularly hairy or where you might turn to a computer for assistance.
I’ll also give a shoutout to 🎻 one lucky winner 🎻 of the previous week’s puzzle, chosen randomly from among those who submit their solution before 11:59 p.m. the Monday after that puzzle was released. I’ll do my best to read through all the submissions and give additional shoutouts to creative approaches or awesome visualizations, the latter of which could receive 🎬 Best Picture Awards 🎬.
This Week’s Fiddler
You’re a senior member of the Fiddler Spy Agency, and you’ve infiltrated the enemy base, as diagrammed below. You currently find yourself standing in the middle of a narrow corridor, 1 meter wide. You are 1 meter away from a square turn in the corridor, around which is a very long “infinite corridor” (so named because, well, it’s very long.)
Importantly, there’s a flat mirror placed at a 45 degree angle in the far corner of the turn, as shown above. The mirror forms a 45-45-90 right triangle with that corner, such that its hypotenuse (i.e., the length of the mirror) is L.
For different values of L, you can “spy on” different sections of the infinite corridor. A given point in the infinite corridor can be spied upon if there is some location on the mirror that reflects light from that point to where you are standing.
What is the minimum value of L such that the mirror allows you to spy on the entire infinite corridor? (Note that this is a puzzle in two, rather than three, dimensions.)
This Week’s Extra Credit
Now suppose the flat mirror is no longer constrained to be at a 45 degree angle with the corner. That said, it must still be flush against the corner so that it forms a right triangle, as illustrated below:
Once again, what is the minimum length of the hypotenuse L such that the mirror allows you to spy on the entire infinite corridor?
Making the Rounds
There’s so much more puzzling goodness out there, I’d be remiss if I didn’t share some of it here. This week, I’m sharing a geometry nugget posted by Mr. Hermann of the San Tan Charter School. For a spoiler-free experience, here’s the puzzle:
Want to Submit a Puzzle Idea?
Then do it! Your puzzle could be the highlight of everyone’s weekend. If you have a puzzle idea, shoot me an email. I love it when ideas also come with solutions, but that’s not a requirement.
Last Week’s Fiddler
Congratulations to the (randomly selected) winner from last week: 🎻Ravi Dayabhai and Conrad Warren (working as a team) 🎻 from Atlanta, Georgia and Edmonton, Canada, respectively. I received 64 timely submissions, of which 60 were correct—good for a 94 percent solve rate.
Last week, I had five distinct pairs of socks in my drawer, none of which was actually paired up. The room was pitch black, so I couldn’t see the color of any sock I was pulling out. I reached into my drawer and randomly pulled out one of the 10 socks. Then I reached in again and pulled out one of the remaining nine. I could keep pulling out one sock at a time, at random, until I decided to stop at some point.
My goal was to stop removing socks as soon as I had a matching pair among those I had drawn. How many socks should I have drawn to maximize the chances that the last sock I drew resulted in the first such pair?
Before getting too deep into the math, it was a good idea to gut check the extremes here. If I drew very few socks, it was unlikely that I’d have a matching pair among them. And if I drew many socks, it was very likely I’d have a pair among them, in which case each additional sock I drew wasn’t likely to be the first one that made a pair. All this suggested that the probability distribution for which number sock made the first pair started small, increased, and then decreased back to small values again. So it made sense that there would be some maximum value in the middle—some number sock drawn that offered the greatest chance of making my first pair.
To find that optimal number sock, many solvers, like Lise Andreasen and Tamar Palmer, looked at the socks one at a time, determining the probability that each resulted in the first drawn pair.
The probability that you had a matching sock after pulling out the very first sock was zero, since you needed two socks to make a matching pair. (That case wasn’t too bad to work out!)
There was a chance you had a matching pair with the second sock, however. To do this, whatever sock you pulled first, you needed to draw the one matching sock from among the remaining nine. So your chances of having a pair after two was 1/9.
To get your first pair upon drawing the third sock, you needed to not get a pair with the second sock, which had probability 8/9, and then you needed the third sock to match one of the preceding two, which had probability 2/8 (i.e., two of the remaining eight socks resulted in a pair). So the probability of making your first pair upon drawing the third sock was 8/9 · 2/8, or 2/9.
To get your first pair upon drawing the fourth sock, you needed your first three socks to all be different, which had probability 8/9 · 6/8, and then you needed the fourth sock to match one of the preceding three, which had probability 3/7. So the probability of making your first pair upon drawing the fourth sock was 8/9 · 6/8 · 3/7, or 2/7.
To get your first pair upon drawing the fifth sock, you needed your first four socks to all be different, which had probability 8/9 · 6/8 · 4/7, and then you needed the fifth sock to match one of the preceding four, which had probability 4/6. So the probability of making your first pair upon drawing the fourth sock was 8/9 · 6/8 · 4/7 · 4/6, or 16/63.
At this point, you might have noticed a pattern. In each expression, the denominators kept decreasing by one, since you had one fewer sock to choose from after each drawing. But the numerators decreased by two, since you had one less sock and you couldn’t (yet) pull the matching sock of the last one drawn. Meanwhile, the very last fraction of each product was then the number of socks you had already drawn divided by the total number of socks remaining. Mathematically, this meant the probability that the kth sock drawn resulted in the first matching pair was 10/10 · 8/9 · … · [10−2·(k−2)]/[10−(k−2)] · (k−1)/[10−(k−1)].
You could apply this formula to the determine the probability you got your first pair upon drawing the sixth sock: 8/9 · 6/8 · 4/7 · 2/6 · 5/5, or 8/63.
Meanwhile, the probability you got your first pair upon drawing the seventh sock—at least, according to the formula—was 8/9 · 6/8 · 4/7 · 2/6 · 0/5 · 6/4. The last fraction in this product, 6/4, didn’t make any sense as a probability because it was greater than 1. But then again, the term immediately prior to that was zero, suggesting the entire product was zero. Why? Because you could never get your first pair upon drawing the seventh sock. In a worst-case scenario, the first five socks you drew were all different from each other. But after that, it was guaranteed that the sixth sock matched one of the preceding five. So the greatest number of socks you would ever need to draw was six.
To double check our calculations up to this point, we knew that some sock had to be the first that resulted in a pair, which meant all the preceding probabilities had to sum to 1. Sure enough, 1/9 + 2/9 + 2/7 + 16/63 + 8/63 = 1.
At this point, we can finally answer the question posed by the puzzle. While the fifth sock had an impressive 16/63 probability, or approximately 25.4 percent chance, of resulting in the first pair, the sock with the greatest such probability was the fourth sock, as its 2/7 probability corresponded to a slightly greater chance, ~28.6 percent. Therefore, to maximize the chances that the last sock I drew resulted in the first pair, I should have drawn four socks.
Solver Tom Singer graphed these probabilities and compared them to 10,000 simulations in Excel, all of which confirmed that four socks was the optimal number to draw.
Last Week’s Extra Credit
Congratulations to the (randomly selected) winner from last week: 🎻 Matt Carlton 🎻 from Los Osos, California. I received 45 timely submissions, of which 40 were correct—good for an 89 percent solve rate.
Instead of five pairs of socks, I now had N pairs of socks, where N was a very large number. In terms of N, how many socks should I have drawn to maximize the chances that the last sock I drew resulted in the first pair?
Keep reading with a 7-day free trial
Subscribe to Fiddler on the Proof to keep reading this post and get 7 days of free access to the full post archives.