This week the #puzzle is: Have You Heard the Buzz? #counting #frequency #combinations
I recently introduced my children to a game called “Buzz” (also known as “Fizz buzz”), in which players take turns reciting whole numbers in order. However, in one particular variant of the game, anytime a number is a multiple of 7 or at least one of its digits is a 7, the player must say “buzz” instead of that number.
For example, here is how the first 20 turns of the game should proceed: 1, 2, 3, 4, 5, 6, buzz, 8, 9, 10, 11, 12, 13, buzz, 15, 16, buzz, 18, 19, 20.
How many times should “buzz” be said in the first 100 turns of the game (including those mentioned above in the first 20 turns)?
And for extra credit:
As we just saw, in the first 20 turns of the game, 15 percent of the numbers were “buzzed.” But as the game proceeds, an increasing frequency of numbers get buzzed.
There is a certain minimum number N such that, for the Nth turn in the game and for every turn thereafter, at least half the numbers up to that point have been buzzed. What is this value of N?
Method 1: I write a program to produce all the buzzes and count them. There are 30.
Method 2:
We are looking at the numbers 1-100.
If the last digit is 7, it’s a buzz: 7, 17, 27, … 97. 10 of these.
If the next to last digit is 7, it’s a buzz: 70, 71, 72, … 79. 10 of these.
If the number is a multiple of 7, it’s a buzz: 7, 14, 21, … 98. 14 of these.
But if we just say 10 + 10 + 14, we’ve counted something twice. 77 will be counted 3 times!
The first 10, we keep.
The next 10, we throw 77 away, because we already had it. 10 + 9. (Among the 10 numbers beginning with the digit 7, exactly 1 also ends with a 7, and we already covered that.)
The next 14, we throw 7, 70 and 77 away, because we already had them. 10 + 9 + 11. (Among the 14 numbers that are multiples of 7, exactly 3 are multiples that “keep” the 7. 1 * 7, 10 * 7, 11 * 7.)
Method 1: I expand the program from above. I look for a frequency of about 0.5 and then zoom in to learn more about this general area. The result is illustrated in the Desmos. Look for the clump at 0.5 and zoom!
Method 2: The graph has a distinctive shape. Every time we run into a whole bunch of numbers, all beginning with 7, the frequency will grow. Afterwards it will go up and down a bit, until the next bunch, but on the whole it will keep growing. For our purposes, once we hit the 700000-799999 bunch, it grows past 0.5 and never dips below again.
I confirm this result via the program, looking at different thresholds. E.g. the 0.45 threshold is 71574. Look for the red stars in the Desmos file.
Anyway. N = 708588.
Method 3: A similar counting argument as above. Left as an exercise to the reader 😉
If you want to compare 2 large numbers, and remember to carry the one(s), this is how you do it.
First row in the table below: Our units. In the middle, there’s a familiar system: 1, 10, 100. This is how our own numbers are constructed. There’s a position for 1s, a position for 10s, etc. To the left and to the right, the units are not the familiar ones, but hopefully we can understand this anyway.
Second row: A sum of a lot of other numbers. The sum hasn’t been normalized to its shortest from yet. We want to normalize and then compare with the last row, another number from the same source.
Normalization example: In the second row, 15 and 15 are bolded. The jump from the first to the second column is to multiply by 2. (1/120 * 2 = 1/60.) So to normalize, we look at the first 15 and divide by 2.
a = 1/120, b = 1/60
2a = b
15/2 = 7.5
15 = 1 + 7 * 2
15a + 15b
= (1 + 7 * 2)a + 15b
= a + 7 * 2a + 15b
= a + 7b + 15b
= a + 22b
So in the next row, instead of 15 and 15, we have 1 and 22.
Move to the next pair of columns and repeat.
1/120
1/60
1/30
1/10
1/5
1
10
100
300
3000
18000
15
15
24
14
19
26
39
11
7
8
5
1
22
24
14
19
26
39
11
7
8
5
1
0
35
14
19
26
39
11
7
8
5
1
0
2
25
19
26
39
11
7
8
5
1
0
2
1
31
26
39
11
7
8
5
1
0
2
1
1
32
39
11
7
8
5
1
0
2
1
1
2
42
11
7
8
5
1
0
2
1
1
2
2
15
7
8
5
1
0
2
1
1
2
2
0
12
8
5
1
0
2
1
1
2
2
0
2
9
5
1
0
2
1
1
2
2
0
2
3
6
1
0
2
1
1
2
2
1
1
3
6
And yes, the end result is, that the 2 numbers aren’t quite the same.
Background: Recently I read this, in From One to Zero, Georges Ifrah :
“Phrases like “There’ll always be an England” are pleasant and inspiring at the present time, but we know better. There won’t always be an England, nor a Germany, nor a United States, a Baptist Church, nor monogamy, nor the Democratic Party, nor the modesty taboo, nor the superiority of the white race, nor airplanes. Nor automobiles. They will go. They will be gone-we’ll see them go. Any custom, institution, belief, or social structure that we see around us today will change, will pass, and most of those we will see change and pass.
In science fiction, we try to envision what those changes might be. Our guesses are usually wrong; they are almost certain to be wrong. Some men, with a greater grasp on data than others, can do remarkably well. H. G. Wells, who probably knows more (on the order of ten times as much, or perhaps higher) than most science fiction writers, has been remarkably successful in some of his predictions. Most of us aren’t that lucky;
I do not expect my so-called History of the Future to come to pass. I think some of the trends in it may show up, but I do not think that my factual predictions as such are going to come to pass, even in their broad outlines.”
“I have never been able to understand quite why it is that the historical novel is the most approved, the most sacred form of literature. The contemporary novel is next so; but the historical novel, if you write an historical novel, that’s literature.
I think that the corniest tripe published in a science fiction magazine (and some of it isn’t too hot, we know that; some of my stuff isn’t so hot) beats all of the Anthony Adverses and Gone With the Winds that were ever published, because at least it does include that one distinctly human-like attempt to predict the future.”
This week the #puzzle is: Can You Rile and Grace the Polyhedron? #geometry
An alien—more specifically, an Eridian—named “Rocky” needs to pass a solid xenonite crystal to his human friend in a neighboring spaceship. The crystal is shaped like a regular tetrahedron, as shown below, and all its edges have length 1.
To safely transport the crystal, Rocky needs to create a long cylindrical tunnel between the spaceships, and then orient the tetrahedron so that it fits through the tunnel. It’s okay if the crystal fits snugly inside the tunnel—in this case, it can slide along without any friction.
What is the minimum possible radius for my tunnel so that the crystal will fit through it?
And for extra credit:
Next, Rocky wants to transport a solid crystal shaped like a regular dodecahedron to his human friend. As before, each edge has length 1.
This time, the long tunnel between the space ships can be any right prismatic shape, not necessarily a cylinder. Once again, Rocky needs the crystal to fit through the tunnel, and it’s okay if that fit is snug.
What is the minimum possible cross-sectional area for the tunnel so that the crystal will fit through it?
The results from Q1 are in, and the finest of Fiddlers, who each solved all 24 puzzles, are: 👑 Adnan Haque 👑 from New York 👑 David Kong 👑 from Toronto, Canada 👑 Josh Silverman 👑 from Glen Head, New York 👑 Lise Andreasen 👑 from Valby København Danmark 👑 Peter Ji 👑 from Madison, Wisconsin 👑 Seth Cohen 👑 from Concord, New Hampshire
Method 1: Write a brute force program. This actually finds a solution rather quickly. N2 is confirmed, among other things.
Testing N1 = 1. Testing these primes: 2 ................. Group 1: 2 ................. Sum of groups: 2 ................. N1 = 1
Testing N2 = 2. Sum of primes 5 isn't a multiple of 2, rejected. Testing N2 = 3. Testing these primes: 5,3,2 ................. Group 1: 5 ................. Group 2: 3,2 ................. Sum of groups: 5 ................. N2 = 3
Testing N3 = 3. Sum of primes 10 isn't a multiple of 3, rejected. Testing N3 = 4. Sum of primes 17 isn't a multiple of 3, rejected. Testing N3 = 5. Sum of primes 28 isn't a multiple of 3, rejected. Testing N3 = 6. Sum of primes 41 isn't a multiple of 3, rejected. Testing N3 = 7. Sum of primes 58 isn't a multiple of 3, rejected. Testing N3 = 8. Sum of primes 77 isn't a multiple of 3, rejected. Testing N3 = 9. Sum of primes 100 isn't a multiple of 3, rejected. Testing N3 = 10. Testing these primes: 29,23,19,17,13,11,7,5,3,2 ................. Group 1: 29,7,5,2 ................. Group 2: 23,17,3 ................. Group 3: 19,13,11 ................. Sum of groups: 43 ................. N3 = 10
N6 has to be at least 57. But then my program gives up. Heat death of the universe kind of thing.
Testing N6 = 57. Testing these primes: 269,263,257,251,241,239,233,229,227,223, 211,199,197,193,191,181,179,173,167,163, 157,151,149,139,137,131,127,113,109,107, 103,101,97,89,83,79,73,71,67,61,59,53, 47,43,41,37,31,29,23,19,17,13,11,7,5,3,2 Or rather, test left as an exercise for the reader.
Method 2: Try to find a solution with the first 57 primes. And I do!
269,199,197,139,137,89,59,37,19
263,211,181,163,109,103,53,47,13,2
257,223,173,167,107,101,71,41,5
251,227,179,157,127,83,61,31,29
241,229,193,151,113,97,67,43,11
239,233,191,149,131,79,73,23,17,7,3
N6 = 57.
Method 3: Look for an OEIS sequence. Found. Results confirmed.
This week the #puzzle is: Can You Trace the Locus? #geometry #area #coding
I have a loop of string whose total length is 10. I place it around a unit disk (i.e., with radius 1) and pull a point on the string away from the disk until the string is taut, as shown below.
I drag this point around the disk in all directions, always keeping the string taut, tracing out a loop. What is the area inside this resulting loop?
And for extra credit:
Now I have a loop of string whose total length is 14, and I place it around two adjacent unit disks. As before, I pull a point on the string away from the disks until the string is taut, as shown below.
I drag this point around the disks in all directions, always keeping the string taut, tracing out a loop. What is the area inside this resulting loop?
Let the center of the circle be at (0, 0). Choose a random point p2 (x2, 0) (0 < x2) and fudge around, until the string has length s = 10. This involves some math first. Let p1 (x1, y1) (0 < x1) be the point, where the string switches between straight and round. This point is on the tangent to the circle going through p2. p1 also represents an angle a. I change a, until s = 10.
(I had some nicer equations planned, but WordPress won’t play along.)
(x1, y1) = (cos(a), sin(a))
Round stretch of string:
s1 = 2 π – 2a = 2 (π – a)
Line through p1:
m = y1 / x1
y = m x
Tangent through p1:
m = – x1 / y1
y – y1 = m (x – x1) y – y1 = – x1 / y1 * x + x1 / y1 * x1 y = – x1 / y1 * x + x1 / y1 * x1 + y1 y = – x1 / y1 * x + (x12 + y12) / y1 y = – x1 / y1 * x + 1 / y1
This puzzle resembles the fiddler. Except the loop isn’t just a nice circle. I have to calculate a new y, every time I change x. (That’s what I ended up doing anyway.) I write a program to do it for me and estimate the area. (Geometry and integrals will be the death of me.) Below I show a quarter of the loop.
When -1 < y < 1, the calculation is the same. This part of the loop will be the same as the circle from the fiddler.
In that situation we have 2 straight bits of length 2, going between the circle, half a circle on the left and then the same situation as the fiddler on the right.
But outside of that band, the 2 straight bits between circles and point go to different circles.