Optimal Algorithms for Sorting Permutations with Brooms - Indulekha Thekkethuruthel Sadanandan; Bhadrachalam Chitturi (Algorithms, 2022)
Sorting permutations with various operations has applications in genetics and computer interconnection networks where an operation is specified by its generator set. A transposition tree <semantics>T=(V,E)</semantics> is a spanning tree over n vertices <semantics>v1,v2,…vn</semantics>. T denotes an operation in which each edge is a generator. A value assigned to a vertex is called a token or a marker. The markers on vertices u and v can be swapped only if the pair <semantics>(u,v)∈E</semantics>. The initial configuration consists of a bijection from the set of vertices <semantics>v1,v2,…,vn</semantics> to the set of markers <semantics>(1,2,⋯,n−1,n)</semantics>. The goal is to sort the initial configuration of T, i.e., an input permutation, by applying the minimum number of swaps or moves in T. Computationally tractable optimal algorithms to sort permutations are known only for a few classes of transposition trees. We study a class of transposition trees called a broom and its variation a double broom. A single broom is a tree obtained by joining the centre vertex of a star with one of the two leaf vertices of a path graph. A double broom is an extension of a single broom where the centre vertex of a second star is connected to the terminal vertex of the path in a single broom. We propose a simple and efficient algorithm to obtain an optimal swap sequence to sort permutations with the transposition tree broom and a novel optimal algorithm to sort permutations with a double broom. We also introduce a new class of trees named millipede tree and prove that <semantics>D*</semantics> yields a tighter upper bound for sorting permutations with a balanced millipede tree compared to <semantics>D′</semantics>. Algorithms <semantics>D*</semantics> and <semantics>D′</semantics> are designed previously.