Wikipedia:Reference desk/Archives/Mathematics/2023 November 27

= November 27 =

No overlap cubes.
Is the following true for all N? For a clear NxNxN cube, it is possible to fill N^2 cubes so that exactly one filled cube exists in each combination of X,Y coordinates, exactly one filled cube in each combination of X,Z coordinates and exactly one filled cube in each Y,Z combination?Naraht (talk) 15:13, 27 November 2023 (UTC)


 * Suppose that the coordinates of the $$N \times N \times N$$ cubes are $$(x, y, z)$$ for $$x, y, z$$ ranging from $$0$$ to $$N - 1$$. If we consider only cubes of the form $$(x, y, (x + y) \mod N)$$, then we can see that each combination of two coordinates only happens once. For $$x, y$$ coordinates this is trivial. For $$x, z$$ coordinates we have that $$(x_{1}, (x_{1} + y_{1}) \mod N)$$ equals $$(x_{2}, (x_{2} + y_{2}) \mod N)$$ if and only if $$x_{1} = x_{2}, y_{1} = y_{2}$$, and similarly for $$y, z$$ coordinates, $$(y_{1}, (x_{1} + y_{1}) \mod N)$$ equals $$(y_{2}, (x_{2} + y_{2}) \mod N)$$ if and only if $$y_{1} = y_{2}, x_{1} = x_{2}$$. GalacticShoe (talk) 16:01, 27 November 2023 (UTC)
 * An isomorphic but symmetric solution is to take the set of vertices of the cube $$\{0,...,N{-}1\}^3$$ with coordinates $$(x,y,z)$$ such that $$x+y+z\equiv 0(\text{mod}~N).$$ --Lambiam 22:23, 27 November 2023 (UTC)
 * So basically diagonally cutting layers of filled cubes.Naraht (talk) 23:31, 27 November 2023 (UTC)


 * If I understand correctly, this is equivalent to finding a Latin square of order N. (See the "Orthogonal array representation" section.) The general problem can be stated "Can a m-hypercube with side N be filled in with Nn hypercubes (with side 1), so that for any combination of m-n coordinates, and any combination of m-n values from 1 to N, there is exactly one filled in cube in the "hyperslice" determined by setting these coordinates to the given values. For n=2, m=1 this is equivalent to finding a permutation on {1, ..., N}. For m=3, n=2 this is the Latin square problem. For m=4, n=2 this is the problem of finding Mutually orthogonal Latin squares. These problems do no always have solutions, notably the m=4, n=2 case does not have a solution for N=2 or N=6. --RDBury (talk) 22:36, 27 November 2023 (UTC)
 * Ah, so if the latin square value is also from 1..n, then setting the height off the page (z-axis) to that is equivalent to my problem. Similarly Mutually orthogonal would be height in the z-axis and in the w-axis.Naraht (talk) 23:31, 27 November 2023 (UTC)
 * For $$n=m-1,$$ the symmetric solution I gave for $$n=3$$ generalizes to
 * $$\{(x_0,...,x_{m{-}1})\mid\textstyle{\sum_i}x_i\equiv 0(\text{mod}~N)\}.$$
 * --Lambiam 08:59, 28 November 2023 (UTC)