For the word $\omega = \underbrace{11\ldots 1}_{x_1}\underbrace{22\ldots2}_{x_2}\ldots\underbrace{nn\ldots n}_{x_n},$ denote by $\mathsf{A}(x_1, x_2, \ldots, x_n)$ the number of its anagrams without fixed letters. While the function $\mathsf{A}()$ bears significant importance to economic theory \cite{MCKELVEY1997411}, it is not known whether it can be computed in polynomial time. The desire to answer efficiently certain queries related to this function motivates our study of its combinatorial properties. Our first main result shows that $\mathsf{A}(x_1, x_2, \ldots, x_n)\pmod{p}$ can be efficiently computed for any prime $p = O((\log n)^{1/3}).$ Our second main result establishes that the function $\mathsf{A}()$ is Schur-concave, which means that certain ordinal queries about $\mathsf{A}()$ can be answered in linearithmic time. Our second direction of study is structural. We introduce the anagraph, which generalizes derangement graphs. For $(x_1, x_2, \ldots, x_n)\in \mathbb{Z}_{\ge 0}^n,$ $\mathcal{AG}(x_1, x_2, \ldots, x_n)$ is a graph on vertex set all words over the alphabet $[n]$ which have exactly $x_i$ letters $i.$ Two vertices are adjacent if they are anagrams without fixed letters of each other. Our main result fully determines the $n$-tuples $(x_1, \ldots, x_n)$ for which the anagraph is connected and leads to a linear algorithm for this task. We end with a conjecture, which fits into the ongoing debate about the connection between hamiltonicity and vertex-transitivity \cite{transitive}. One contribution of the current paper is a systematic development of techniques for analyzing anagrams without fixed letters. We illustrate the power of these techniques with further arithmetic, ordinal, and structural results.
翻译:$==================================================================================================================================================================x===============================================================================================================================================