# She Lia Squared: Our daughter asked, “How many words can it make?”

Our daughter recently conned my wife and I into purchasing interlocking foam squares for her bedroom floor. On each square is a different letter of the alphabet. To cover her entire floor we had to purchase 4 packages. After moving all her furniture to one side of the room I commenced laying out the squares. When I got to the 'K' square in the first package our daughter asked, "How many words can it make?"

With a grid measuring 8 x 13 my question would seem somewhat elementary:

Given 4 packages of interlocking foam squares, with each package containing 26 interlocking pieces, each bearing a different letter of the alphabet A-Z, and using standard word search rules, what is the optimal arrangement of letters such that it yields the maximum number of distinct words?

For reasons too ridiculous to mention one of the perimeter rows measuring 13 must contain two of the "B"'s side by side... See diagram

I thought there might be a computer I could pose the problem to?

• Are you asking for the optimal arrangement of letters such that it yields maximum number of distinct words? – justhalf Jan 24 '17 at 15:30
• Even with a computer I don't think it's feasible to answer this problem. It's a lot more complex than you would think 8*13 = 104. there are 104 * 103 * 102 * 101 ... and so on possible ways to lay down the tiles. This number is HUGE!! it doesn't account for the duplicate letters but I think those get removed by dividing by 26 * 4! but that still is huge – Ivo Beckers Jan 24 '17 at 15:39
• With only 4 of each vowel, though, you'd be lucky to use them all. – Gordon K Jan 24 '17 at 16:41
• This is unthinkable.... Even after generating the 104! possible grids which is already insane, you would have to loop all of them after. and within each of them check every cells combined with any number of other cells to form every possible words((1+2+3...+13) + (1+2+...+8) checks per cells) and then loop all those groups of possible words to check them within a loop of well over a million words from a dictionary to see if they exists. – stack reader Jan 25 '17 at 2:57
• I’m voting to close this question because open-ended puzzles are off-topic as of May 2019 – bobble Jul 20 at 17:55