#ThisWeeksFiddler, 20250411

This week the question is: Can You Grow a Hibiscus Hedge? #permutation #sequence

Dean has three colors of the hibiscus: red, orange, and yellow. He wants to plant them in a straight hedge of shrubs (each of which is one color) so that the order appears somewhat random, but not truly random. More specifically, he wants the following to be true:
– No two adjacent shrubs have the same color.
– No ordering of three consecutive shrubs appears more than once in the hedge. (But a prior ordering can appear in reverse. For example, ROYOR is an acceptable hedge, but ROYROY is not.)
What is the greatest number of shrubs Dean’s hedge can contain?

And for extra credit:

In addition to red, orange, and yellow hibiscus flowers, Dean now includes a fourth color: pink. Again, he wants to plant a straight hedge of shrubs that appears somewhat random. Here are the rules for ordering the shrubs this time:
– No two adjacent shrubs have the same color.
– No ordering of four consecutive shrubs appears more than once in the hedge. (Again, a prior ordering can appear in reverse.)
– Among any group of four consecutive shrubs, at least three distinct colors are represented.
What is the greatest number of shrubs Dean’s hedge can contain?

Intermission.

I am sort of obsessed with the candy puzzle from last week. Handled correctly, it’s possible to see, that the important graph has a structure, and that this structure can be used to find the required path. (This picture has a few connections missing, but hopefully it still demonstrates the principle.)

Oh! And I’ve just discovered that years ago a similar puzzle was featured on the riddler. Scroll down to the classic solution.

Last week I had to guess at the solution to the extra credit question. As it happens, I had the right idea: 21 students. But that wasn’t what the question actually asked for. Sigh. Read the question carefully, next time, me! Anyway. I got 21 points out of 26 possible in Q1. Actually not bad.

Highlight to reveal (possibly incorrect) solution:

Related problem. Program.

And for extra credit:

Skriv en kommentar