Sunday's New York Times crossword puzzle needed lots of new coding to come into being--and to be solved by its online fans. Matt Ginsburg's explanation of how he devised the puzzle is fascinating, as is the reader commentary about not being able to solve the puzzle online because of its special theme answers which were arranged in mini-grids within grids:
Having had the idea, execution was a bit harder because it was difficult to find the theme entries. Two (hopefully fairly long) words that agree except for two letters, and for which the associated “phrase” makes sense. And to make it harder, you have to be able to switch the letters and get two other words that work as well. I eventually wrote a program that evaluated all combinations of four letters to predict how many possible “phrases” there might be for each, and looked at the combinations that seemed the most promising. Lots of the best letter combinations were like the ST-TH in faster father/stefan thefan, where the middle letter is duplicated so you have ST-TH in both word pairs. I thought that things like RS-NT (which turns into RN-ST in the other direction) were much more elegant, but I just couldn’t find enough of them that worked. Hopefully none of the selections I eventually made seem too forced! Jim, sorry I keep making you write special code. Hopefully you enjoyed solving the puzzle, at least!