14

There are $n$ soldiers, lining up every morning for their military service. The commander demands that the morning lineup of these soldiers be arranged differently for every next day according to the following rule: "Any $m$ soldiers cannot be lined up next to each other in the same order for other days."

What is the maximum number of days $f(n,m)$ that this can happen?

This is a generalization of 8 soldiers lining up for the morning assembly ($n=8,m=3$).


The generalized problem can be rewritten in terms of graph theory,

Define a graph $G$ whose $|V|=n!$ vertices are $n$-permutations on $n$ symbols $V=S_n$. Any two vertices (permutations) are connected by an edge iff they share a $m$-permutation.

What is the independence number of graph $G$?

For example, in the case $(n,m)=(3,2)$ graph $G$ consists of two $C_3$ cycle components. The independence number of $C_3\simeq K_3$ is one. Therefore, the answer is $f(3,2)=1+1=2$.

The problem can also be stated in terms of integer linear programming,

Let binary decision variable $x_v\in\{0,1\}$ indicate whether vertex (permutation) $v\in V$ is used on one of the days or not. Let $V_t\subset V$ be the set of all permutations that contain a specific $m$-permutation $t\in T$.

$$ \text{Maximize}\quad \sum_{v\in V} x_v\quad \text{subject to}\quad \sum_{v\in V_t} x_v \le 1, t\in T.$$

Notice that this is a special case of the set packing problem, with lot of symmetry.


My question is,

Can we find a closed form for $f(n,m),m\le n$ that answers the generalization?

It is trivial that $f(n,1)=1$ and that $f(n,n)=n!$.

Each day contributes $(n-m+1)$ of $m$-permutations giving an upper bound $$f(n,m)\le \frac{n!}{(n-m+1)!}.$$

I've implemented the linear programming formulation and computed:

$$\begin{array}{c|ccccccccc} n\overset{\LARGE\setminus}{\phantom{.}}\overset{\Large m}{\phantom{l}}&1&2&3&4&5&6&7&8&9\\ \hline 1&1&-&-&-&-&-&-&-&-\\ 2&1&2&-&-&-&-&-&-&-\\ 3&1&\color{red}{2}&6&-&-&-&-&-&-\\ 4&1&4&12&24&-&-&-&-&-\\ 5&1&\color{red}{4}&20&\color{red}{48}&120&-&-&-&-\\ 6&1&6&30&120&360&720&-&-&-\\ 7&1&7&42&?&?&\color{red}{2160}&5040&-&-\\ 8&1&8&56&?&?&?&20160&40320&-\\ 9&1&9&?&?&?&?&?&\color{red}{161280}&362880\\ \end{array}$$

Notice that for some cases $(n,m)\in\{(3,2),(5,2),(5,4),(7,6),(9,8),\dots\}$, the result $\color{red}{f(n,m)}$ does not reach the upper bound.

Can we determine all cases that do not reach the upper bound?

The $?$ cases haven't been computed yet. Can we calcuate these in reasonable time?


Edit: Alternatively, let soldiers be labelled as $\{0,1,2,\dots,n-1\}$.

Can we find $f(n,m)$ by explicitly constructing solutions?

For example, if $m=2$ and $n+1$ is a prime number, then following $n$ permutations

$$ P_{(n,2)}=\left\{ \left( (ka-1)\bmod{(n+1)} ,a=1,2,\dots,n \right) , k=1,2\dots,n\right\} $$

Satisfy the problem. Therefore, if $n+1$ is prime then $f(n,2)=n$.

E.g. $P_{(6,2)}=\{(012345), (135024), (251403), (304152), (420531), (543210)\}$.

Can we construct $n$ permutations for $m=2$ when $n+1$ is not prime?

Can we do the same for all $(n,m)$ cases which reach the upper bound?

Vepir
  • 13,072
  • 2
    It seems that $f(n+1, n) = n! \cdot \lceil \frac{n}{2} \rceil$. – Fabius Wiesner Dec 29 '20 at 09:27
  • 2
    @BillyJoe In other words, $f(n+1,n)$ appears to be A052591. That is, the number of even fixed points in all permutations of $n+1$ symbols. I wonder if there is a neat way to prove this. – Vepir Dec 29 '20 at 15:51
  • 3
    As I understood, in the graphical interpretation the shared permutations consists of $m$ symbols, placed contiguously. – Alex Ravsky Dec 30 '20 at 21:00
  • 3
    Let $\alpha(G)$ and $\delta(G)$ be the independence number and the maximum vertex degree, respectively of the graph $G$. It is easy to show that $\alpha(G)\ge |V|/(\Delta(G)+1)$. So upper bounds for $\Delta(G)$ provide lower bounds for $\alpha(G)$. It is easy to show that $\Delta(G)\le (n-m+1)((n-m)!m!-1)$. – Alex Ravsky Dec 30 '20 at 21:16

0 Answers0