Let $G_n$ be a $n\times n\times n$ lattice, so $G_n=$Join@@Join@@Array[{##}&,{10,10,10}]
.
Given a set of lattice points $U$, we say it 'covers' another set $V$ if for each $v\in V$, some $u\in U$ shares two of its coordinates with $v$, i.e. $\frac{u-v}{\lVert u-v\rVert}\in\{(0,0,1),(0,1,0),(1,0,0)\}$, i.e. they are on a common gridline.
So, for instance, $G_n$ is covered by one of it's slices, as depicted below. You can cover $G_4$ with a set of fewer points: consider $S=${{2,3,0},{1,0,3},{2,1,1},{3,2,3},{3,0,2},{1,2,2},{0,3,1},{0,1,0}}
. There are 8 points, and they cover $G_4$ like so:
The goal is to compute $\Xi(n)=\min_{S\subseteq G_n\text{ and }S\text{ covers }G_n}|S|$, or the smallest number of points needed to cover $G_n$.
This code randomly chooses new points until $G_n$ is covered
NestWhile[{Append[#, #3],
DeleteCases[#2,Alternatives @@ Table[ReplacePart[#3, i -> _], {i, 3}]]} & @@
Append[#, RandomChoice@#[[2]]] &, {{},
Flatten[Outer[List, #, #, #] &@Range[0, n-1], 2]},Length@#[[2]] > 0 &][[1]]
My above slice comment yields a trivial upper bound $\Xi(n)\leq n^2$. A lower bound is obtained by noting that each point in a set covering $G_n$ covers at most $3n-2$ points, hence $\lceil n^3/(3n-2)\rceil\leq\Xi(n)$.
In the case of 4, $7\leq\Xi(n)\leq8$ by my exhibited upper bound. I want to compute or improve bounds for $\Xi(10)$, as well as every value $\Xi(n<10)$. I also want to get better asymptotic bounds, and perhaps even conjecture a closed form if FindSequenceFunction
has enough to work with.
This is the same as How can I quickly find the coordinates of key points?, except that I specifically want asymptotic bounds and closed forms. Therefore I'm expecting three kinds of answers
(1) ways of searching covering sets for finding small upper bounds
(2) ways of reducing search space for finding larger lower bounds
(3) particular covering sets for arbitrary $G_n$, like the trivial Join@@Array[{##,0}&,{n,n}]
.
Using other languages like Ben Izd's previous answer is valid, but I'm going to verify and visualize everything in Mathematica.