I thought of this problem when playing Sudoku. Let A = {1,2,3,4}
. I have to make a 4x4 box (i.e. the size of A in both dimensions) and fill it with data such that no dimension has repetition. How many solutions I can make such that repetition in all the 4 vertical, 4 horizontal, and 2 diagonal directions is 0?
Example solution without repeated data:
1 3 4 2
2 4 3 1
3 1 2 4
4 2 1 3
Example solution with repeated data:
1 2 3 4
2 1 4 3
3 4 1 2
4 3 2 1
Although the data are distinct in the horizontal and vertical directions, they repeat along the diagonals.
For n=1 there is a single possible solution. For n=2 and n=3 there are no possible solutions for 0 repetition. How many solutions are possible for n=4?