A new approach to Bible Atlas Goose Thigh?

As a math lover and an amateur magician (owing in part to Martin Gardner's excellent writings), I can't help but ask a question about a classic mathematical card trick. This question could be answered easily with the aid of a computer, I imagine.

The trick is known under numerous names, including Mutus Nomen Dedit Cocus. The gist is that a spectator secretly selects one of ten pairs of cards, and the magician deals them, seemingly randomly, into four rows of five cards apiece, and asks the spectator which row or rows contain the cards. In actuality, the magician is dealing the cards in such a way that each pair of cards corresponds to a different pair of rows. Using a mnemonic such as MUTUS NOMEN DEDIT COCUS or BIBLE ATLAS GOOSE THIGH, the cards can be readily identified. For example, using BIBLE ATLAS GOOSE THIGH as our mnemonic, if the cards are in the first and second rows, they correspond to the pair of L's shared by BIBLE and ATLAS, meaning the fourth card in the first row and the third card in the second row are the answer.

There is also a trick called Rubik's Cards or Order from Chaos where cards in seemingly random order are put in order via an unusual series of moves which at first glance appear to be mixing them up even further. The question is whether instead of dealing the cards out in a seemingly random order, one can appear to thoroughly mix up the cards before dealing them out. Of course, remembering a five-word mnemonic and a series of shuffles might be harder than just memorizing the words and dealing the cards accordingly, but it might make the trick more of a fooler. As an added bonus, there are certain arrangements (such as AABCD BEEFG CFHHI DGIJJ) that would be unsuited for the "deal them randomly" presentation of the trick, because the pattern of the dealing would be obvious, but by appearing to mix the cards up, such arrangements can be employed.

The cards start in the order AABBCCDDEEFFGGHHIIJJ, and our goal is to get them in an order that is equivalent to one of the numerous mnemonics, such as MUTUS NOMEN DEDIT COCUS or BIBLE ATLAS GOOSE THIGH, via a simple-to-remember series of controlled shuffles. If a computer is given a database of several such shuffles, it can work out the simplest way to use them to get from our starting point to our ending point. It is worth noting first that there are not actually 20! permutations of
the 20 cards, since we're dealing with 10 pairs of cards. Naively, one
might divide 20! by 2^10=1024 to calculate the number of permutations.
However, it is even fewer than that; we only care about which cards are
paired with which other cards. AABBCDDC is the same as CCAADBBD.
Therefore, there are a mere 19*17*15*13*11*9*7*5*3*1=1,382,205,825
permutations in the search space. A Rubik's Cube has 43,252,003,274,489,856,000 positions, and God's Algorithm has been calculated for that, so I doubt that this particular problem will be much harder computationally.

Here are the controlled shuffles employed in Rubik's Cards:

The n Frustration Count: The top n cards are reversed and put below the rest of the deck. A 2 Frustration Count (2FC) on ABCDEFGHIJKLM yields CDEFGHIJKLMBA.

The n,m Block Count: Cards are dealt to the table in blocks of n and m, reversing the order of the blocks, but not the cards within the blocks. A 3,2 Block Count (3,2BC) on ABCDEFGHIJKLM yields KLMIJFGHDEABC.

The Reverse Faro Shuffle: Cards are alternately injogged and outjogged so the cards in even-numbered positions stick out, and then are put either below (for a Reverse Out Shuffle) or on top of (for a Reverse In Shuffle) the cards in odd-numbered positions. A Reverse In Shuffle (RIS) on ABCDEFGHIJKLM yields BDFHJLACEGIKM.

The Australian Shuffle: The cards are alternately dealt "down" to the table and "under" the rest of the pack. ABCDEFGHIJKLM becomes JFBLHDMKIGECA.

In Rubik's Cards, the cards start in the order LKBFAEMJIDCGH, and become ordered as follows:

The cards don't appear to be in any particular order until the final step. Of course, the person who created this trick probably just took some random-looking, but easily remembered, moves and reversed them to get the starting configuration. In this problem, we're given a starting configuration and an ending configuration, and wish to find the shortest route. It's trivial to prove that any configuration can be reached via 1FC's and 2FC's (although such a solution is potentially extremely long, not to mention that 1FC's seem inelegant to me), but by adding more controlled shuffles to the database and taking advantage of the fact that we have a choice of many ending positions (the words BIBLE ATLAS GOOSE THIGH can be placed in 24 different orders, they can be dealt from a deck of BAGTITOHBLOILASGESEH or from a deck of BIBLEATLASGOOSETHIGH), surely a reasonably memorable solution can be found. We only have under 1.4 billion positions to navigate, after all!

(Addendum: A proposed generalization of the Australian shuffle is the n Australian Shuffle, where there are n unders after each down. Thus, the AS becomes the 1AS, a 0AS reverses the order of the deck, and a 3AS turns ABCDEF into BDFCEA.)

Support me on Patreon!!!!

If you enjoy my weekly word puzzles, please consider supporting me monthly on Patreon. Just a dollar a month is all it takes to support your favorite fuzzy puzzlemaster. Higher pledges get you perks such as sneak peeks at this blog's puzzles, exclusive puzzles just for patrons, and opportunities to suggest seed words. Thank you!

Who's the author?

Grant Fikes has been writing logic puzzles in an amateur capacity since 2005, and in a professional capacity since 2013. He serves as one of the most prolific contributors to the blog on Grandmaster Puzzles; his works have also appeared in Akil Oyunlari, in Sudoku Xtra, the United States Puzzle Competition (2012-2014), and in a smartphone app. Grant has also created Kakuro puzzles for Kakuro Conquest (the puzzles haven't appeared yet, for whatever reason). As a budding word puzzle constructor, Grant's puzzles have appeared in the short-lived Will Shortz's Wordplay, in GAMES World of Puzzles, and in the smartphone app Bonza, and his creation Pent Words has won an award from Kadon Enterprises; as an occasional board gamer, his game Battle of LITS has been published by nestorgames and Lyris Laser Studios and is playable on BoardGameArena. On the Internet, Grant has adopted the persona of a purple and cyan fox/badger hybrid.

PLEASE DO:* commission me! I make good puzzles!* become my patron on Patreon! You'll get early access to my word puzzles!* print these puzzles out to solve them on paper* copy and paste these puzzles into your preferred image editor, and solve them there* e-mail me (glmathgrant@gmail.com; I can nudge you towards a solution if you're stuck, or interact with you in other ways)* post non-spoiler comments directly on the blog (i.e., "I like what you did with the 3's", "The logic in the upper left corner was astounding")* share these puzzles with friends and link to this blog

PLEASE DON'T:* spoil the solution in the comments section for all others to see* post completely irrelevant comments (including comments consisting completely of punctuation)* claim these puzzles as your own* make money off of these puzzles without my permission

What's that font?

Since Wordy Wednesday 72, all puzzles on this blog use the royalty-free Tinos font. Hooray for free stuff!

Who made those images?

The purple and cyan mascot on this page is my fox/badger fursona Grant Badger Fox. The blog's banner was made by PunkJax, the image of Grant holding a tip jar was made by Marquis2007, and the "Certified Puzzlemaster" badge was made by Mary Mouse.