Bijection between tensors and permutations (in linear $O(n)$ time)

218 Views Asked by At

The number of permutations of the set $S=\{1, \dots, n\}$ is $n!$, or in other words the permutation group $S_n$ has $n!$ elements

The number of tensor components of a tensor in $n$ dimensions $(d_1=1,d_2=2,\dots,d_n=n)$ is similarly $n!$ or in other words the set of the tensor components has $n!$ elements.

update

A tensor in $n$ dimensions as above has components $T^{i_1 i_2 \dots i_n}$, where each index $i_k$ ranges over $1 \dots k$ so total number of components is $1 \times 2 \times \dots \times n=n!$

In other words, it is the tensor product of $n$ vector spaces, where the $k$-th vector space has dimension $k$.

How about finding a bijection ("isomorphism") between these two objects?

Between a specific tensor component in $n$ dimensions as above sense and a specific permutation of $n$ elements.

update2

We are talking about finite objects in a combinatorial way. The original purpose is to find better/faster ways to generate (rank/unrank) permutations for $n$ elements from tensors (to both of which i have algorithms but searching for alternative schemes)

For example ranking and unranking tensors (tensor components) is very fast (linear time), but ranking/unranking permutations (in lexicographic order) requires log-linear time (with some latest algorithms). Something better using the bijection between these entities?