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.)

Grant's Review Corner: Volume 11

From the same guy who brought you Dinner With Moriarty, the murder mystery where the murderer kills himself approximately 17.7% of the time, we get this computer game from 2011. Is the author of this game any better at writing stories since 1997? Juubi and I will find out together!

The incredible thing is that this guy's company Everett Kaser Software sells a CD with 32 games on it! At least he has the sense to sell it for a mere $99.95, as opposed to Action 52's price tag of $199. If the other 30 games are the same quality as these two games, then. . . well, you can immediately surmise whether to buy it or not.

ERRATUM: Dansk is actually Danish, not Dutch. I got the first letter right, at least.

Grant's Review Corner: Volume 10

For the tenth edition of Grant's Review Corner, this one's a video instead of a bunch of text! This review tackles a game that's haunted me since the early 2000's; I've felt it necessary to finally get my opinions on this game out of the way for all to see.

Perhaps I'll review more of this company's games in the future, but for now, I think my opinion on this one summarizes my opinion on virtually all of the games.

Puzzle 614: Process of Illumination 41

I'm trying to train my mother in the fine art of solving Process of Illumination puzzles; thus far, she's having some trouble with it, but desires more training to get stronger. I have a huge pool to pull from. . . .

Puzzle 613: Dominnocuous 8

My mother got a much-needed laugh out of my latest Grant's Review Corner, in which I recount our shared experience with a crossword edited by Timothy Parker for a "for Dummies" book. Also, with my gentle guidance, she solved her first Dominnocuous, which was also my blog's first Dominnocuous! Moms rock sometimes. :)

Grant's Review Corner: Volume 9

First, an update on the previous edition of Grant's Review Corner: the puzzles I was paid to write for Kakuro Conquest have not appeared yet in almost two years. However, I have signs of life from the other end, and have decided not to post the puzzles here, and instead to wait for them to appear on Kakuro Conquest for my readers to enjoy there. (Maybe I'll post them on here if said readers want to print them out.)

My mother, a breast cancer survivor, has experienced a phenomenon called "chemo brain" where one suddenly loses a great portion of one's mental faculties after chemotherapy. While she has been intending to get her brain active again using books like this one, it seems that her hectic schedule makes this impossible without my active involvement in encouraging her and finding puzzles she can actually do. I can't really gripe about finding this excuse to spend quality time with her; I enjoy watching light bulbs go off in people's heads from time to time, and some of the simpler puzzle types in this book have provided such experiences. Maybe I'll get a finger on how to write puzzles that she can enjoy and other people can enjoy, too (which will become easier if somehow I can train her to solve harder puzzles, such as easy Sudoku puzzles). However, my mother recently got herself a different book which, after working one puzzle together, I've felt the need to vent about. Hey, blog content!

Puzzle 612: Totally Awesum 23

A while back, I was commissioned to write puzzles for Kakuro Conquest, thanks to my impressive haggling skills and talking the other person up from "hey, promote this site". I even promoted them in a volume of Grant's Review Corner, praising their solving interface for its simplicity. As much as I would love to see my puzzles playable in said interface, so far this hasn't happened. In a couple of weeks, if Kakuro Conquest shows no sign of life (including replying to the message I sent via their contact form), I will release the puzzles on this blog so they don't go to waste (and so this blog has something happening on it). The puzzle below is not one of those puzzles, but I do believe it's representative of the quality you can expect.

Edit: I have now reached out to Perfomant Design via Kakuro Conquest's contact form, the e-mail address on their site, and their Twitter account, in the best good faith effort which I can muster to give them a chance to stop me from using these puzzles without their permission. I also reached out to Kareem Ahmed, who contacted me on behalf on Performant in 2011 back when he worked closely with them, and paid me to write the puzzles in the first place. If I am getting myself into hot water, I have at the very least done everything I can think of to test the temperature safely.

Grant's Review Corner: Volume 8

First, an update on the previous edition of Grant's Review Corner: the puzzles I was paid to write for Kakuro Conquest have not appeared yet in almost two years. If I don't get any signs of life from the site's operators soon, expect these puzzles to be released slowly on this blog. Some of these puzzles I've written are, in my not-so-humble opinion, very good illustrations of what an artisan can do with handmade Kakuro puzzles, and absolutely need to be seen.

As longtime fans already know, updates on this blog have been more sparse due to the fact that I'd rather focus my efforts on writing puzzles for Grandmaster Puzzles and getting paid for it. However, I got an e-mail recently from someone who wants me to review their upcoming smartphone app in exchange for promoting my blog. I have to admit that this is sorely tempting, given that not only have I broadened the focus of this blog's posts to allow for said blog not to be completely dead, but if I rearrange the sidebar, I could promote Grandmaster Puzzles very heavily and direct incoming traffic there (or better yet, make arrangements with the app's publisher to promote Grandmaster Puzzles directly). Ultimately, I feel that I must entertain these kinds of offers very sparingly, as I do not want to become a forum for people to bribe me into publicizing them (they can do that on JayIsGames or something), but somehow, I don't feel like I can dismiss this one right off the bat.

Magic FreeCell

Here's an optimization puzzle. I was tempted to make a contest out of it, like the optimization contests Games Magazine has had in the past, but eh, I just want new blog content, and making a contest would require thought about what to actually give away.

Almost everyone is familiar with FreeCell. It is a solitaire card game in which a standard deck of cards is dealt into 8 columns (four of which have 7 cards, and four of which have 6 cards). Here's a layout:
(If this deal doesn't look very random to you, that's because it's not; I got the deal from this video. Note that there is no "What the hell?" card in FreeCell, as surprising as that may be. Also, I got the card graphics from here.)

A move in FreeCell constitutes one of the following actions:
  • Moving the bottom card of any column in the tableau to one of four "cells". Each cell can hold only one card.
  • Moving the bottom card of any column, or a card in the cells, to the bottom of another column. An empty column can accept any card; otherwise, you can only place a card on top of a card of the opposite color and the next higher rank. (Ranks are, from lowest to highest, A 2 3 4 5 6 7 8 9 10 J Q K.)
  • Moving the bottom card of any column, or a card in the cells, to the foundations. An Ace can be played to the foundations at any time. Any other card can only be played if the next lowest card of the same suit has been played.
The goal in FreeCell is to move all 52 cards to the foundations.

For this optimization problem, your goal is to win the game using as few cells as possible, and then in as few moves as possible using that number of cells (so 200 moves with 0 cells is better than 100 moves with 1 cell). To make the game more challenging, and to stymie automatic FreeCell solvers as far as I am aware, I am adding one additional constraint: all four cards of a particular rank must be played to the foundations in what magicians call "chased" order (Clubs, Hearts, Spades, Diamonds). Almost any software implementation of FreeCell will automatically play the Ace and Two of Spades and Ace of Diamonds to the foundations after the first move; this is no longer allowed, as the Ace of Spades cannot be played to the foundations without the Ace of Hearts, and the Ace of Diamonds cannot be played to the foundations without the Ace of Spades.

Edit: Here's a solution I found to get the ball rolling. It uses 4 cells and 114 moves. Can you do it using fewer cells, or in fewer moves using 4 cells?

My father's medical bills. (My most serious blog post ever.)

Warning: You are about to read some depressing crap. [Now with an edit at the bottom!]

In 2011, I alluded to the tradition of getting Nikoli books for my birthday. While not also alluded to, I used to also get them every year on Christmas. However, my family is in much more dire financial straits now, to the point that I skipped the Nikoli books on Christmas and have decided that I want nothing more on my birthday than a lunch at Genghis Grill using a birthday coupon I got. The biggest cause of my mother's stress and financial difficulty is currently my father's very recent hip replacement, which has an infection and is stymieing the doctors by refusing to grow a culture so they can know which antibiotic to administer. I even heard that they're thinking of sending him to Fort Worth, which would really throw a wrench in the works. I'll have my mother help me write a much more detailed and maybe even more accurate description of what's going on, but suffice it to say that I'm desperate to help her as much as I can. I've pledged to help her around the house as much as possible on Sundays, and occasionally find it within my heart to help her on other days, but money is really, really, really important right now to pay the medical bills and the other types of bills we have. I'm sorely inclined to seek aid from the Jack Vasel Memorial Fund. I mean, I'm part of the gaming community, kind of, and my father's hip is a personal hardship for the entire family. However, it causes me such grief to beg after my efforts to raise money for the same organization less than a year ago, and really, there are at least a thousand people in the puzzle community who merit more financial aid than me, aren't there?

I am very much considering trying to sell a bunch of crap to help my family out (perhaps an auction Geeklist on BoardGameGeek?). I also plan on redoubling my Grandmaster Puzzles efforts in the hopes that maybe writing puzzles will merit more money. If you want to help out and get almost nothing in return except humble gratitude and maybe a mention on this blog alongside a custom puzzle, contact me at glmathgrant at gmail dot com. You can send me money via PayPal via that address, but for payments above $12 or so, please send the money to ginger dot fikes at gmail dot com, my mother's account, where a smaller portion will be eaten by fees.

I'm sorry if this sob story is a waste of everyone's time, but my mother seriously needs the help.

Edit: I followed through with the auction Geeklist idea, and raised over $100. I have also received generous donations from many people, and I thank you. To avoid overloading my blog with serious posts, all updates on my father's condition will be posted as comments on the auction Geeklist. There are two things I want to say publicly, though.

Number one, I used my birthday money to buy some Nikoli puzzle books for my birthday, because my mother refused to use it for her own purposes. Two out of the eleven books I got, Fresh Shikaku 3 and 4, are already retired. Shikaku puzzles are so easy. :)

Number two, I am going to maintain my wishlist on BoardGameGeek. If you want to give me one of these board games as a gift instead of donating money for my father, you now have that option. I will try to save portions of my Grandmaster Puzzles paychecks to do this, but I'm so reluctant to spend money on myself that my logic puzzle book collection would never have expanded if my mother hadn't been so obstinate that my birthday money needs to be used on myself, and my game collection is currently in the same state where nothing short of "hey Grant, here's a game" or "hey Grant, here's some money, and if you don't buy a game with it, I'll be very sad" will expand it. [Minor edit: my mother is so loath to take my money except when it's necessary that I'm less reluctant to buy my own things. Donations of all kinds are still appreciated.]

Puzzle 611: Room and Reason 41

This puzzle was written for Joe Huber (huber) of BoardGameGeek, who recently won some of my possessions in an auction and paid enough to also have a custom puzzle written for him. Having bought a lot of four copies of my board game Battle of LITS and a lot of all four Game & Watch Gallery games, I can only assume Mr. Huber has an affinity for the number 4 (and who doesn't?). The centerpiece of this puzzle is a 4x4 room with a 4.

Puzzle 610: Polyominous 55

This puzzle was written for P. Kellach Waddle (GustavMahler) of BoardGameGeek, who recently won some of my possessions in an auction and paid enough to also have a custom puzzle written for him. Given the eclectic range of his interests (including a major presence in the Austin classical music scene, whose existence I am only now aware of), a single puzzle can't really do him justice; nonetheless, I hope that seeing his initials in this puzzle somehow makes his participation in my auction a little more worthwhile. :)

Puzzle 609: Tetra Tirma 43

A shout-out to Cy Reb, Jr., who was observant enough to notice that this puzzle was contained in puzzle 608.

There are still a few days left in these auctions I'm holding on BoardGameGeek. You can support my father's medical bills by bidding, and get stuff from it. Of course, if you want less of your money to be eaten by shipping costs and more of it to be eaten by my father's hip replacement, donations are happily accepted.

Puzzle 608: Dominnocuous 7

Yesterday, I received Norinori 1 and a handful of other Nikoli books as a belated birthday present. As expected, the puzzles in Norinori 1 range from 10x10 through 20x36, and a few of them are very pretty to look at.

Puzzle 607: Tetra Firma 42

At 11:59 PM (Central) on May 26, I will hold a drawing to see who wins a copy of Battle of LITS! If you have a BoardGameGeek account, tip some GeekGold to earn some raffle entries and potentially win! The tips have reached 400 GeekGold, so here's a puzzle! Can I get 276 more in less than 11 hours? Probably not, but one can always hope.

Also check out today's Sunday Surprise on Grandmaster Puzzles for another opportunity to win Battle of LITS!

Puzzle 606: Quad-Wrangle 27

In just a few days, on May 26, I will hold a drawing to see who wins a copy of Battle of LITS! If you have a BoardGameGeek account, tip some GeekGold to earn some raffle entries and potentially win! The tips have reached 300 GeekGold, so here's a puzzle! Will they reach 400, 500, 600, or even 676 in such a short period of time? I doubt it, but you could always surprise me.

Puzzle 605: Straight and Arrow 43

In just a few days, on May 26, I will hold a drawing to see who wins a copy of Battle of LITS! If you have a BoardGameGeek account, tip some GeekGold to earn some raffle entries and potentially win!

My family's finances haven taken a sharp downturn due to my father needing surgery. For more details, see this Geeklist (the header and the comments), where you can also bid on board games and video games I am selling to raise money. I am also grateful to the individuals so far who have donated funds without expecting anything in return (including a few readers of this blog). You are amazing.

Puzzle 604: Streaming Content 39

On May 26, I will turn 26. To celebrate, I'm giving away a copy of my board game Battle of LITS! Got a BoardGameGeek account and some Geekgold? Tip this Games for Geekgold entry, and on May 26, you will have a chance at winning! Oh, and if the tips reach 676 Geekgold, my readers will be treated to the biggest LITS challenge I've ever created!
(Edit: Send me your solution to this puzzle via e-mail or Geekmail; for every correct solution received before May 26, I'll roll a 4-sided die and knock off that many Geekgold from the 676 Geekgold threshold, up to a maximum of 100 Geekgold!)

A brief manifesto.

I am affected by what is known as Asperger's syndrome. I know this not because I have diagnosed myself as having the condition like many on the Internet do, but because multiple professionals independently diagnosed me as having it, long ago when my mother was desperate for answers on how to raise me, years before I was mature enough for the gravity of the diagnosis to hit me the way it does now. Those with Asperger's have a reputation for being extremely skilled in a particular field despite otherwise being very deficient (especially regarding interacting with people), and this has perhaps blessed me in regards to my puzzle-writing abilities. Nonetheless, I sometimes wish I could trade some of the honor that my talent has brought me (including having co-written two tests on Logic Masters India with World Puzzle Champion Palmer Mebane) with a life that more closely resembles that of a normal human being, because Asperger's has made me a magnet for bullying.

Bullying upsets me so much that I could write a very whiny piece about bullying that nobody will ever actually read. Instead, I shall provide this summary: I was bullied in school. I was cyberbullied within the puzzle community. I was cyberbullied within other communities. The result was low self-esteem, suicidal thoughts, and a hardened misanthropic heart. Having experienced bullying and the awful consequences firsthand, I have decided to write out a few tenets that I deeply believe in, and which I hope that we as the logic puzzle community can embrace. Perhaps these tenets could be borrowed by a bazillion other communities, too, but the puzzle community is the one in particular I care about.

The puzzle community must be welcoming. People on The Grey Labyrinth bullying me over my Christian faith nearly cost me my life and my eventual puzzle-writing career. While I accept that maybe I wasn't a mature person then, and absolutely wasn't a skilled puzzle author, I still wish I could have been welcomed with a more constructive type of criticism. My vision for this community of ours is that newbies can be treated with a great deal of respect. Gentle guidance, not name-calling, is what will bring newbies into the fold. On that note, I must applaud Art of Problem Solving, a community whose focus is on mathematical competitions more than the logic puzzles that are the focus of this blog, for being as PG-rated as it is. My life might have been on better footing sooner had my first online puzzle community been more like AoPS than the GL.

The puzzle community must be united. I envision a haven where numerous individuals who are like-minded regarding puzzles can set aside every other difference they have and talk about puzzles. Anything that might threaten to divide us (like differences in religious or political views) should be kept very separate from the joy we derive from puzzles. Does that mean we have to keep our views bottled up completely? No, not necessarily. While it isn't advertised very much, BoardGameGeek has an entire subforum for Religion, Sex, and Politics (RSP for short), designed to allow rational discussions to occur while not letting the discussions creep into the board game discussion, which everybody expects to be pure fun. With the RSP discussion and board game discussion thus separated, the quality of both kinds of discussion is improved. Nobody who wishes to avoid the drama that politics tends to bring in has to worry so much about it sneaking into their fun. (I suppose that maybe my early stay on The Grey Labyrinth might have improved with such an idea, instead of "Off Topic" encompassing things like time-wasting Flash games and politics alike.) [Edit: I have learned that people in the RSP section of BoardGameGeek aren't any more civil and tolerant than anywhere else on the Internet. But then, having them segregated from everything else, including other off-topic discussions which are less controversial, is still probably a good idea.]

The puzzle community must be philanthropic! Every other freakin' community has some sort of philanthropic thing. Video gamers seem to have a marathon for every franchise and for every occasion. Whovians have a really geeky book. Even bronies have something! While I have met some awesome people within the My Little Pony: Friendship is Magic fandom who don't make me feel like a sinner for daring to have different tastes from theirs (shout-outs and bro-not-hooves to Corran Horn and Subido of BoardGameGeek, and to Facebook follower Adam Placencia!), my point remains that I feel the puzzle community has the potential to do better. This was what drove me to do that one thing last year, and I am determined to find a way to do the same thing, but more successfully.

I was recently alerted of the existence of American Red Crosswords, a set of crosswords written by multiple talented cruciverbalists to raise money for the American Red Cross. This is great! But what about the rest of the world? People in India whose English isn't all that fluent won't be into crosswords written by Americans designed to challenge people whose native tongue is English. However, some of those residents of India are more adept at logic puzzles than most Americans. They deserve a chance to participate in something that's both philanthropic and related to their hobbies, too. Let's give them an opportunity they'll never forget.

I close with a snippet from a reader e-mail: One of the things that makes the puzzle community meaningful to me as a *community* is the amount of generosity in it -- how many wonderful authors give away their works for the enjoyment of all, and how many top solvers give their advice to help others learn to solve better.  I think the next step in that generosity is things like your fundraising drive. Whenever I feel like ChipIn for Children's Charities was a failed experiment, words like these embolden me to find the time to experiment again. I promise that when that experiment rolls around, it's going to be awesome.

Puzzle 603: Tetra Firma 41

I failed to raise 603 GeekGold on GeekStarter. Here's a consolation prize for all five of the individuals who supported me: Barliman, n_r_a, Pawndawan, WrongWrongWrong, and zefquaavius.