1
$\begingroup$

I'd like to calculate the number of ways to select $k$ permutations of $1...n$ so that any two permutations are different in every position.

Formally, choosing permutations $p_1, p_2, ... p_k$, where $\{p_{i,1}, p_{i,2} ... p_{i,n}\}=\{1,2...n-1,n\}$, for every $1 \leq i,j \leq k,~i \neq j,~1 \leq s \leq n~~~p_{i,s} \neq p_{j,s}$ is satisfied.

Any ideas, formulas, algorithms are welcome.

  • 0
    As a quick observation, though there are $n!$ permutations of $1\dots n$, hence $2^{(n!)}$ sets of such permutations, and ${n!}\choose{k}$ $k$-sets of such permutations for arbitrary $0\leq k\leq n!$, in practice you must have $k\leq n$, for otherwise two permutations would have to agree at some position.2017-01-18
  • 0
    Maybe I should also post it to mathoverflow :(2017-01-18
  • 0
    This is somewhat of a meta discussion, but I think the question is better served here. Mathoverflow is usually reserved for research-level mathematics. Somebody ought to come up with something before too long; it's just an off-time for the site in general.2017-01-18
  • 0
    This is essentially the problem of constructing [Latin squares](https://en.wikipedia.org/wiki/Latin_square). When $k=n$ you have a complete Latin square, for $k$L_n$ of $n \times n$ Latin squares". FWIW, [here](http://forums.xkcd.com/viewtopic.php?t=35771&start=400#p3241917) is some Python 2 code I wrote a few years ago for generating Latin squares. – 2017-01-18

1 Answers 1

1

Echoing @PM 2Ring's comments, this problem is the same as counting the number of latin rectangles with width $n$ and height $k$. A reasonably thorough presentation is given by Douglas S. Stones of Monash University: http://www.combinatorics.org/ojs/index.php/eljc/article/download/v17i1a1/pdf