#ThisWeeksFiddler, 20251212

This week the #puzzle is: Can You Topple the Tower? #geometry #trigonometry #CenterOfMass #integral

A block tower consists of a solid rectangular prism whose height is 2 and whose base is a square of side length 1. A second prism, made of the same material, and with a base that’s L by 1 and a height of 1, is attached to the top half of the first block, resulting in an overhang as shown below.
When L exceeds some value, the block tower tips over. What is this critical length L?

And for extra credit:

Instead of rectangular prisms, now suppose the tower is part of an annulus. More specifically, it’s the region between two arcs of angle 𝜽 in circles of radius 1 and 2, as shown below.
For small values of 𝜽, the tower balances on one of its flat sides. But when 𝜽 exceeds some value, the tower no longer balances on a flat side. What is this critical value of 𝜽?

Can You Topple the Tower?

Intermission

Last week I was busy. ( #AdventOfCode ) I misread the description of the puzzle, and by the time I realized my error, I didn’t have enough time left to fix my mistake. So it goes.

Highlight to reveal (possibly incorrect) solution:

Geeks for Geeks Allen Desmos

And for extra credit:

#ThisWeeksFiddler, 20251128

This week the #puzzle is: Can You Take the Heat? #combinatorics #coding #recursion

In the YouTube show, “Hot Ones,” guests answer interview questions while consuming 10 hot sauces, one at a time, ranked in increasing spiciness from 1 to 10.
You have been invited on as a guest and want to prepare for the show. However, you don’t feel like purchasing all 10 sauces in advance. Your plan is to purchase fewer sauces, and then to combine sauces together for any you are missing. For example, if you are missing sauce #7, then you can instead simultaneously consume sauces #3 and #4, since 3 + 4 = 7. (I know the spiciness of the sauces isn’t linear, but for the purposes of this puzzle, let’s assume it is.)
After some pencil-and-paper scratch work, you realize you only need four spices.
… for how many sets of four spice numbers is it possible to generate all the numbers from 1 to 10 using each spice at most once?

And for extra credit:

You’re prepping for a new show, “Hotter Ones,” which has spices ranked from 1 to 100. Let N be the minimum number of spices needed to generate all the numbers from 1 to 100.
For how many sets of N spice numbers is it possible to generate all the numbers from 1 to 100 using each spice at most once? (Note that I am not asking for the value of N; that’s just something you’ll need to figure out en route to your answer.)

Can You Take the Heat?

Highlight to reveal (possibly incorrect) solution:

Program

And for extra credit:

Everybody codes, 2025

November is over, and I’d like to show you, how much of #EverybodyCodes I was able to finish and how fast. #coding #puzzles

Everybody Codes.

My code: Github.

My points:

QuestPartGlobal RankGlobal ScoreGlobal Time

1909d 19h 10m 52s 000ms
3III1361557m 14s 203ms
4III1163546m 38s 809ms
8II95631m 48s 095ms
III104471h 04m 58s 186ms
13III1183356m 03s 484ms
14III109422h 04m 39s 331ms
18III142910h 09m 06s 517ms
19III148310h 27m 18s 880ms

A lot of the puzzles I could solve within an hour. There are on the other hand 4 part 3s I spent a lot of time on or haven’t solved yet. My personal times:

QuestPartLocal Time

6d 02h 13m 34s 269ms
1I✔️ 10m 44s 561ms
II✔️ 41m 42s 557ms
III✔️ 57m 47s 008ms
2I✔️ 39m 00s 446ms
II1h 08m 07s 492ms
III1h 13m 24s 707ms
3I✔️ 5m 44s 474ms
II✔️ 9m 44s 694ms
III✔️ 12m 52s 639ms
4I✔️ 8m 47s 061ms
II✔️ 16m 12s 579ms
III✔️ 26m 06s 430ms
5I✔️ 25m 20s 628ms
II✔️ 36m 38s 965ms
III3h 57m 23s 504ms
6I✔️ 9m 56s 776ms
II✔️ 14m 50s 792ms
III6h 40m 26s 861ms
7I✔️ 30m 12s 217ms
II✔️ 34m 55s 935ms
III4h 50m 16s 212ms
8I✔️ 8m 45s 964ms
II✔️ 30m 22s 913ms
III1h 03m 33s 004ms
9I✔️ 17m 03s 727ms
II1h 04m 46s 554ms
III1h 43m 48s 759ms
10I✔️ 25m 41s 852ms
II8h 50m 38s 955ms
III❎ 3d 05h 01m 07s 738ms
11I✔️ 27m 27s 719ms
II✔️ 38m 23s 615ms
III11h 12m 05s 955ms
12I✔️ 20m 51s 077ms
II✔️ 30m 47s 006ms
III9h 47m 24s 856ms
13I✔️ 19m 19s 207ms
II✔️ 34m 59s 623ms
III✔️ 55m 49s 017ms
14I✔️ 17m 12s 045ms
II✔️ 19m 23s 352ms
III1h 41m 08s 303ms
15I✔️ 39m 54s 585ms
II3h 34m 49s 830ms
III❎ –
16I✔️ 6m 59s 911ms
II✔️ 55m 52s 154ms
III2h 15m 29s 888ms
17I✔️ 16m 28s 064ms
II✔️ 32m 15s 080ms
III❎-
18I✔️ 35m 45s 878ms
II✔️ 58m 08s 269ms
III8h 26m 20s 369ms
19I✔️ 51m 40s 365ms
II1h 01m 05s 460ms
III8h 45m 22s 518ms
20I✔️ 11m 33s 080ms
II✔️ 56m 01s 591ms
III❎ –

#ThisWeeksFiddler, 20251121

This week the #puzzle is: A Loopy Holiday Gift Exchange #probabilities #coding #montecarlo #combinatorics

You are participating in a holiday gift exchange with your classmates. You each write down your own name on a slip of paper and fold it up. Then, all the students place their names into a single hat. Next, students pull a random name from the hat, one at a time. If at any point someone pulls their own name from the hat, the whole class starts over, with everyone returning the names to the hat.
Once the whole process is complete, each student purchases a gift for the classmate whose name they pulled. Gifts are handed out at a big holiday party at the end of the year.
At this party, you observe that there are “loops” of gift-giving within the class. For example, student A might have gotten a gift for B, who got a gift for C, who got a gift for D, who got a gift for A. In this case, A, B, C and D would form a loop of length four. Another way to have a loop of length four is if student A got a gift for C, who got a gift for B, who got a gift for D, who got a gift for A. And of course, there are other ways.
If there are a total of five students in the class, how likely is it that they form a single loop that includes the entire class?

And for extra credit:

If there are N students in the class, where N is some large number, how likely is it that they form a single loop that includes the entire class, in terms of N? (For full credit, your answer should be proportional to N raised to some negative power.)

A Loopy Holiday Gift Exchange

Intermission

Oh, look at that, we have a repeat.

Highlight to reveal (possibly incorrect) solution:

Program

A monte carlo program roughly confirms this number.

And for extra credit:

Desmos

Everybody Codes, The Song of Ducks and Dragons [ 2025 ], quest 11, part 3

I am doing the #EverybodyCodes quests this November. ( #coding #puzzle ) Today I’d like to talk about quest 11, part 3. Spoilers.

Everybody Codes, quest 11

This next bit will make much more sense if you are actually familiar with part 3. If you haven’t solved it yourself, you might want to look at this description .

Quest 11, part 3 has been described this way:

  • “Key insight 2 is that each round in a phase effectively only moves one duck from one column to another. Key insight 3 is that in phase 2, when a column get the number of ducks each column ends with, it will never get more/less (it won’t fluctuate). In other words, the number of ducks per column in phase 2 is either monotonically increasing or monotonically decreasing.” Source
  • “If you know that it is sorted, and effectively, every turn one duck moves from the “large” half to the low half, then how many ducks have to be moved to have exactly equal columns in the end?” Source
  • “Phase 2 brings the columns to equilibrium using a left to right flood of deficits. If the left column is smaller than the right, then a single duck moves to the left. When applied across the full range of columns in a single round, the smallest column (which must be on the left) gains a duck and the largest column (which must be on the right) loses a duck. The only way it’s not possible for a duck to move is if the columns are at equilibrium.” Source

Maybe I am dumb and just don’t see, that b actually follows from a.

Maybe I needed more than intuition and “when I used this method, I got the correct result”.

Anyway. I have tried writing a proof.


We have some columns of ducks.

a b c d e f g

a <= b <= c etc.

The average of a-g is x
We can insert |, so that e.g. c <= x < d

a b c | d e f g

WHAT HAPPENS BEFORE |?

Choose the first among a-c (they are left of |), so that the chosen one is strictly smaller than the one to its right.
Call this candidate m.

So we might have

a b c | d … (a < b)
b b c | d … (a = b < c)
c c c | d … (a = b = c < d)

Notice that it is always possible to choose m.

We might have

m b c | d …

In that case the next step is

m+1 b-1 c | d …

As b <= c, it follows that b-1 < c, and the next step is

m+1 b c-1 | d …

This goes on until we reach c and d.

m+1 b c | d-1 …

IMPORTANT: m grows 1, d-g shrinks 1.
IMPORTANT: the list is still sorted. See below what happens when c = d.

We might also have

m m c | d …

In the first round we get 1 or more steps bringing us to this

m m+1 c | d-1 …

In the next round this becomes

m+1 m+1 c | …

IMPORTANT: each m grows 1, d-g shrinks accordingly.
IMPORTANT: given z m’s, each m grows 1, d-g shrinks z.
IMPORTANT: the list is still sorted after each round.

WHAT HAPPENS AFTER |?

Choose the last among d-g, so that the chosen one is strictly larger than the one to its left.
Call this candidate n.

So we might have

… c | d e f g (f < g)
… c | d e f f (e < f = g)
… c | d e e e (d < e = f = g)
… c | d d d d (c < d = e = f = g)

Notice that it is always possible to choose n.

We might have a step, right after d shrinking.

… | d-1 e f n

In that case we go through these steps.

… | d e-1 f n
… | d e f-1 n
… | d e f n-1

IMPORTANT: d goes back to d, n shrinks 1

We might have

… | d-1 e n n

In that case we go through these rounds

… | d e n n-1
… | d e n-1 n-1

IMPORTANT: d goes back to d, each n shrinks 1.
IMPORTANT: given y n’s, each n shrinks 1, a-c grows y.
IMPORTANT: the list is still sorted after y rounds.

We might have

… | n-1 n n n

In that case we end up here after a round

… | n-1 n-1 n-1 n-1

IMPORTANT: d goes to d-1 = n-1, each n shrinks 1. See below what happens when c = d. Otherwise we keep the property that c < d.
IMPORTANT: given y n’s, each n shrinks 1, a-c grows y.
IMPORTANT: the list is still sorted after y rounds.

To sum up:

We begin with a sorted list.
A duck crosses the | in each round.
The list before | will stay sorted.
The list after | will stay sorted or go back to being sorted after a finite number of steps.

We are headed to a situation looking like

m m m | n n n n

or something similar.

This process ends when m = n = x.
1 round before the end we had something like

m-1 m m | n+1 n n n

All the way through the process, c < d. (Ending with m < n+1.)


Maybe all of this is easier to understand watching an example.

#ThisWeeksFiddler, 20251114

This week the #puzzle is: Can You Irrigate the Garden? #probabilities #geometry #trigonometry #average #integration

You and your assistant are planning to irrigate a vast circular garden, which has a radius of 1 furlong. However, your assistant is somewhat lackadaisical when it comes to gardening. Their plan is to pick two random points on the circumference of the garden and run a hose straight between them.
You’re concerned that different parts of your garden—especially your prized peach tree at the very center—will be too far from the hose to be properly irrigated.
On average, how far can you expect the center of the garden to be from the nearest part of the hose?

And for extra credit:

As before, your assistant intends to pick two random points along the circumference of the garden and run a hose straight between them.
This time, you’ve decided to contribute to the madness yourself by picking a random point inside the garden to plant a second peach tree. On average, how far can you expect this point to be from the nearest part of the hose?

Can You Irrigate the Garden?

Highlight to reveal (possibly incorrect) solution:

Program Desmos

And for extra credit:

Desmos

#ThisWeeksFiddler, 20251107

This week the #puzzle is: The Randy Hall Problem #probabilities #MontyHall

You are a producer on a game show hosted by Randy “Random” Hall (no relation to Monty Hall). The show has three doors labeled 1 through 3 from left to right, and behind them are various prizes.
Contestants pick one of the three doors at which to start, and then they press an electronic button many, many times in rapid succession. Each time they press the button, they either stay at their current door or move to an adjacent door. If they’re at door 2 and move to an adjacent door, that new door will be 1 or 3 with equal probability.
Randy has decided that when a contestant presses the button while at door 2, there should be a 20 percent chance they remain at door 2.
As the producer, you want the chances of a contestant ultimately winding up at each of the three doors to be nearly equal after many button presses. Otherwise, mathematicians will no doubt write you nasty letters complaining about how your show is rigged.
If a contestant presses the button while at door 1 (or door 3), what should the probability be that they remain at that door?

And for extra credit:

Randy has an updated suggestion for how the button should behave at door 2. What hasn’t changed is that if a contestant at door 2 and moves to an adjacent door, that new door will be 1 or 3 with equal probability.
But this time, on the first, third, fifth, and other odd button presses that happen to be at door 2, there’s a 20 percent the contestant remains at door 2. On the second, fourth, sixth, and other even button presses that happen to be at door 2, there’s a 50 percent chance the contest remains at door 2.
Meanwhile, the button’s behavior at doors 1 and 3 should in no way depend on the number of times the button has been pressed.
As the producer, you want the chances of winding up at each of the three doors—after a large even number of button presses— to be nearly equal.
If a contestant presses the button while at door 1 (or door 3), what should the probability be that they remain at that door?

The Randy Hall Problem

Highlight to reveal (possibly incorrect) solution:

And for extra credit:

Notes, 372 Pages, Bob Honey Who Just Do Stuff (book 6)

I am listening to the podcast 372 Pages We’ll Never Get Back. In episode 35-38 they discuss Bob Honey Who Just Do Stuff.

372 Pages We’ll Never Get Back

Real or fanfic

The spreadsheet ! A very good performance.

Summary of important advice

Consistency, continuity.

  • The character Honey doesn’t coalesce.
  • Pop granny dreams of Cuban bar boys.
  • Calling it indescribable and then describing it.

Originality.

  • Wake up, sheeple.
  • Intelligence.

Realism. Being human.

  • Honey is dumb? Caultier is dumb?
  • The best at selling ice cream, fireworks etc.
  • Jew speak.
  • It is just very hard to relate to relate to Honey. He’s crazy?

Variety.

  • Repetition of words.

Details: not too many, not too few.

  • Something a little like plot is interrupted by a new info dump.
  • Simply Georgia, 1658???
  • Introducing a word + a footnote, instead of writing a simpler sentence.

POV. Tone.

  • Revolting descriptions.
  • Footnotes for reasons.
  • Satire like delilo or Pynchon. Magic realism?
  • The narrator hates the reader.
  • And perhaps… It could be said…

Use words and phrases correctly.

  • Alliteration, but not good. And it’s a lot. And a cliché.
  • Stringing random words together.
  • Some sentences are hard or impossible to understand. Some words are used wrong.
  • Too many commas.
  • Footnote using insensitivity wrong.
  • Derma, used incorrectly.

Being funny.

  • Is it? Woodshop teachers.
  • Mr. Woodcock.

Other stuff.

  • Aspiring to be a lot. Right? Done artlessly and cynically. No charm.

Ep. 35, prelude + st. 1-5

Don’t do this

  • Words. Alliteration, but not good. And it’s a lot. And a cliché.
  • Aspiring to be a lot. Right? Done artlessly and cynically. No charm.
  • Funny. Is it? Woodshop teachers.
  • Words. Stringing random words together.
  • Variety. Repetition of words.
  • Words. Some sentences are hard or impossible to understand. Some words are used wrong.
  • Tone. Revolting descriptions.
  • Words. Too many commas.
  • Tone. Footnotes for reasons.
  • Cliché. Wake up, sheeple.
  • Details. Something a little like plot is interrupted by a new info dump.
  • Tone. Satire like delilo or Pynchon. Magic realism?
  • Funny. Mr. Woodcock.
  • POV. The narrator hates the reader.

Running gags

  • Settle down.

Oops.

  • Chowcer? A miller’s tale.
  • One of the hard to understand sentences are explained later.

Real or fanfic, 1:08:49

  • Mike is just always guessing.
  • Real ❎ Fanfic ❎ Real ❎ Fanfic ✔️ Fanfic ✔️

Ep. 36, st. 6-9

Don’t do this

  • Originality. Intelligence.
  • Consistency. The character Honey doesn’t coalesce.
  • Realism. Honey is dumb? Caultier is dumb?
  • Words. Footnote using insensitivity wrong.
  • Consistency. Pop granny dreams of Cuban bar boys.
  • POV. And perhaps… It could be said…
  • Realism. The best at selling ice cream, fireworks etc.
  • Racism. Jew speak.

Running gags

  • Pappy.

Real or fanfic, 50:25

  • Real ✔️ Fanfic ✔️ Fanfic ✔️ Real ✔️ Fanfic ✔️

Ep. 37, from st. 10 to about 7 pages into st. 13, including poem, last line: egg on his face.

Don’t do this

  • Words. Derma, used incorrectly.
  • Details. Simply Georgia, 1658???
  • Realism. It is just very hard to relate to relate to Honey. He’s crazy?
  • Details. Introducing a word + a footnote, instead of writing a simpler sentence.

Running gags

  • Settle down. Probably used in every episode from now on.

Oops.

  • Mike read too much!

Real or fanfic, 51:29

  • Real (no guessing) Fanfic ✔️ Real ✔️ Real ✔️ (used before?) Fanfic ✔️

Ranking

  • Eye of Argon, 10/10
  • 64 squares, 10/10
  • Ready Player 1, 8/10
  • Armada, 6/10
  • Tekwar, 5/10 (slipped below Cline)
  • Bob Honey, 0/10

Ep. 38, from st. 13 (the rest) to end

Don’t do this

  • Consistency. Calling it indescribable and then describing it.

Running gags

  • Several long minutes.
  • Indescribable color.

Oops.

  • Ca-moo.

#ThisWeeksFiddler, 20251031

This week the #puzzle is: How Much Does Game 1 Matter? #probabilities #combinatorics #PascalsTriangle #animation

You and your opponent are beginning a best-of-seven series, meaning the first team to win four games wins the series. Both teams are evenly matched, meaning each team has a 50 percent chance of winning each game, independent of the outcomes of previous games.
As the team manager, you are trying to motivate your team as to the criticality of the first game in the series (i.e., “Game 1”). You’d specifically like to educate them regarding the “probability swing” coming out of Game 1—that is, the probability of winning the series if they win Game 1 minus the probability of winning the series if they lose Game 1. (For example, the probability swing for a winner-take-all Game 7 is 100 percent.)
What is the probability swing for Game 1?

And for extra credit:

Instead of a best-of-seven series, now suppose the series is much, much longer. In particular, the first team to win N games wins the series, so technically this is a best-of-(2N−1) series, where N is some very, very large number.
In the limit of large N, what is the probability swing for Game 1 in terms of N? (For full credit, I’m expecting an answer that is rather concise!)

How Much Does Game 1 Matter?

Intermission


This is blog post no. 1002! I forgot to celebrate at no. 1000!
🇩🇰🇩🇰🇩🇰🇩🇰🇩🇰🇩🇰🇩🇰🇩🇰🇩🇰🇩🇰🇩🇰🇩🇰🇩🇰🇩🇰


Highlight to reveal (possibly incorrect) solution:

Program PDF

Just for funzies, I created a video!

And for extra credit:

Desmos

#ThisWeeksFiddler, 20251024

This week the #puzzle is: Will the Odds Be Ever in Your Favor? #odds

With the regular season over, there are two clear favorites for baseball’s American League Most Valuable Player (MVP) award according to ESPN:
– Aaron Judge of the New York Yankees, whose odds are -150.
– Cal Raleigh of the Seattle Mariners, whose odds are +110.
The “-150” odds mean that for every $150 you bet on Judge to win MVP, you’ll earn $100 if he actually wins. The “+110” odds mean that for every $100 you bet on Raleigh to win MVP, you’ll win $110 if he actually wins. Note the differing results (winning $100 vs. betting $100) that comes with the odds being negative vs. positive.
While these betting lines may be informed by an assessment of Judge’s and Raleigh’s real chances, they may also be informed by how much money people are betting on each player.
Suppose all bettors have wagered on either Judge or Raleigh with the odds above. Some fraction f of dollars wagered have been in favor of Judge, while 1−f has been wagered on Raleigh. For what fraction f will the oddsmaker earn the same amount of money, regardless of which player earns the MVP award?

And for extra credit:

Suppose there are two leading candidates, A and B, for MVP in the Fiddler Baseball League. There are two parts to this Extra Credit, so please read carefully!
Part 1:
The odds for A winning the award have been set to +100x, where x > 1.
Let f represent the fraction of dollars wagered in favor of A. For many values of f, the oddsmaker can set the odds for B so that they’ll make the same amount of money regardless of whether A or B wins the award. However, below a certain value of f, it’s impossible for the oddsmaker to do this.
What is this critical value of f? (Your answer should be in terms of x.)
Part 2:
Now, the odds for A winning the award have been set to -100y, where y >1. Again, for many values of f, the oddsmaker can set the odds for B so they’ll make the same amount whether A or B wins the award.
What is the critical value of f below which this isn’t possible? (Your answer should be in terms of y.)

Will the Odds Be Ever in Your Favor?

Intermission

So, I didn’t get the extra credit point last week. I am still not quite sure what I should have done. (Apart from knowing more about geometry and trigonometry.) I think my methods must have contained some kernel of correctness, but I can’t figure out how to reach the actual correct value. Sigh. Any help appreciated.

Highlight to reveal (possibly incorrect) solution:

Spreadsheet

And for extra credit:

Desmos