Where Will the Sorting Hat Put You?
You’re about to be sorted into one of four wizarding houses, but the magical sorting hat never says the same house twice in a row. What are your chances of getting into your preferred house?
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 are waiting in line to be sorted into one of the four houses of Logwarts (a posh wizarding boarding school in the Scottish highlands) by an anthropomorphic sorting hat. The hat is a bit of a snob about the whole matter, and refuses to sort two students in a row into the same house. If a student requests a certain house, but the previously sorted student was already sorted into that same house, then the hat chooses randomly from among the three remaining houses. Otherwise, the hat grants the student’s request.
You are standing 10th in line, and you make plans to request Graphindor house for yourself. As for the other students in line, you can assume that they have random preferences from among the four houses.
The first student steps up, and has a brief, quiet conversation with the hat. After a few moments, the hat proclaims, “Graphindor!”
At this point, what is the probability that you will be sorted into Graphindor?
This Week’s Extra Credit
Suppose the answer to this week’s Fiddler is p.
Now, instead of being 10th in line, suppose you are Nth in line, where N is some value much greater than 10. Because so many students are being sorted in front of you, you decide you’ll take a nap. You wake up without any idea of how long you were out—it could have been a second, or it could have been an hour, you’re just not sure. It’s still not your turn to be sorted yet, but you see a student wearing the hat. After a brief moment, the hat shouts, “Graphindor!”
What is the smallest value of N such that your probability of being sorted into Graphindor is greater than p?
(To be clear, when you wake up, the student being sorted is anywhere from first in line to immediately before you in line with equal probability.)
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 rephrasing a social media post (spoiler alert!) as an analysis puzzle:
Suppose f(x) is a smooth function with f(0) = f(1) = 0, and that f(x) is nonzero for at least one point between 0 and 1. What is the minimum possible value for the following ratio of integrals:
\(\frac{\int_0^1\left(f'\left(x\right)\right)^2dx}{\int_0^1\left(f\left(x\right)\right)^2dx}\)In words, the denominator is the integral of the function squared (from 0 to 1), while the numerator is the integral of the function’s derivative squared (from 0 to 1).
For which smooth functions does this ratio equal its minimum possible value?
As always, feel free to discuss this puzzle and your approach in the comments below.
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: 🎻 Matt Zimmerman 🎻 from Charlottesville, Virginia. I received 64 timely submissions, of which 56 were correct—good for an 87.5 percent solve rate.
Last week, I shared a post from Anthony Bonato:
The shape in the image above had four “sides” of equal length, with four right angles. However, two of these sides were curved (in particular, they were arcs of circles) and two of the right angles were exterior to the shape, meaning the interior angles measured 270 degrees (rather than the usual 90 degrees).
We called shapes like this one “pseudo-squares.” A pseudo-square had the following properties:
It was a simple, closed curve.
It had four sides, all the same length.
Each side was either a straight line segment or the arc of a circle.
The four sides were joined at four corners, with each corner having an internal angle of 90 degrees or 270 degrees.
The pseudo-square pictured above had two straight sides, which ran radially between arcs of two concentric circles.
Assuming this was a unit pseudo-square (i.e., each side has length 1), what was its area?
A conventional unit square (with four straight sides and four internal right angles) had an area of 1. Because of its concavity, this pseudo-square appeared to have an area of less than 1. But this puzzle was asking for the exact area; just saying it was less than 1 wasn’t sufficient.
A good strategy was to define some parameters for this pseudo-square. Then, by forcing the side lengths to equal 1, you could cook up some equations to relate these parameters and solve for them. From there, you could compute the shape’s area.
Two parameters you could have used to describe the shape were:
The radius of the inner circle’s arc, which we’ll call r. Because the two arcs were from concentric circles and the straight sides connecting the arcs had length 1, the radius of the outer circle’s arc was 1+r. Based on the drawing, r appeared to be about 0.2.
The angle of the inner circle’s arc, which we’ll call 𝜙. Because the two straight sides extended radially outward, the angle of the outer circle’s arc was 2𝜋−𝜙 (measured in radians). Based on the drawing, we expected 𝜙 to be greater than 2𝜋−𝜙. From the looks of it, 𝜙 appeared close to 7𝜋/4.
In general, the length s of a circular arc is the product of the circle’s radius and its angle (in radians). That meant the length of the inner arc was r𝜙. Since this arc had length 1, that meant r𝜙 = 1, or 𝜙 = 1/r.
So far, we had one equation relating these two unknown parameters. To solve for them, we just needed one more equation—one that came from examining the outer arc. The outer arc’s radius was 1+r and its angle was 2𝜋−𝜙, which meant the second equation was (1+r)(2𝜋−𝜙) = 1.
To solve for r, you could plug in 1/r for 𝜙 in the second equation, giving you (1+r)(2𝜋−1/r) = 1, which you could expand to get 2𝜋r + 2(𝜋−1) − 1/r = 0. Multiplying both sides by r revealed this was a quadratic equation: 2𝜋r2 + 2(𝜋−1)r − 1 = 0. Applying the quadratic formula gave you (-(𝜋−1)+√(𝜋2+1))/(2𝜋), or approximately 0.184.
Meanwhile, 𝜙 equaled 1/r, or 2𝜋/(-(𝜋−1)+√(𝜋2+1)), which came to approximately 5.44 radians. (Our earlier guess of 7𝜋/4 radians was pretty close, as 7𝜋/4 is approximately 5.50 radians.)
Now that you had exact values for r and 𝜙, you still needed to find the area. You could do this by splitting the shape into two sectors, as shown below:
The area of a sector is equal to one half times the angle (in radians) times the radius squared. So the inner sector (in red) had an area of 𝜙r2/2. Meanwhile, the outer sector (in blue) had an area of (2𝜋−𝜙)(1+r)2/2. Therefore, the total area was 𝜙r2/2 + (2𝜋−𝜙)(1+r)2/2. Yuck!
Noting that 𝜙r = (2𝜋−𝜙)(1+r) = 1 (thanks to the two equations we found earlier), you could rewrite this as r/2 + (1+r)/2, or 1/2 + r. That looked a lot nicer!
Since r was approximately 0.184, the area was approximately 0.684. And the exact solution was (1+√(𝜋2+1))/(2𝜋).
Last Week’s Extra Credit
Congratulations to the (randomly selected) winner from last week: 🎻 Mike Porter 🎻 from Haddenham, United Kingdom. I received 22 timely submissions, of which 15 were correct—good for a 68 percent solve rate.
For Extra Credit, you had to find a unit pseudo-square that had three curved sides (i.e., circular arcs) and just one straight side.
What was the area of this new unit pseudo-square?
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.