Tuesday, February 22, 2011

Numberplay: The Musical Shuffle

If you have just three buttons on your music player, how can you select a specific song for your valentine in the fewest number of steps? (See text for details.)Gary Antonick If you have just three buttons on your music player, how can you select a specific song for your valentine in the fewest number of steps? (See text for details.)Numberplay Logo: NUM + BER = PLAY

Today is Valentine’s Day, a day when you want to set the romantic mood by choosing the perfect music. To inspire us, last night was one of the music world’s biggest nights: the Grammy Awards. All you have to do now is to pick the right songs – today’s digital musical players and smartphones make it a snap to select them from your playlist to suit every mood. But what if you were stuck with a player that (thanks to Apple’s marketing genius) makes a virtue of randomness, like the iPod shuffle? This is the conundrum that gives rise to a fascinating puzzle contributed by Dion Wong of Australia. Previously, in When Randomness Produces Certainty, we saw how randomness acting over and over can create order. The question that arises in Dion’s puzzle is: How can we optimally combine randomness and order? It’s a fitting question for today because, no matter how orderly a plan you might have made for a perfect Valentine’s Day, randomness might just intervene. And the connection of randomness to the Grammy Awards ceremony is clear too – what random pattern of clothes (or what passes for them) did Lady Gaga wear? That might take us too far afield, so without further ado, here’s the puzzle.

1. You have a playlist of 11 songs on the iPod connected to your stereo. Each song in the playlist is clearly numbered, but there are just three buttons. The “+” button takes you to the next song in ascending order, looping back to song No. 1 after the highest numbered song. The “-” button takes you through the songs in descending order, looping back to the highest numbered song after song No. 1. The “shuffle” button randomly selects a song on the playlist other than the one that was just playing.

Suppose song No. 1 is currently playing. Your date has an irresistible urge to listen to song No. 6 next. What strategy will select the right song in the smallest number of button presses, on average?

2. Now let’s try the above problem for a longer playlist, of 101 songs. What’s the least number of button presses on average, to get from song No. 1 to song No. 51?

3. Suppose you were on song No. 1, and wanted to play songs 21, 41, 61 and 81 in any order. What’s the least number of button presses on average, required to do this?

For our word puzzle today, let’s introduce the shuffle move into the classical game of word ladders, converting it into something like “word spiral staircases” or “word double helixes.” Our new shuffle move allows you to change a single letter and rearrange all the letters in a single step. For example, to go from ROCK to SOUL using a classical word ladder you might have to go ROCK->ROOK->TOOK->TOOL->TOIL->SOIL->SOUL (six steps). But with the shuffle step, you can do it in three: ROCK ->ROCS ->SOUR->SOUL. The step from ROCS to SOUR changes the “C” to a “U” and rearranges the letters at the same time. This neatly takes care of the problem of inaccessible or “dead end” words that we highlighted in Living to Eat or Eating to Live. The new rule makes the game accessible to a host of oddly spelled words.

Try changing PIANO to MUSIC and GRAMMY to OSCARS with the shuffle step allowed. These words would be pretty inaccessible using classical word ladders. It’s nice to bring them back into the one-step-at-a-time word ladder fold.

And while we are tinkering with the rules, let’s add another one that will enable us to build ladders between words of different lengths. This rule allows you to add or subtract a letter from a word without rearranging. Thus, you can change COUNTRY to COUNTY, and POP to PROP in single steps. Using this rule and the shuffle step above, go from COUNTRY to POP.

Here’s wishing everyone a very happy Valentine’s Day. Let’s hope you make some sweet music. Your Valentine’s Day stories showing the interplay of order and randomness (for better or worse) are welcome.

No comments:

Post a Comment