2

I'm looking for an easy/fast way of generating a random (alphabetic) 26x26 Latin square "by hand". So assume your tools are something along the lines of a 30 sided letter die, and/or a bunch of Scrabble pieces.

What I thought of was to take two containers of 26 Scrabble pieces each. Randomly remove one at a time from the first container and place it in a row to create a random permutation of the alphabet. Next select a Scrabble piece from a second container. Write down your permutation on the corresponding row. Rotate the first scrabble piece to the end. Repeat previous steps until all rows are filled.

I think this method is very quick and convenient, but I know this will only generate a small subset of all possible Latin squares. Experimentally I found that for a 4x4 square this only generates 25% of all possible squares. I assume for larger squares the percentage is smaller.

Question 1: Can anyone tell me exactly how many distinct 26x26 Latin squares this method could produce?

Question 2: Can anyone think of a better method?

Chris_F
  • 175
  • What do you mean by "rotate the first scrabble piece to the end"? – Varun Vejalla Dec 20 '20 at 07:28
  • @VarunVejalla If you have the scrabble pieces arranged ABCD then move A (first piece) next to D (end piece) to make it BCDA. – Chris_F Dec 20 '20 at 07:42
  • The number of rectangles your method generates is 26! x 25!, since the first row has 26! possibilities, and there are 25! ways to choose the first entry of the subsequent rows. The total number of Latin squares is at least 26! x 25! x 24! x ... x 1!, For a better way to choose a random Latin square, see the algorithm here: https://math.stackexchange.com/a/63152 This involves choosing the entries one by one, left to right, top to bottom, backtracking when there is no valid choice. – Mike Earnest Dec 20 '20 at 16:47
  • @MikeEarnest Better in the sense that there are more possible combinations. I dare you to sit down and actually try to do it by hand with nothing but a pair of dice or scrabble pieces as tools. It will take you a significant amount of time and effort compared to my method. I'd be interested to know if there are any other methods that make speed/convenience trade off. – Chris_F Dec 20 '20 at 22:34

0 Answers0