Background

It is known from previous research that the genomes of different species may present essentially the same set of genes in their DNA strands, although not in the same order [1, 2], suggesting the occurrence of mutational events that affect large portions of DNA. These are presumably rare events and, therefore, may provide important clues for the reconstruction of the evolutionary history among species [3, 4]. One such event is the transposition, which swaps the position of two adjacent blocks of genes in one chromosome. Considering that there are no duplicated genes, each gene can be represented by an integer and the chromosome by a permutation, then the transposition distance problem (TDP) aims to find the minimum number of transpositions required to transform one chromosome into another. TDP can be reduced to the sorting by transpositions problem (SBT) using the identity as the target permutation.

The first approximation algorithm to solve SBT was devised in 1998 by Bafna and Pevzer [5], with a 1.5 ratio, based on the properties of a structure called the cycle graph. In 2006, Elias and Hartman [6] presented a 1.375-approximation algorithm (EH algorithm) with time complexity \(O(n^2)\), the best known approximation solution so far for SBT. In 2012, Bulteau, Fertin and Rusu [7] demonstrated that SBT is \(\mathcal {NP}\)-hard.

In a later study, the time complexity of the EH algorithm was improved to \(O(n\log n)\) by Cunha et al. [8]. Improvements to the EH algorithm, including heuristics, were proposed by Dias and Dias [9, 10].

Other studies, using different approaches, other than the cycle graph, were also published. For instance, Hausen et al. [11] studied SBT using a structure named toric graph, which was previously devised by Erikson et al. [12], used by the later ones to derive the upper bound of \(\left\lfloor \frac{2n - 2}{3} \right\rfloor\) for the transposition diameter, the best known so far for SBT. Galvão and Dias [13] studied solutions for SBT using three different structures: permutation codes, a concept previously introduced by Benoît-Gagné and Hamel [14]; breakpoint diagram,Footnote 1 introduced by Walter et al. [15]; and longest increasing subsequence, introduced by Guyer et al. [16]. Rusu [17], on the other hand, used a structure called log-list, formerly devised with the name link-cut trees by Sleator and Tarjan [18], to derive another \(O(n\log n)\) 1.375-approximation algorithm for SBT. In addition to these, recently, other studies have been proposed involving variations of the transposition event. As examples, Lintzmayer et al. [19] studied the problem of sorting by prefix and sufix transpositions, as well as other problems combining variations of the transposition event with variations of the reversal event. Oliveira et al. [20] studied the transposition distance between two genomes considering intergenic regions, a problem they called sorting permutations by intergenic transpositions.

Meidanis and Dias [21] and Mira and Meidanis [22] were the first authors to propose the use of an algebraic approach to solve SBT, as an alternative to the methods based on the cycle graph. The goal was to provide a more formal approach for solving rearrangement problems using known results from the permutation groups theory. Mira et al. [23] have shown the feasibility of using an algebraic approach to solve SBT by formalising the Bafna and Pevzner’s 1.5-approximation algorithm [5] using an algebraic tooling.

Regarding the studies using the cycle graph, after the work of Bafna and Pevzner [5], the use of simplification [24,25,26] became predominant. Simplification was introduced to make it easier to deal with long cycles in the cycle graph. In Appendix 1, we show a side effect of simplification, which ultimately makes the EH algorithm, in certain scenarios, to require one extra transposition above the 1.375-approximation ratio and, therefore, we avoided its use in our work. To the best of our knowledge, there is no tooling in the cycle graph literature to deal with long cycles, probably due to the predominance of simplification. For this reason, in this paper, we prefer to use an algebraic approach based on the work of Mira et al. [23]. In it, we are able to handle with long cycles without having to insert new symbols into the original permutation.

This paper is organized as follows. First, we present a brief background on permutation groups, necessary to understand the algebraic approach used in our work, followed by an algebraic formalisation of SBT. Next, we propose a new upper bound for SBT, valid for all \(S_n\), improving the upper bound devised by Bafna and Pevzner [5, 27]. Then, we propose a new approximation algorithm to solve SBT that ensures the 1.375-approximation for all \(S_n\). Finally, we present experimental results on all permutations of length n, \(2 \le n \le 12\), of implementations of the EH algorithm and ours. The percentage of computed distances that are equal to transposition distance computed by the EH algorithm and ours are compared with others available in the literature. We also investigate the performance of the implementations of both algorithms with longer permutations of sizes ranging from 20 to 500, and compare the results with similar experiments conducted in other studies. Two other issues were found in the EH algorithm, one affecting both published versions [6, 28] and another one affecting only the journal version [28]. The issues are reported in the Appendix 3.

Permutation groups

The results presented next are classical in the literature and their proofs can be found in abstract algebra textbooks [29, 30].

The Symmetric Group \(S_n\) on a finite set E of n symbols is the group formed by all permutations on n distinct elements of E, defined as bijections from E to itself, under the operation of composition. The product of two permutations is defined as their composition as functions. Thus, if \(\alpha\) and \(\beta\) are permutations in \(S_n\), then \(\alpha \cdot \beta\), or simply \(\alpha \beta\), is the function that maps any element x of E to \(\alpha (\beta (x))\).

An element \(x \in E\) is said to be a fixed element of \(\alpha \in S_n\), if \(\alpha (x) = x\). If there exists a subset \(\{c_1, c_2, \dots , c_{\kappa -1}, c_\kappa \}\) of distinct elements of E, such that

$$\begin{aligned} \alpha (c_1)= c_2, \alpha (c_2)= c_3, \dots , \alpha (c_{\kappa -1})= c_\kappa , \alpha (c_\kappa )= c_1, \end{aligned}$$

and \(\alpha\) fixes all other elements, then we call \(\alpha\) a cycle. In cycle notation, this cycle is written as \(\alpha =(c_1\;c_2\dots c_{\kappa -1}\;c_\kappa )\), but any of \((c_2\dots c_{\kappa -1}\;c_\kappa \;c_1)\), ..., \((c_\kappa \;c_1\;c_2\dots c_{\kappa -1})\) denotes the same cycle \(\alpha\). The number \(\kappa\) is the length of \(\alpha\), denoted by \(|\alpha |\). In this case, \(\alpha\) is also called a \(\kappa\)-cycle.

The support of a permutation \(\alpha\), denoted \(Supp(\alpha )\), is the subset of moved (not fixed) elements of E. Two permutations \(\alpha\) and \(\beta\) are said disjoint, if \(Supp(\alpha ) \cap Supp(\beta )=\varnothing\), i.e, if every symbol moved by one is fixed by the other. It is known that, if \(\alpha\) and \(\beta\) are disjoint, then they commute as elements of \(S_n\), under the composition operation.

Lemma 1

Every permutation in \(S_n\) can be written as a product of disjoint cycles. This representation, called disjoint cycle decomposition , is unique, regardless of the order in which the cycles are written in the representation.

For the sake of simplicity, a cycle \(\beta\) in or of a permutation \(\alpha\) is a cycle in the disjoint cycle decomposition of \(\alpha\).

The identity permutation \(\iota\) is the permutation fixing all elements of E. Fixed elements sometimes are omitted in the cycle notation. However, when necessary they are written as 1-cycles.

Theorem 2

Every permutation in \(S_n\) can be written as a (not unique) product of 2-cycles.

A permutation \(\alpha\) is said to be even(odd) if it can be written as a product of an even(odd) number of 2-cycles.Footnote 2 Next, we present some important results related to the parity of permutations.

Theorem 3

If a permutation \(\alpha\) is written as a product of an even(odd) number of 2-cycles, it cannot be written as a product of an odd(even) number 2-cycles.

Example 4

The permutation \(\rho =[4\;8\;3\;7\;2\;6\;1\;5]\), in cycle notation, is represented by \((\begin{array}{ccc}1&4&7 \end{array})(\begin{array}{ccc}2&8&5 \end{array})(\begin{array}{c}3 \end{array})(\begin{array}{c}6 \end{array})\). In this case, 3 and 6 are fixed elements and could be omitted in this notation. We can say that \(\rho\) can be written, in unique form, as a product of two disjoint 3-cycles. This permutation could be written as product of other cycles, but these cycles would not be disjoint. Furthermore, \(\rho\) could be written as (1 7) (1 4) (2 5) (2 8), using four 2-cycles, and also as (1 7) (4 7) (1 7) (4 7) (2 5) (2 8), using six 2-cycles.

Theorem 5

If \(\alpha\), \(\beta \in S_n\) are permutations with the same parity, then the product \(\alpha \beta\) is even.

Proposition 6

Let \(\gamma\) be a \(\kappa\)-cycle. If \(\kappa\) is odd, then \(\gamma\) is an even permutation, otherwise \(\gamma\) is odd.

In order to avoid misunderstanding with the parity of cycles in the cycle graph formalism, which is opposite to the one classically used in permutation groups, we will always refer to the lengths of the cycles rather than their parity.

Algebraic formalisation of SBT

A permutation \(\pi =[\pi _1\;\pi _2\dots \pi _n]\) can be represented in many different ways. In the genome rearrangement context, where \(\pi\) models a chromosome, one of the most used representations of \(\pi\) is the cycle graph [5], denoted \(G(\pi )\) (a formal definition of \(G(\pi )\) can be found in the first section of Appendix 1). An alternative representation to the cycle graph is using the algebraic approach proposed by Mira et al. [23], which is the one employed in this paper. In this approach, the permutation \(\pi\) is represented as the \((n+1)\)-cycle \({\bar{\pi }}=(0\;\pi _1\;\pi _2\dots \pi _n)\) and the identity as \({\bar{\iota }}=(\begin{array}{ccccc}0&1&2&\dots&n \end{array})\)Footnote 3. A correspondence between the cycles of the product \({\bar{\iota }}{{\bar{\pi }}}^{-1}\) (presented in the sequel) and the set of cycles of \(G(\pi )\) is shown in the Appendix 2.

A 3-cycle \(\tau =(\begin{array}{ccc}\pi _i&\pi _j&\pi _k \end{array})\) is said to be applicable on \({\bar{\pi }}\) if the symbols \(\pi _i\), \(\pi _j\) and \(\pi _k\) appear in \({\bar{\pi }}\) in the same cyclic order they are in \(\tau\), i.e., \({\bar{\pi }}=(\pi _i\dots \pi _j\dots \pi _k\dots )\) [23]. The application of \(\tau\) on \({\bar{\pi }}\) means multiply \(\tau\) by \({\bar{\pi }}\). Thus, and only in this case, the product \(\tau {\bar{\pi }}\) is a \((n+1)\)-cycle, such that the symbols between \(\pi _i\) and \(\pi _{j-1}\), including \(\pi _i\) but not \(\pi _j\), in \({\bar{\pi }}\) are “cut” and then “pasted” between \(\pi _{k-1}\) and \(\pi _k\), thus simulating a transposition on \({\bar{\pi }}\), as \(\tau {\bar{\pi }}=(\begin{array}{ccc}\pi _i&\pi _j&\pi _k \end{array})(\pi _0\pi _1\dots \pi _{i-1}\pi _i\pi _{i+1}\dots \pi _{j-1}\pi _j\pi _{j+1}\dots\) \(\pi _{k-1}\pi _k\dots \pi _n)=(\pi _0\pi _1\dots \pi _{i-1}\pi _j\pi _{j+1}\dots \pi _{k-1}\pi _i\pi _{i+1}\) \(\dots \pi _{j-1}\pi _k\dots \pi _n)\).

Example 7

Let \({\bar{\pi }}=(\begin{array}{ccccccccc}0&4&3&2&1&8&7&6&5 \end{array})\). The 3-cycle \(\tau =(\begin{array}{ccc}0&2&7 \end{array})\) is applicable to \({\bar{\pi }}\) and thus simulates a transposition. The application \(\tau {\bar{\pi }}\) yields \((\begin{array}{ccccccccc}0&4&3&7&6&5&2&1&8 \end{array})\). Now consider the 3-cycle \(\tau '=(\begin{array}{ccc}0&1&2 \end{array})\). Note that \(\tau '\) is not applicable to \({\bar{\pi }}\), and the result of the product \(\tau '{\bar{\pi }}\) is \((0\;4\;3\;7\;6\;5)(1\;8)(2)\), which is not a \((n+1)\)-cycle and therefore does not represent a chromosome in our approach.

Given a \((n+1)\)-cycle \({\bar{\pi }}\), the sorting by transpositions problem (SBT) consists of finding the minimum number t, denoted \(d({\bar{\pi }})\), of transpositions represented as applicable 3-cycles needed to transform \({\bar{\pi }}\) into \({\bar{\iota }}=(\begin{array}{ccccc}0&1&2&\dots&n \end{array})\), i.e.,

$$\begin{aligned} \tau _t\dots \tau _1{\bar{\pi }}&={\bar{\iota }}.\end{aligned}$$
(1)

From the equality above, multiplying both sides by \({\bar{\pi }}^{-1}\), we have that

$$\begin{aligned} \tau _t\dots \tau _1&={\bar{\iota }}{\bar{\pi }}^{-1}.\end{aligned}$$
(2)

Observe that by Proposition 6 and Theorem 5, the product of two cycles with the same length is an even permutation.

Proposition 8

The permutation \({\bar{\iota }}{\bar{\pi }}^{-1}\) is an even permutation.

The 3-norm [22] of an even permutation \(\alpha \in S_n\), denoted by \(||\alpha ||_3\), corresponds to the smallest \(\ell\) such that \(\beta _{\ell }\dots \beta _1=\alpha\), where each \(\beta _i\), \(1 \le i \le \ell\), is a 3-cycle. Denote by \({c^\circ }_{odd}(\alpha )\), the number of odd-length cycles, also including 1-cycles, in \(\alpha\), respectively. Mira and Meidanis [22] demonstrated the following result.

Lemma 9

(Mira and Meidanis [22])

$$\begin{aligned} ||\alpha ||_3 = \frac{n-{c^\circ }_{odd}(\alpha )}{2}.\end{aligned}$$

As \({\bar{\iota }}{\bar{\pi }}^{-1}\) is an even permutation (Proposition 8), then, as a corollary, a lower bound for SBT is derived.

Lemma 10

(Mira and Meidanis [22]) If \({\bar{\pi }}\) is a \((n+1)\)-cycle, then

$$\begin{aligned} d({\bar{\pi }})&\ge ||{\bar{\iota }}{\bar{\pi }}^{-1}||_3 \\&\ge \frac{n+1-{c^\circ }_{odd}({\bar{\iota }}{\bar{\pi }}^{-1})}{2}.\end{aligned}$$

New upper bound for SBT

In this section, we present our main results. We begin with some basic definitions and results concerning the \({\bar{\iota }}{{\bar{\pi }}}^{-1}\) permutation. Next, we present a new upper bound for SBT and a new 1.375-approximation algorithm.

Cycles of \({\bar{\iota }}{{\bar{\pi }}}^{-1}\)

Let \(\gamma\) be a cycle in \({\bar{\iota }}{{\bar{\pi }}}^{-1}\). If \(\gamma =(a\dots b\dots c\dots )\) and \({\bar{\pi }}^{-1}=(a\dots c\dots b\dots )\), i.e., if the symbols a, b and c appear in \(\gamma\) in a cyclic order that is distinct from the one in \({\bar{\pi }}^{-1}\), then we say (abc) is an oriented triplet and \(\gamma\) is an oriented cycle. Otherwise, if there is no oriented triplets in \(\gamma\), then \(\gamma\) is an unoriented cycle. A cycle \(\eta =(\eta _1\;\eta _2\dots \eta _{|\eta |})\) is a segment of \(\gamma\) if \(\gamma =(\eta _1\;\eta _2\dots \eta _{|\eta |}\dots )\). Observe that by definition, a cycle in \({\bar{\iota }}{{\bar{\pi }}}^{-1}\) is a segment of itself. Analogously, we define a segment of a cycle \(\gamma\) of \({\bar{\iota }}{{\bar{\pi }}}^{-1}\) as oriented or unoriented.

Let \(\delta =(a\;b\dots )\) and \(\epsilon =(d\;e\dots )\) be two cycles of \({\bar{\iota }}{{\bar{\pi }}}^{-1}\). If \({\bar{\pi }}^{-1}=(a\dots e\dots b\dots d\dots )\), i.e., if the symbols of the pairs (ab) and (de) occur in alternate order in \({\bar{\pi }}^{-1}\), we say these pairs intersect, and that \(\delta\) and \(\epsilon\) are intersecting cycles. A special case is when \(\delta =(a\;b\;c\dots )\) and \(\epsilon =(d\;e\;f\dots )\) are such that \({\bar{\pi }}^{-1}=(a\dots e\dots b\dots f\dots c\dots d\dots )\), i.e., the symbols of the triplets (abc) and (def) occur in alternate order in \({\bar{\pi }}^{-1}\). In this case, \(\delta\) and \(\epsilon\) are said to be interleaving cycles. Analogously, we define two segments of two \({\bar{\iota }}{{\bar{\pi }}}^{-1}\) cycles as intersecting or interleaving.

Example 11

Let \({\bar{\pi }}=\left({\text{0 8 7 6 5 1 4 9 3 2}}\right)\) and \({\bar{\iota }}{{\bar{\pi }}}^{-1}=\) (0 3) (1 6 8) (2 4) (5 7 9). The cycles (0 3) and (2 4) are examples of intersecting cycles whereas (1 6 8) and (5 7 9) are interleaving cycles.

A \(\kappa\)-cycle in \({\bar{\iota }}{{\bar{\pi }}}^{-1}\) is called short if \(\kappa \le 3\); otherwise, it is called long. Similarly, a segment of a cycle of \({\bar{\iota }}{{\bar{\pi }}}^{-1}\) can be short or long.

Observe that, from Eq. 2, \({\bar{\iota }}{{\bar{\pi }}}^{-1}{\tau _1}^{-1}\dots {\tau _t}^{-1}=\iota\), i.e., the application of the transpositions \(\tau _1\),\(\dots\),\(\tau _t\) sorting \({\bar{\pi }}\) (i.e., transforming \({\bar{\pi }}\) into \({\bar{\iota }}\)) can be seen as the incremental multiplication of \({\bar{\iota }}{{\bar{\pi }}}^{-1}\) by \({\tau _1}^{-1}\), \(\dots\), \({\tau _t}^{-1}\).

Denote by \(\Delta {c^\circ }_{odd}({\bar{\iota }}{{\bar{\pi }}}^{-1}, \tau )\), the difference \({c^\circ }_{odd}({\bar{\iota }}{{\bar{\pi }}}^{-1}\) \(\tau ^{-1})-{c^\circ }_{odd}({\bar{\iota }}{{\bar{\pi }}}^{-1})\).

Proposition 12

(Meidanis, Dias and Mira [21, 22]) If \(\tau\) is an applicable 3-cycle then \(\Delta {c^\circ }_{odd}({\bar{\iota }}{{\bar{\pi }}}^{-1}, \tau )\in \{-2,0,2\}\).

The maximum number of cycles in \({\bar{\iota }}{{\bar{\pi }}}^{-1}\) is obtained if and only if \({\bar{\iota }}{{\bar{\pi }}}^{-1}\) is the identity permutation \(\iota\). In this case, \(\iota\) has \(n+1\) cycles, being all odd-length (in particular, they are all of length 1).

We denote by \(\mu\)-move an applicable 3-cycle \(\tau\) such that \(\Delta {c^\circ }_{odd}({\bar{\iota }}{{\bar{\pi }}}^{-1}, \tau )=\mu\). According to the Proposition 12, the possible moves are \((-2)\)-move, 0-move and 2-move.

Configurations and components

A configuration \(\Gamma\) is a disjoint product of segments of cycles of \({\bar{\iota }}{{\bar{\pi }}}^{-1}\), such that there is no two segments in \(\Gamma\) of the same cycle of \({\bar{\iota }}{{\bar{\pi }}}^{-1}\). If \(||\Gamma ||_3 \le 8\) then \(\Gamma\) is said to be small; otherwise, big.

Example 13

Let \({\bar{\pi }}=(0\;6\;5\;3\;2\;1\;8\;7\;4\;9\;14\;13\;12\;11\;10,\) so \({\bar{\iota }}{{\bar{\pi }}}^{-1}=(\begin{array}{ccc}0&11&13 \end{array})(\begin{array}{ccc}1&3&6 \end{array})(\begin{array}{ccc}2&4&8 \end{array})(\begin{array}{ccc}5&7&9 \end{array})(\begin{array}{ccc}10&12&14 \end{array}).\) The product \((\begin{array}{ccc}1&3&6 \end{array})(\begin{array}{ccc}2&4&8 \end{array})\) is a small configuration of \({\bar{\iota }}{{\bar{\pi }}}^{-1}\).

A configuration \(\Gamma\) is connected if for any two segments \(\gamma _1\) and \(\gamma _m\) of \(\Gamma\), there are segments \(\gamma _2,\dots ,\gamma _{m-1}\) in \(\Gamma\) such that for each \(i \in [1, m-1]\), \(\gamma _i\) intersects or interleaves with \(\gamma _{i+1}\). \(\Gamma\) is said to be a component if it consists of only one oriented cycle that does not intersect or interleave any other cycle of \({\bar{\iota }}{{\bar{\pi }}}^{-1}\); or it consists of a maximal connected configuration of \({\bar{\iota }}{{\bar{\pi }}}^{-1}\).

Example 14

Let \({\bar{\pi }}=(0\;6\;5\;3\;2\;1\;8\;7\;4\;9\;14\;13\;12\;11\) \(\;10)\). As \({\bar{\iota }}{{\bar{\pi }}}^{-1}=(\begin{array}{ccc}0&11&13 \end{array})(\begin{array}{ccc}1&3&6 \end{array})(\begin{array}{ccc}2&4&8 \end{array})(\begin{array}{ccc}5&7&9 \end{array})(10\;12\;\) 14), so \((\begin{array}{ccc}0&11&13 \end{array})(\begin{array}{ccc}10&12&14 \end{array})\) and \((\begin{array}{ccc}1&3&6 \end{array})(\begin{array}{ccc}2&4&8 \end{array})(\begin{array}{ccc}5&7&9 \end{array})\) are both components of \({\bar{\iota }}{{\bar{\pi }}}^{-1}\).

Let \((\begin{array}{ccc}a&b&c \end{array})(\begin{array}{ccc}d&e&f \end{array})\) be a configuration of \({\bar{\iota }}{{\bar{\pi }}}^{-1}\) consisting of two intersecting segments. If \({\bar{\pi }}^{-1}=(a\dots e\dots b\dots f\dots c\dots d\dots )\), i.e., if \((\begin{array}{ccc}a&b&c \end{array})\) and \((\begin{array}{ccc}d&e&f \end{array})\) interleave, then we call it the unoriented interleaving pair. On the other hand, if \({\bar{\pi }}^{-1}=(a\dots f\dots b\dots c\dots d\dots e\dots )\), i.e., \((\begin{array}{ccc}a&b&c \end{array})\) and \((\begin{array}{ccc}d&e&f \end{array})\) only intersect but do not interleave, then we call it the unoriented intersecting pair.

Let \(\epsilon =(a\;b\dots )\) be a segment of a configuration \(\Gamma\). We call the pair (ab) an open gate in \(\Gamma\), if there is no cycle \((c\;d\dots )\) in \(\Gamma\) such that (ab) and (cd) intersect; and there is no \(e \in Supp(\epsilon )\) such that (abe) is an oriented triplet. If \(\Gamma\) is a configuration not containing open gates, then it is a full configuration. Observe that the unoriented interleaving pair does not have open gates and therefore it is a full configuration. The unoriented intersecting pair, in its turn, has two open gates.

Sequences of applicable 3-cycles

We also denote by (xy)-sequence, for \(x \ge y\), a sequence of x applicable 3-cycles \(\tau _1\), \(\dots\), \(\tau _x\) such that, at least y of them are 2-moves. A (xy)-sequence is said to be a \(\frac{a}{b}\)-sequence if \(x \le a\) and \(\frac{x}{y} \le \frac{a}{b}\).

Example 15

Let \({\bar{\pi }}=\) (0 4 8 3 7 2 6 1 5 9 14 13 12 11 10) , so \({\bar{\iota }}{{\bar{\pi }}}^{-1}=\) (0 11 13) (1 7 4) 4) (2 8 5) (3 9 6) (10 12 14). The sequence \(\tau _1=\) (1 4 7), \(\tau _2=\) (2 8 5), \(\tau _3=\) (1 4 7), \(\tau _4=(\begin{array}{ccc}3&9&6 \end{array})\) is a (4, 3)-sequence, which is also a \(\frac{11}{8}\)-sequence.

We say a configuration \(\Gamma\) allows the application of a \(\frac{a}{b}\)-sequence if it is possible to write this sequence using the symbols of \(Supp(\Gamma )\).

Auxiliary results

The proofs of some results in this section and the next rely on the analysis of a huge number of cases. Since it is impracticable to enumerate and verify by hand all the cases, we implemented, as Elias and Hartman [6], some computer programs [31] to systematically generate the proofs. In order to facilitate the visualisation and general understanding, the proofs are available to the reader in the form of a friendly web interface [32].

Next we show some auxiliary results.

Corollary 16

If there is an oriented 3-cycle \(\gamma =(\begin{array}{ccc}a&b&c \end{array})\) in \({\bar{\iota }}{{\bar{\pi }}}^{-1}\), then \((\begin{array}{ccc}a&b&c \end{array})\) is a 2-move.

Proposition 17

If there is an even-length cycle in \({\bar{\iota }}{{\bar{\pi }}}^{-1}\), then a 2-move exists.

Proof

Since \({\bar{\iota }}{{\bar{\pi }}}^{-1}\) is an even permutation (Proposition 8), then there is an even number of even-length cycles in \({\bar{\iota }}{{\bar{\pi }}}^{-1}\). Let \(\gamma =(a\;b\dots )\) and \(\delta =(c\;d\dots )\) be two even-length cycles of \({\bar{\iota }}{{\bar{\pi }}}^{-1}\). We have two cases:

  1. (1)

    \(\gamma\) and \(\delta\) intersect. In this case, we have that \({\bar{\pi }}^{-1}=(a\dots d\dots b\dots c\dots )\). Then \((a\;b\;c)\) is a 2-move.

  2. (2)

    \(\gamma\) and \(\delta\) do not intersect. W.l.o.g, suppose \({\bar{\pi }}^{-1}=(a\dots b\dots c\dots d\dots )\). In this case, \((a\;c\;b)\) is a 2-move.

\(\square\)

Lemma 18

If there is a 5-cycle \(\gamma =(\begin{array}{ccccc}a&d&b&e&c \end{array})\) in \({\bar{\iota }}{{\bar{\pi }}}^{-1}\) such that (abc) is an oriented triplet, then there is a 2-move or a (3, 2)-sequence.

Proof

The possible distinct forms of \({\bar{\pi }}\) relatively to the positions of the symbols of \(Supp(\gamma )\) are listed below. For each one, there is either a 2-move or a (3, 2)-sequence.

  1. (1)

    \({\bar{\pi }}=(a\dots b\dots c\dots d\dots e\dots )\). \(\tau _1=(\begin{array}{ccc}a&b&c \end{array})\), \(\tau _2=(\begin{array}{ccc} b&c&d \end{array})\), \(\tau _3=(\begin{array}{ccc}c&d&e \end{array})\).

  2. (2)

    \({\bar{\pi }}=(a\dots b\dots c\dots e\dots d\dots )\). \(\tau _1=(\begin{array}{ccc}b&e&d \end{array})\).

  3. (3)

    \({\bar{\pi }}=(a\dots b\dots e\dots c\dots d\dots )\). \(\tau _1=(\begin{array}{ccc}a&e&c \end{array})\).

  4. (4)

    \({\bar{\pi }}=(a\dots e\dots b\dots d\dots c\dots )\). \(\tau _1=(\begin{array}{ccc}a&d&c \end{array})\).

  5. (5)

    \({\bar{\pi }}=(a\dots b\dots e\dots d\dots c\dots )\). \(\tau _1=(\begin{array}{ccc}a&d&c \end{array})\).

  6. (6)

    \({\bar{\pi }}=(a\dots d\dots b\dots e\dots c\dots )\). \(\tau _1=(\begin{array}{ccc}a&d&b \end{array})\).

\(\square\)

Note that, by Lemma 18, if \(\gamma =(\begin{array}{ccccc}a&d&b&e&c \end{array})\) is an oriented 5-cycle in \({\bar{\iota }}{{\bar{\pi }}}^{-1}\) such that (abc) an oriented triplet, then \({\bar{\pi }}=(a\dots b\dots c\dots d\dots e\dots )\) is the only form of \({\bar{\pi }}\), relatively to the positions of the symbols of \(Supp(\gamma )\), for which there is no 2-move. In this case, we call \(\gamma\) the bad oriented 5-cycle.

Lemma 19

If there is an odd-length \(\kappa\)-cycle \(\gamma =(a\dots b\dots c\dots )\) in \({\bar{\iota }}{{\bar{\pi }}}^{-1}\) such that \(\kappa \ge 7\) and (abc) is an oriented triplet, then there is either a 2-move or (4, 3)-sequence.

Proof

If \((a\;b\;c)\) is a 2-move, then the lemma holds. There is only one case where \((\begin{array}{ccc}a&b&c \end{array})\) would not be a 2-move. W.l.o.g, suppose that this case is

$$\begin{aligned} \gamma =(\underbrace{d\;e\dots b}_{odd}\;|\;\underbrace{f\dots c}_{even}\;|\;\underbrace{g\dots a}_{even}\;|). \end{aligned}$$

Vertical bars are used to indicate the locations where \(\gamma\) would be broken if \((\begin{array}{ccc}a&b&c \end{array})\) were applied on \({\bar{\pi }}\), and subscripts to indicate the parity of the length of the resulting cycles. Note that the cycle \(\gamma\) can be rewritten as the product

$$\begin{aligned} \gamma =(\underbrace{a\dots }_{odd})(\underbrace{b\dots }_{odd})(\underbrace{c\dots }_{odd})(\begin{array}{ccccccc}a&d&e&b&f&c&g \end{array}). \end{aligned}$$

There is only one form of \({\bar{\pi }}\) relatively to the symbols of the support of \((\begin{array}{ccccccc}a&d&e&b&f&c&g \end{array})\) not allowing the application of a 2-move, which is \({\bar{\pi }}=(a\dots e\dots f\dots g\dots d\dots b\dots\) \(c\dots )\). For this \({\bar{\pi }}\), \(\tau _1=(a\;e\;f)\), \(\tau _2=(d\;e\;f)\), \(\tau _3=(b\;f\;d)\), \(\tau _4=(a\;c\;g)\) is (4, 3)-sequence of transpositions. \(\square\)

Lemma 20

If \({\bar{\iota }}{{\bar{\pi }}}^{-1}\ne \iota\), then a 2-move or (3, 2)-sequence exists.

Proof

If there is an even-length cycle in \({\bar{\iota }}{{\bar{\pi }}}^{-1}\), then by Proposition 17, a 2-move (i.e., a (1, 1)-sequence) exists. Thus, we assume \({\bar{\iota }}{{\bar{\pi }}}^{-1}\) containing only odd-length cycles.

  1. (1)

    There is an oriented \(\kappa\)-cycle \(\gamma\) in \({\bar{\iota }}{{\bar{\pi }}}^{-1}\). If \(\kappa =3\), then Corollary 16 gives a 2-move and the lemma holds. If \(\kappa =5\), then Lemma 18 gives a 2-move or \(\gamma\) is the bad oriented 5-cycle. In this case, there is a (3, 2)-sequence. On the other hand, if \(\kappa \ge 7\), then a 2-move or a (4, 3)-sequence, which contains a (3, 2)-sequence, is given by Lemma 19.

  2. (2)

    All the cycles of \({\bar{\iota }}{{\bar{\pi }}}^{-1}\) are unoriented. Let \(\gamma =(\begin{array}{ccc}a&b&c \end{array})\) be a segment of a cycle of \({\bar{\iota }}{{\bar{\pi }}}^{-1}\). We have two cases:

    1. (a)

      \(\gamma\) interleaves with another segment \(\delta =(\begin{array}{ccc}d&e&f \end{array})\). In this case, we have that \({\bar{\pi }}=(a\dots f\dots c\dots e\dots b\dots d\dots )\). Then, \(\tau _1=(\begin{array}{ccc}a&c&b \end{array})\), \(\tau _2=(\begin{array}{ccc}d&e&f \end{array})\) and \(\tau _3=(\begin{array}{ccc}a&c&b \end{array})\) is a (3, 2)-sequence.

    2. (b)

      \(\gamma\) intersects with two segments \(\delta =(\begin{array}{ccc}d&e&f \end{array})\) and \(\epsilon =(\begin{array}{ccc}g&h&i \end{array})\). For each of the 15 distinct forms of \({\bar{\pi }}\) (enumerated on [32]), relatively to the possible positions of the symbols of \(\gamma\), \(\delta\) and \(\epsilon\), there is a (3, 2)-sequence.

\(\square\)

Configuration analysis

At this point, we consider \({\bar{\iota }}{{\bar{\pi }}}^{-1}\) consisting only of odd-length unoriented cycles of any size or bad oriented 5-cycles. For the other cases, Corollary 16, Proposition 17 and Lemma 19 give a 2-move or a (4, 3)-sequence.

Our goal is to prove that, if \(||{\bar{\iota }}{{\bar{\pi }}}^{-1}||_3 \ge 8\), then a \(\frac{11}{8}\)-sequence of transpositions exists. The analysis is divided in two parts. In the first part, we analyse configurations obtained from basic ones (defined below) by extension. In the second part, we analyse \({\bar{\iota }}{{\bar{\pi }}}^{-1}\) composed only of small components, not allowing application of \(\frac{11}{8}\)-sequences.

Extension of basic configurations

The analysis starts with the bad oriented 5-cycle, and the only two connected configurations of 3-norm equal to 2: the unoriented intersecting pair; and the unoriented interleaving pair. From these three basic configurations, it is possible to build any other connected configuration of \({\bar{\iota }}{{\bar{\pi }}}^{-1}\) by successive extensions. From a configuration \(\Gamma\), we can obtain a larger configuration \(\Gamma '\), such that \(||\Gamma '||_3=||\Gamma ||_3+1\), extending \(\Gamma\) by three different sufficient extensions, as follows:

  1. (1)

    If \(\Gamma\) has open gates, we can add a new unoriented 3-cycle segment to \(\Gamma\), closing at least one open gate.

  2. (2)

    If \(\Gamma\) has no open gates, we can add a new unoriented 3-cycle segment to \(\Gamma\), so that this segment intersects or interleaves another one in \(\Gamma\).

  3. (3)

    Let \(\gamma\) be a segment in \(\Gamma\). We can increase the length of \(\gamma\) by 2, originating a bad oriented 5-cycle; or a longer unoriented segment, so that at least one open gate is closed, if \(\Gamma\) has open gates; or creating up to two open gates, otherwise.

Example 21

We can extend the configuration \(\Gamma\) of Example 13 using extension 1, yielding \(\Gamma '=(\begin{array}{ccc}1&8&10 \end{array})(\begin{array}{ccc}5&7&12 \end{array})(\begin{array}{ccc}9&11&13 \end{array})\). Then, with extension 2, we obtain \(\Gamma ''=(\begin{array}{ccc}1&8&10 \end{array})(\begin{array}{ccc}2&4&6 \end{array})(\begin{array}{ccc}5&7&12 \end{array})(\begin{array}{ccc}9&11&13 \end{array})\). Finally, with extension 3, we obtain \(\Gamma '''=(\begin{array}{ccccc}0&3&5&7&12 \end{array})(\begin{array}{ccc}1&8&10 \end{array})\) \((\begin{array}{ccc}2&4&6 \end{array})(\begin{array}{ccc}9&11&13 \end{array})\).

A sufficient configuration is a configuration obtained by successively extending one of the basic configurations referred above. The computerised analysis proves the following result.

Lemma 22

If it is possible to build a sufficient configuration \(\Gamma\) of \({\bar{\iota }}{{\bar{\pi }}}^{-1}\) such that \(\Gamma\) is big, then \(\Gamma\) allows a \(\frac{11}{8}\)-sequence.

Observe that our definition of configuration extension is similar to the one devised by Elias and Hartman [6]. However, Elias and Hartman [6] only handled with configurations consisting of (unoriented) 3-cycles, while our definition includes the generation of configurations containing longer segments.

Lemma 22 could be proven generating all the possible big configurations of 3-norm equal to 9 by extending the three basic configurations and then, for each, search for a \(\frac{11}{8}\)-sequence. However, this would be too time consuming. Instead, our computer program [31] employs a depth first search approach, in which, starting from the basic configurations, if we succeed in finding a \(\frac{11}{8}\)-sequence for a sufficient configuration, then we do not extend it further. The output of the program [31], which proves Lemma 22, is composed of 382,064 HTML files, one for each analysed case.

Analysis of small full configurations which do not allow \(\frac{11}{8}\)-sequences

To conclude the analysis, now we handle the small full configurations for which the program [31] did not find \(\frac{11}{8}\)-sequences, and that can occur as small components in \({\bar{\iota }}{{\bar{\pi }}}^{-1}\). Small components not allowing \(\frac{11}{8}\)-sequences are called bad small components.

Lemma 23

The bad small components are the following:

  1. (1)

    The bad oriented 5-cycle;

  2. (2)

    The unoriented interleaving pair;

  3. (3)

    The unoriented necklaces of size 4, 5 and 6;Footnote 4 and

  4. (4)

    The twisted necklace of size 4.

An unoriented necklace of size s is a component of s unoriented 3-cycles such that each cycle intersects with exactly two other cycles. The twisted necklace of size 4 is similar to the necklace of size 4, but two of its cycles intersect with the three others.

With the exception of the bad oriented 5-cycle, the bad small components listed above are the same ones found by Elias and Hartman [6], despite of the generation of configurations containing longer segments in our analysis.

With the help of computer program [31], we prove the following result.

Lemma 24

If there is a configuration \(\Lambda\) of \({\bar{\iota }}{{\bar{\pi }}}^{-1}\) consisting only of bad small components such that \(||\Lambda ||_3 \ge 8\), then \(\Lambda\) allows a \(\frac{11}{8}\)-sequence.

In order to prove Lemma 24, starting from each of the bad small components listed above, we successively extend them by adding another bad small component to the configuration, until finding a \(\frac{11}{8}\)-sequence. It turns out that no combination of bad small components with 3-norm greater than 7 was extended. The proof for Lemma 24 is composed of 842 HTML files.

New upper bound

The results presented in the previous section allow us to prove the corollary below. It follows from Proposition 17, part 1 from Lemma 20, which implies that, if we have an odd-length oriented cycle in \({\bar{\iota }}{{\bar{\pi }}}^{-1}\), than we have a 2-move, a (4, 3)-sequence, or this cycle is the bad oriented 5-cycle; and Lemmas 22 and 24 .

Corollary 25

If \(||{\bar{\iota }}{{\bar{\pi }}}^{-1}||_3 \ge 8\), then a \(\frac{11}{8}\)-sequence exists.

On the other hand, if \(||{\bar{\iota }}{{\bar{\pi }}}^{-1}||_3 < 8\), we only guarantee the existence of \(\frac{3}{2}\)-sequences. In the next section, we show that even in this scenario, the approximation ratio obtained by our algorithm is at most 1.375.

Finally, the last results prove the following upper bound for SBT.

Theorem 26

$$\begin{aligned} d({\bar{\pi }})&\le \, 11 \Bigl \lfloor \frac{||{\bar{\iota }}{{\bar{\pi }}}^{-1}||_3}{8} \Bigr \rfloor + \Bigl \lfloor \frac{3(||{\bar{\iota }}{{\bar{\pi }}}^{-1}||_3 \bmod 8)}{2}\Bigr \rfloor \\&\le \; 11 \Bigl \lfloor \frac{n+1-{c^\circ }_{odd}({\bar{\iota }}{{\bar{\pi }}}^{-1})}{16} \Bigr \rfloor + \\&\quad \Bigl \lfloor \frac{3((n+1-{c^\circ }_{odd}({\bar{\iota }}{{\bar{\pi }}}^{-1})) \bmod 16)}{4}\Bigr \rfloor . \end{aligned}$$

Let \(c_{odd}(\pi )\) be the number of odd cycles in \(G(\pi )\) (see first section of Appendix 1). Since \({c^\circ }_{odd}({\bar{\iota }}{{\bar{\pi }}}^{-1})\) \(=c_{odd}(\pi )\), the result above can be restated replacing \({\bar{\pi }}\) and \({c^\circ }_{odd}({\bar{\iota }}{{\bar{\pi }}}^{-1})\), by \(\pi\) and \(c_{odd}(\pi )\) respectively. Thus, we derive the following upper bound for SBT, depending only on n and \(c_{odd}(\pi )\).

Theorem 27

$$\begin{aligned} d(\pi )&\le \; 11 \Bigl \lfloor \frac{n+1-c_{odd}(\pi )}{16} \Bigr \rfloor + \Bigl \lfloor \frac{3((n+1-c_{odd}(\pi )) \bmod 16)}{4}\Bigr \rfloor . \end{aligned}$$

The new upper bound above improves the upper bound on the transposition distance devised by Bafna and Pevzner [5], valid for all \(S_n\), based on their 1.5-approximation algorithm [27]. This upper bound allows us to obtain the following upper bound on the transposition diameter (TD).

Corollary 28

\(TD(n) \le 11 \Bigl \lfloor \frac{n}{16} \Bigr \rfloor + \Bigl \lfloor \frac{3(n \bmod 16)}{4} \Bigr \rfloor\)

The upper bound on the transposition diameter above, although tighter, for \(n \ge 16\), than the one devised by Bafna and Pevzner [5] of \(\left\lfloor \frac{3}{4} n \right\rfloor\) is not tighter than the one devised by Erikson et al. [12] of \(\left\lfloor \frac{2n - 2}{3} \right\rfloor\), for \(n\ge 9\).

A new 1.375-approximation algorithm

In this section, we present a new 1.375-approximation algorithm for SBT (Algorithm 1). For a permutation \(\pi \in S_n\), the algorithm returns an approximated distance between \({{\bar{\pi }}}\) and \({{\bar{\iota }}}\) or, equivalently, between \(\pi\) and \(\iota\). Intuitively, while \(||{\bar{\iota }}{{\bar{\pi }}}^{-1}||_3 \ge 8\), it repeatedly applies \(\frac{11}{8}\)-sequences of transpositions on \({\bar{\pi }}\). When \(||{\bar{\iota }}{{\bar{\pi }}}^{-1}||_3 < 8\), the algorithm only guarantees the application of \(\frac{3}{2}\)-sequences.

To reach the intended approximation ratio of 1.375 even when \(||{\bar{\iota }}{{\bar{\pi }}}^{-1}||_3 < 8\), the algorithm has to search for a (2, 2)-sequence in its first step. In order to identify such a sequence, a look-ahead approach is used, meaning that the algorithm verifies if there is a second 2-move, after applying a first 2-move, generated either from an oriented cycle or from two even-length cycles of \({\bar{\iota }}{{\bar{\pi }}}^{-1}\).

Theorem 29

The time complexity of Algorithm 1 is \(O(n^6)\).

Proof

The time complexity of \(O(n^6)\) is determined by the search for a (2, 2)-sequence. In order not to miss a 2-move, all triplets of an oriented cycle have to be checked to detect an oriented triplet leading to a 2-move, which is \(O(n^3)\). Finding a 2-move by combining three symbols of two even-length cycles of \({\bar{\iota }}{{\bar{\pi }}}^{-1}\) requires \(O(n^2)\). Thus, searching for a (2, 2)-sequence with the look-ahead technique to check if there is an extra 2-move needs time \(O(n^6)\).

The largest loop of the algorithm (line 12) needs time \(O(n^4)\), while the last loop is O(n). \(\square\)

Theorem 30

Algorithm 1 is a 1.375-approximation algorithm for SBT.

Proof

We note that this proof follows a very similar approach to the one used by Elias and Hartman [6]. Let \(f(x)=11 \Bigl \lfloor \frac{x}{8} \Bigr \rfloor + \Bigl \lfloor \frac{3(x \bmod 8)}{2}\Bigr \rfloor\). Depending on line 3, there are two cases.

  1. (1)

    There is a (2, 2)-sequence. As stated by Lemma 10, it is not possible to sort \({\bar{\pi }}\) using a sequence with less than \(||{\bar{\iota }}{{\bar{\pi }}}^{-1}||_3\) 2-moves. Let \(m = ||{\bar{\iota }}{{\bar{\pi }}}^{-1}||_3 - 2\) be the 3-norm of \({\bar{\iota }}{{\bar{\pi }}}^{-1}\) after the application of a (2, 2)-sequence. Algorithm 1 sorts \({\bar{\pi }}\) using a maximum of \(f(m)+2\) transpositions, giving an approximation ratio of at most \(\frac{f(m)+2}{m+2}\). In Table 1, we can see that, \(\frac{f(m)+2}{m+2}\le \frac{11}{8}\), for all \(0\le r\le 7\) such that \(m=8l+r\) and \(l \ge 0\).

  2. (2)

    There is no (2, 2)-sequence. If \(||{\bar{\iota }}{{\bar{\pi }}}^{-1}||_3 = 1\), then there is only one oriented 3-cycle in \({\bar{\iota }}{{\bar{\pi }}}^{-1}\). In this case, there is a 2-move and the theorem holds. Otherwise, we can raise the lower bound of Lemma 10 by 1, since at least one 0-move is required to sort \({\bar{\pi }}\). Let \(m=||{\bar{\iota }}{{\bar{\pi }}}^{-1}||_3\). The approximation ratio given by Algorithm 1 is at most \(\frac{f(m)}{m+1}\). Table 1 also shows that, \(\frac{f(m)}{m+1}\le \frac{11}{8}\), for all \(0\le r\le 7\) such that \(m=8l+r\), \(l \ge 0\).

\(\square\)

Table 1 For all \(0\le r\le 7\) such that \(m=8l+r\) and \(l \ge 0\), the approximation ratio given by Algorithm 1 is at most \(\frac{11}{8}=1.375\)

Results and discussion

We implemented Algorithm 1 and the EH algorithm, having tested both using the Rearrangement Distance Database provided by GRAAu [33]. We computed all transposition distances using both algorithms for all permutations of size n, \(2\le n\le 12\).

As presented by Table 2, the approximation ratio obtained by the EH algorithm exceeds 1.375. On the other hand, our proposed algorithm does not exceed the ratio of \(1.333{\bar{3}}\). However, we presume that approximations of 1.375 could appear for permutations in \(S_n\), \(n \ge 16\), since in order to exist an (11, 8)-sequence, \(Supp({\bar{\iota }}{{\bar{\pi }}}^{-1})\) has to have at least 17 symbols.

Table 2 Comparison of the maximum approximation ratios given by the EH algorithm with ours (Alg1)

We also compared (Table 3) the percentage of computed distances that are equal to transposition distance outputted by our algorithm and EH’s with others available in the literature. In particular, we added to the comparison an algorithm with an approximation ratio higher than 1.5, but with good results [34]; one using a similar algebraic approach [23], 1.5-approximation; and another one that also uses an EH-like strategy with an approximation ratio of 1.375 [9].

Table 3 Comparison of the percentage of computed distances that are equal to transposition distance, given by different algorithms (WDM [15], M [23], BPwh [34] and DD [9]), in comparison to the EH algorithm and ours

As shown by Table 3, regarding the percentage of computed distances that are equal to the transposition distance metric, the best algorithm seems to be the algorithm of Dias and Dias [9], although they do not present results for \(n > 10\). Importantly, this algorithm employs several heuristics, some introduced by a previous work [35], to improve the performance of the EH algorithm. One of these heuristics is exactly a search for a second 2-move using a look-ahead technique. However, it is not clear whether their heuristic never misses a (2, 2)-sequence, if it exists. Also, Dias and Dias [9] does not state the complexity of their algorithm, but we believe that, by analysing the algorithm [35] which they were based on, the time complexity is higher than \(O(n^3)\).

The performance of our algorithm and EH’s were also investigated for longer permutations. For this, we created a dataset of longer permutations with sizes ranging from 20 to 500 (incremented by 10). For each of the 49 sets, 1000 instances were randomly generated and sorted using both algorithms. Figure 1 shows the maximum and the average approximation ratios obtained from both ones. It should be noted that the approximation ratios were calculated in relation to the lower bound given by Theorem 33, since it is impracticable to calculate the exact distance for such long permutations. A similar experiment was conducted by Dias and Dias [35], but in their experiment, they worked with smaller sets, also ranging from 20 to 500 (incremented by 10), but containing only 100 instances. By comparing the results, we may conclude that our algorithm and theirs achieve similar results. Dias and Dias [9] also conducted experiments with longer permutations, but with sizes ranging only from 10 to 100 (incremented by 10), where each set contained 100 instances, and collected the running times. By comparing the results presented in their paper, we may conclude that our algorithm performs better than theirs.

figure a
Fig. 1
figure 1

Average and maximum approximation ratios obtained for each size in our dataset of longer permutations

Figure 2 shows how much time each algorithm (ours and EH’s) took to sort all the 1000 instances of each of the 49 sets. The results presented by this figure show that, despite having a high time complexity, our algorithm has good performance in practice, even outperforming EH’s.

Fig. 2
figure 2

Time in minutes each algorithm took to sort the all the 1, 000 instances of each each size of our dataset of longer permutations

The dataset of longer permutations used in our experiments, the statistics computed, as well as the source code of the implementation of the EH algorithm and ours are available at [31]. All experiments were executed on a computer equiped with a Core i7 vPro \(8^{th}\) Gen processor, with 4 cores and 8 threads, and 48GB of RAM.

Conclusions

In this paper, we first proposed a new upper bound for the transposition distance, using an algebraic approach, which holds for all \(S_n\). Next, we proposed a new approximation algorithm to solve SBT ensuring the 1.375-approximation ratio for all \(S_n\). To the best of our knowledge, this is the first algorithm guaranteeing an approximation ratio below 1.5 not using simplification. We show in Appendix 1 that the EH algorithm may require one extra transposition above the 1.375-approximation ratio. This occurs when there is a first (2, 2)-sequence in the original permutation that is “missed” during simplification, and bad small components remain in the cycle graph after the application of any number of \(\frac{11}{8}\)-sequences.

Implementations of the EH algorithm and ours were tested against permutations of maximum length of 12. The results showed that our algorithm does not exceed the 1.375-approximation ratio and produces a higher percentage of computed distances that are equal to transposition distance, when compared to those computed by the EH algorithm. These percentages were also compared to others available in the literature. Considering this metric, the algorithm with the best results seems to be the one of Dias and Dias [9], although they do not present results for \(n > 10\). Two other issues were identified when implementing the EH algorithm and they are reported in the Appendix 3. The first one has to do with the application of \(\frac{11}{8}\)-sequences when the cycle graph contains only bad small components [6]. The second one is related to the application of (3, 2)-sequences when there is no \(\frac{11}{8}\)-sequence to apply, and affects both versions of the algorithm outlined in [6] and [28].

We conducted an experiment involving longer permutations of maximum length 500. The results showed that our algorithm outperforms the EH algorithm, both in relation to the approximation ratios obtained and running times. Still, on the longer permutations, our algorithm seems to be comparable to the one of Dias and Dias [35], when we consider the approximation ratios obtained by both. Regarding the running times, Dias and Dias [35] also performed some simulations for permutations with a maximum size of 100. Considering only the results for permutations with this maximum size, our algorithm seems faster.

The time complexity of our algorithm is high. A possible future work could be the investigation of a more efficient way to find a (2, 2)-sequence at the beginning of our algorithm. Following a different direction, another future work could be the investigation of “good” simplifications, i.e., simplifications that do not have the effect of missing a (2, 2)-sequence when it exists. We have no clue whether such a “good” simplification always exists or not. In any case, we have the intuition that to find it, if it exists, the computational cost would be the same as searching for a (2, 2)-sequence.

The experiment with small permutations of maximum length 12 showed that the percentages of computed distances by our algorithm that are equal to transposition distance are low compared to others in the literature. A possible way to improve the results would be investigating the adoption of heuristics.

Finally, we intend to use the algebraic approach presented in this paper to study and solve other rearrangement events affecting one chromosome, e.g., reversals and block-interchange.