Can You Spin the Graph?
You’re trying to draw the graph of a function, meaning every x-coordinate has at most one y-coordinate. But after a bout of dizziness and a random rotation, is your graph still a function?
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. 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 taking a math exam, and you’ve been asked to draw the graph of a function. That is, your graph must pass the vertical line test, so that no vertical line intersects your function’s graph more than once.
You decide you’re going to graph the absolute value function, y = |x|, and ace the test.
There’s just one problem. You are dealing with a bout of dizziness, and can’t quite make out the x- and y-axes on the exam in front of you. As a result, your function will be rotated about the origin by a random angle that’s uniformly chosen between 0 and 360 degrees.
What is the probability that the resulting graph you produce is in fact a function (i.e., y is a function of x)?
This Week’s Extra Credit
In a more advanced course, you’ve been asked to draw a 3D sketch of the function z = |x| + |y|. As you’re about to do this, you are struck by another bout of dizziness, and your resulting graph is randomly rotated in 3D space.
More specifically, your graph has the correct origin. But the true z-axis is equally likely to point from the origin to any point on the surface of the unit sphere. (Meanwhile, the x-axis is equally likely to point in any direction perpendicular to the z-axis. From there, the y-axis is uniquely determined.)
What is the probability that the resulting graph you produce is in fact a function (i.e., z is a function of x and y)?
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 reminder to subscribe to X’s Puzzle Corner if you’re looking for even more mathematical puzzles here on Substack. A recent sequence of puzzles over there led to a classic question, which I’ll paraphrase here:
Suppose you have N objects (numbered 1 through N) in an array. They are currently in a random order, and it’s your job to sort them. You sort by picking any two objects and swapping their positions. What is the expected minimum number of swaps you’d need to sort all the objects, in terms of N?
Feel free to discuss this puzzle and your approach in the comments below—or better yet, over at X’s Puzzle Corner!
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.
Standings
I’m tracking submissions from paid subscribers and compiling a leaderboard, which I’ll reset every quarter. All timely correct solutions to Fiddlers and Extra Credits are worth 1 point each. At the end of each quarter, I’ll 👑 crown 👑 the finest of Fiddlers. (If you think you see a mistake in the standings, kindly let me know.)
Last Week’s Fiddler
Congratulations to the (randomly selected) winner from last week: 🎻 Mike Strong 🎻 from Mechanicsburg, Pennsylvania. I received 99 timely submissions, of which 94 were correct—good for a 95 percent solve rate.
Last week, you were a frog in a pond with four lily pads, marked “1” through “4.” You started on pad 2, and your goal was to make it to pad 1. From any given pad, there were specific probabilities that you’d jump to another pad:
Once on pad 1, you would happily stay there forever.
From pad 2, there was a 1-in-2 chance you’d hop to pad 1, and a 1-in-2 chance you’d hop to pad 3.
From pad 3, there was a 1-in-3 chance you’d hop to pad 2, and a 2-in-3 chance you’d hop to pad 4.
Once on pad 4, you would unhappily stay there forever.
Given that you started on pad 2, what was the probability that you’d ultimately make it to pad 1 (as opposed to pad 4)?
There was a 50 percent chance that you’d hop to pad 1 immediately, which was great news. But what about the other 50 percent of the time?
If you didn’t jump to pad 1, that meant you hopped over to pad 3. From there, you better not have jumped to pad 4, lest you be unhappy forever. You wanted to return to pad 2, which happened with probability 1/3. From there, you hopefully hopped to 1. Otherwise, you were back on pad 3, hoping to make it back to pad 2.
At this point, solvers like Daniel Scher did something quite clever. They listed out all the sequences of jumps for which you reached pad 1:
2 → 1
2 → 3 → 2 → 1
2 → 3 → 2 → 3 → 2 → 1
2 → 3 → 2 → 3 → 2 → 3 → 2 → 1
And so on … You could bounce around between pads 2 and 3 any number of times before jumping from pad 2 to pad 1. However, over time, it became less and less likely that you’d still be on pads 2 and 3, and more likely that you found yourself on pads 1 or 4.
We already said the first sequence in the list (2 → 1) had a probability of 1/2. The second sequence (2 → 3 → 2 → 1) had a probability of (1/2)·(1/3)·(1/2), or 1/12. The third sequence (2 → 3 → 2 → 3 → 2 → 1) had a probability of (1/2)·(1/3)·(1/2)·(1/3)·(1/2), or 1/72. Adding these up got you to about 59.72 percent, so the answer was at least that much.
By the way, did you notice a pattern in the sequence of probabilities? Every additional pair of hops from pad 2 to pad 3 and then back to pad 2 reduced the probability of making it to pad 1 by a factor of six. Adding all the probabilities together resulted in the following series: (1/2) + (1/6)·(1/2) + (1/6)2·(1/2) + (1/6)3·(1/2) + …, which solver Emily Kelly correctly noted was a geometric series. To find the sum, you could take the first term and divide by 1 minus the common ratio, which gave you (1/2)/(1−1/6), which simplified to 3/5. And so the probability you’d ultimately make it to pad 1 was 3/5, or 60 percent.
Summing the geometric series was a great approach to this puzzle, but another one—employed by solvers Steven Steinsaltz and Andy Quick, among others—was more algebraic in nature. Suppose the probability you ultimately made it from pad k to pad 1 was pk. Right off the bat, you knew p1 = 1 and p4 = 0.
Meanwhile, p2 and p3 were more interesting. In particular, p2 = (1/2)·p1 + (1/2)·p3. This equation said that when you were on pad 2, half the time you jumped to pad 1 (from which your probability of ultimately making it to pad 1 was p1), and the other half the time you jumped to pad 3 (from which your probability of ultimately making it to pad 1 was p3). Plugging in p1 = 1 gave you p2 = 1/2 + p3/2. You could write a similar equation for when you were on pad 3: p3 = (1/3)·p2 + (2/3)·p4. Plugging in p4 = 0 gave you p3 = p2/3.
At this point, you had two equations with two unknowns (p2 and p3). And one of these variables, p2, was the solution to the puzzle—it was precisely the probability that you made it to pad 1, given that you were currently on pad 2. Substituting the latter equation into the former gave you p2 = 1/2 + (p2/3)/2, or p2 = 1/2 + p2/6. Solving this revealed that p2 was 3/5, or 60 percent—the same answer we already found.
One advantage of this algebraic approach was that it immediately told you the probability you’d make it to pad 1 from pad 3, if you were so curious. That was p3, which we just found was equal to p2/3, or 1/5.
Last Week’s Extra Credit
Congratulations to the (randomly selected) winner from last week: 🎻 Charles Dunn 🎻 from Somerville, Massachusetts. I received 58 timely submissions, of which 52 were correct—good for a 90 percent solve rate.
Once again, you were a frog in a pond. But this time, the pond had infinitely many lily pads, which were numbered “1,” “2,” “3,” etc. As before, you started on pad 2, and your goal was to make it to pad 1, which you would happily stay on forever.
Whenever you were on pad k, you hopped to pad k−1 with probability 1/k, and you hopped to pad k+1 with probability (k−1)/k.
Now, what was the probability that you would ultimately make it to pad 1?
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.