next up previous
Next: The Overlap Graph Up: An Algorithm for Sorting Previous: Definitions

     
The Breakpoint Graph

The breakpoint graph $B(\pi )$ of a permutation $\pi =
(\pi_1,\ldots,\pi_n)$ is an edge colored graph on n+2 vertices $\{\pi_0,\pi_1,\ldots,\pi_n+1\}=\{0,1,\ldots,n+1\}$. We join vertices $\pi_i$ and $\pi_j$ by a black edge if $(\pi_i,\pi_j)$ is a breakpoint in $\pi $ and by a gray edge if (i,j) is a breakpoint in $\pi^{-1}$. We now define a one-to-one mapping u from the set of signed permutations of order n into the set of unsigned permutations of order 2n. Let $\pi $ be a signed permutation. To obtain $u(\pi)$ replace each positive element x in $\pi $ by 2x-1 and 2x, and each negative element -x by 2x and 2x-1. For any signed permutation $\pi $, let $B(\pi) =
B(u(\pi))$. This description of $B(\pi )$ is equivalent to the following description: given a permutation $\pi =
(\pi_1,\ldots,\pi_n)$, obtain a 2n+2 vertices graph by replacing each positive element x in $\pi $ by 2x-1 and 2x, each negative element -x by 2x and 2x-1, and augment with begin and end vertices, 0 and 2n+1. Black edges connect vertices $\pi_{2i},\pi_{2i+1}$ and gray edges connect vertices 2i and 2i+1. From now on we limit the discussion to signed permutations. Note that in $B(\pi )$ every vertex is either isolated or incident with exactly one black edge and one gray edge. Therefore, there is a unique decomposition of $B(\pi )$ into cycles. The edges of each cycle are alternating gray and black. Call a reversal $\rho(i,j)$ such that i is odd and j even an even reversal. An even reversal $\rho(2i+1,2j)$ on $u(\pi)$ mimics the reversal $\rho(i+1,j)$ on $\pi $. Thus, sorting $\pi $ by reversals is equivalent to sorting the unsigned permutation $u(\pi)$ by even reversals. From now on we will consider the latter problem and by reversals we will always mean an even reversal. Let $b(\pi)=b(u(\pi))$ and let $c(\pi)$ be the number of cycles in $B(\pi )$. Figure 11.9(a) shows the breakpoint graph of the permutation $\pi = (4,-3,1,-5,-2,7,6)$. It has eight breakpoints and decomposes into two alternating cycles, i.e. $b(\pi) = 8$, and $c(\pi) = 2$. The two cycles are shown in figure 11.9(b). Figure 11.9(a) shows the breakpoint graph of $\bar{\pi} = (4,-3,1,2,5,7,6)$ that has seven breakpoints and decomposes into two cycles. For an arbitrary reversal $\rho$ on a permutation $\pi $, define $\Delta b(\pi,\rho) = b(\pi,\rho)-b(\pi)$ and $\Delta c(\pi,\rho)
= c(\pi,\rho)-c(\pi)$. When the reversal $\rho$ and the permutation $\pi $ will be clear from the context we will abbreviate $\Delta b(\pi,\rho)$ to $\Delta b$ and $\Delta
c(\pi,\rho)$ to $\Delta c$. As Bafna and Pevzner [3] observed, the following values are taken by $\Delta b$ and $\Delta c$ depending on the types of the gaps $\rho(i,j)$ acts on (see figure 11.8):
1.
Two adjacencies: $\Delta c= 1$ and $\Delta b= 2$.
2.
A breakpoint and an adjacency: $\Delta c=0$ and $\Delta b=1$.
3.
Two breakpoints each belonging to a different cycle: $\Delta b=0$, $\Delta c=-1$.
4.
Two breakpoints of the same cycle C:
a. $(\pi_i,\pi_{j+1})$ and $(\pi_{i-1},\pi_j)$ are gray edges: $\Delta c=-1$, $\Delta b=-2$.
b. Exactly one of $(\pi_i,\pi_{j+1})$ and $(\pi_{i-1},\pi_j)$ is a gray edge: $\Delta c=0$, $\Delta b=-1$.
c. Neither $(\pi_i,\pi_{j+1})$ nor $(\pi_{i-1},\pi_j)$ is a gray edge, and when breaking C at i and j vertices i-1 and j+1 end up in the same path: $\Delta b=0$, $\Delta c=0$.
d. Neither $(\pi_i,\pi_{j+1})$ nor $(\pi_{i-1},\pi_j)$ is a gray edge, and when breaking C at i and j vertices i-1 and j+1 end up in different paths: $\Delta b=0$, $\Delta c= 1$.
An alternative construction of the breakpoint graph constructs $B'(\pi)$, with vertices $0,\ldots,2n+1$, black edges $(\pi_{2i},\pi_{2i+1})$, and grey edges (2i,2i+1) for all $i=0,\ldots,n$. All vertices of $B'(\pi)$ are in disjoint cycles, with the number of cycles in $B'(\pi)$ being $(n+1-(b(\pi)-c(\pi))$. The signed identity permutation has n+1 cycles in B'(id), and sorting $\pi $ means increasing the number of cycles in $B'(\pi)$. Notice that in this formulation all reversals are one of three types:

Theorem 11.8   [3] The number of reversals needed to sort a permutation $\pi $ is at least $b(\pi) -
c(\pi)$, where $b(\pi)$ is the number of breakpoints in $\pi $ and $c(\pi)$ is the number of cycles in $B\pi$ (which is also the number of nontrivial cycles in $B'(\pi)$.

Proof:The identity permutation has no breakpoints and no non-trivial cycles, thus b(id)-c(id)=0. We have seen that every reversal changes $\Delta b- \Delta c$ by at most 1, Therefore we need at least $b(\pi) -
c(\pi)$ reversals to sort $\pi $.
A simpler proof argues that the number of cycles in $B'(\pi)$ increases by at most 1 for every reversal.
  
Figure: All possible cases of changes to $\Delta b$ and $\Delta c$ by applying a reversal (see section 11.4.4 ).
\begin{figure}
\psfig{figure=lec11_fig/lec11_Rev.eps}
\end{figure}

Call a reversal proper if $\Delta b-\Delta c= -1$, i.e. it is either of type 4a, 4b, or 4d. We say that a reversal $\rho$ acts on a gray edge e if it acts on the breakpoints which correspond to the black edges incident with e. A gray edge is oriented if a reversal acting on it is proper, otherwise it is unoriented. Notice that a gray edge $(\pi_k,\pi_l)$ is oriented if and only if k+l is even. For example, the gray edge (0,1) in the graph of figure 11.9(a) is unoriented, while the gray edge (7,6) is oriented.
  
Figure: a) The breakpoint graph, $B(\pi )$, of the permutation $\pi = (4,-3,1,-5,-2,7,6)$. Black edges are solid; gray edges are dashed; oriented edges are bold. b) $B(\pi )$ decomposes into two disjoint alternating cycles. c) The overlap graph, $OV(\pi )$. Black vertices correspond to oriented edges.
\begin{figure}
\psfig{figure=lec11_fig/lec11_overlap.eps}
\end{figure}


next up previous
Next: The Overlap Graph Up: An Algorithm for Sorting Previous: Definitions
Itshack Pe`er
1999-03-16