David Abel

Recent Posts

State Abstractions...

NIPS 2017

A Silly Game: Word...

Simple RL

The Relevance of C...

( See All )

A Silly Game: Word Shift


Consider the following simple game: For any word, let a shift denote moving the last character of the word to the beginning of the word (so the remaining characters are moved down one slot). For instance, one shift of the word "table" results in "etabl", and after another shift becomes "letab". Note that for a length n word, we shift n times before returning to the original word.

The question of the game is simple: for some established dictionary of the English language, what are the longest words such that for each of n shifts of each word, every shifted word is also in the dictionary? For instance, any single letter word such as "a" satisfies the criteria. So does "no", because "on" is also a legitimate word, while "yes" does not satisfy the criteria, since neither "sye" or "esy" are in most dictionaries.

For simplicity, I chose the dictionary that comes with Unix, located in /usr/share/dict/words. My code for solving the game is here. Before taking a look -- any guesses on the longest word?

My personal favorite of the satisficing word groups is "tea", which shifts to "eat" and "ate", all three of which are highly likely to be in any legitimate english dictionary. The true winner for the Unix dictionary was surprisingly length four: "nana" and "dada", as apparently both "anan" and "adad" are words. Others of note are {"are", "ear", "rea"}, and {"oak", "koa", "ako"}, though I haven't heard "rea" or "ako" used very often. Apparently "ako" is: "a liquid measure used in Hungary, equal to about 18.5 gallons."