TITLE: More precise bound for the maximin number of arrows pointing to a square when square grid is filled with arrows
QUESTION [13 upvotes]: The problem is as follows:
Suppose we fill each cell of a $n\times n$ square with one of the four arrows $\uparrow$, $\downarrow$, $\gets$, $\to$, like the following
$\begin{array}{|c|c|c|}
\hline
\downarrow & \downarrow & \gets\\
\hline
\to& \to& \uparrow\\
\hline
\to& \uparrow& \uparrow\\
\hline
\end{array}$
We define that entry $A$ (in $i$th column $j$th row) points to entry $B$ (in $k$th column $l$th row) if one of the four happens:

$A$ is filled with $\uparrow$ and $j> l$ and $i=k$
$A$ is filled with $\downarrow$ and $j< l$ and $i=k$
$A$ is filled with $\gets$ and $j= l$ and $i<k$
$A$ is filled with $\to$ and $j= l$ and $i>k$

(This is straightforward if you really fill them with arrows...)
For the example above, only the entry in first row, third column, points to the left upper corner. The right bottom corner entry points to the entry on the first row, third column and the entry on the second row, third column.
Let $r(n)$ be the maximum number such that there is a filling method such that every entry is pointed to by at least $r(n)$ other entries.
Now we have a bound $\frac{2}{3}n+O(1)\le r(n)\le \frac{5}{6}n+O(1)$
(update: now $ r(n)\le \frac{3}{4}n+O(1)$)
(update2: now $ r(n)\le (\sqrt{3}-1)n+O(1)$)
(update3: now $ r(n)\le n/\sqrt{2}+O(1)$)
The lower bound is obtained by the following construction:

We first split the grid into the central $n/3\times n/3$ square surrounded by four regions as drawn. The red region is filled with $\to$, the green region is filled with $\downarrow$, The blue region is filled with $\gets$, the purple region is filled with $\uparrow$. The central square can be filled with anything. One can prove that every entry is pointed to by $\frac{2}{3}n+O(1)$ other entries.
On the other hand, counting the total number of entries one entry can point to, there are at most $\frac{5}{6}n^3+O(n^2)$ pairs (entry 1, entry 2) such that entry 1 points to entry 2. So, in average, an entry is pointed to by at most $5/6\; n+O(1)$ other entries.
Now, the question is: can the lower bound $2/3$ be raised and $5/6$ the upper bound be made smaller? I believe $2/3$ can be raised a little bit (for example, $0.01$) since the central $n/3\times n/3$ is not filled. But can it be substantially increased?
Any improvement is welcome and appreciated, even minor improvement with $2/3$ is welcome.
Update: a friend of mine gave me an $3/4\; n+O(1)$ upper bound. He considered the square connected the midpoints, where there are $2n$ entries. The entries inside the square point to at most one entry on the square, and the entries outside the square point to at most two. Thus, the number of entry points to the other entries is at most $1/2n^2+2\times 1/2n^2+O(n)=3/2n^2+O(n)$, and since there are $3n$ entries, averagely, one of the entries has at most $3n/4+O(1)$ entries points to it.
Update 2: That friend suggested another way: choose these entries in green

The green line four corners are of length $(\sqrt{3}-1)n/2$ entries. Using the similar argument above we can get $(\sqrt{3}-1)n+O(1)$ upper bound.
Update 3:
 That friend, again, suggested a  way: choose these entries in green, the lengths of the green lines in the four corners are $\frac{\sqrt{2}-1}{2}n$ (they are the diagonal of the square of side length $\frac{\sqrt{2}-1}{2}n$) and the central green square has diagonal length $(2-\sqrt{2})n$ These entries on the central square we give them a weight of $1/2$. So all the entries in the outside four triangles will point to weight two entries, the entries inside the central square will point to weight $1/2$ (one entry on the central square) and the rest will point to weight $1$ (two entries on the corner green lines, or two entries on the central square.) So the total weight of pointing will be $n^2+O(n)$. The total weight of green entries is $\sqrt{2} n+O(1)$, and by average, the number of entries pointed to a certain entry is at most $n/\sqrt{2}+O(1)$, so there must be one entry pointed by at most other $n/\sqrt{2}+O(1)$ entries.

REPLY [10 votes]: I used integer linear programming (in SAS) to compute the exact values for $n\in\{2,\dots,50\}$, and they match https://oeis.org/A248183.  Let $C_{i,j,d} \subseteq [n] \times [n]$ be the set of cells that can point to cell $(i,j)$ via direction $d$.  Let binary decision variable $x_{i,j,d}$ indicate whether the arrow in cell $(i,j)$ points in direction $d$, and let $z$ represent the smallest number of arrows pointing to a cell.  The problem is to maximize $z$ subject to
\begin{align}
\sum_d x_{i,j,d} &= 1 &&\text{for all $(i,j)$} \tag1\\
z &\le \sum_{(u,v) \in C_{i,j,d}} x_{u,v,d} && \text{for all $(i,j)$} \tag2
\end{align}
Constraint $(1)$ chooses exactly one arrow per cell.  Constraint $(2)$ enforces the maximin objective.
Figure 1 shows an optimal solution for $n=50$, with $r(50)=34$.  Maybe it will suggest a pattern for general $n$.

Restricting U to the bottom half and D to the top half does not change the optimal values for $n\le 50$.  For example, see Figure 2:

Nor does further restricting L to the right half and R to the left half.  For example, see Figure 3:

For even $n \le 50$, the optimal values still do not change if you further restrict each direction to appear $n^2/4$ times.  For example, see Figure 4:

Forcing horizontal and vertical symmetry, and forcing triangle with side length $10$ ($>10$ loses optimality), as suggested by @Wolfgang, but not forcing $n^2/4$ arrows per direction.  See Figure 5:

Forcing diagonal symmetry loses optimality.
I also tried forcing horizontal and vertical symmetry, $r(50)=34$, and minimizing the number of D (hence U).  The minimum is at most $192$, as shown in Figure 6:

With horizontal and vertical symmetry and $r(64)=44$, the minimum number of D (hence U) is $328$, as shown in Figure 7:

I solved the LP relaxation for $n=50$ with no restrictions and got objective value $34+6/7$.  The resulting optimal solution is not unique.  Figure 8 shows a plot where the color is determined by a fractional value $\ge 1/2$ (gray if the largest fractional value is $< 1/2$):

Figure 9 shows a heat map of the fractional assignments of cell to direction:

Figure 10 shows a heat map of the number of arrows pointing to each cell for an optimal LP solution with no restrictions:

Figure 11 shows a heat map of the number of arrows pointing to each cell for an optimal ILP solution with no restrictions:

Figure 12 shows a solution for $n=50$ where each cell has the minimum number $34$ of arrows pointing to it: