AlgoPerm2012 - 14 Jean-Luc Baril

66
Introduction Tandem Duplication Mirror Duplication Whole Mirror Duplication Random Loss Model and Pattern Avoiding Permutations Jean-Luc Baril and R´ emi Vernay [email protected] http://jl.baril.u-bourgogne.fr Laboratory LE2I – University of Burgundy – Dijon Jean-Luc Baril WM Duplication Random Loss Model

description

Jean-Luc Baril (LE2I, Université de Bourgogne) Whole Mirror Duplication-Random Loss Model and Pattern Avoiding Permutations Algorithms & Permutations 2012, Paris. http://igm.univ-mlv.fr/AlgoB/algoperm2012/

Transcript of AlgoPerm2012 - 14 Jean-Luc Baril

Page 1: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

Whole Mirror Duplication Random Loss Model and

Pattern Avoiding Permutations

Jean-Luc Baril and Remi [email protected]

http://jl.baril.u-bourgogne.fr

Laboratory LE2I – University of Burgundy – Dijon

Jean-Luc Baril WM Duplication Random Loss Model

Page 2: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

The Genome - DefinitionPattern in permutations

Some definitions and notations

genome = set of chromosomeschromosome = sequence of genesgene = sequence of Adenine, Guanine, Cytosine, Thynmine(AGCT)genome → n-length permutation σ = σ1σ2σ3 . . . σnSn = the set of n-length permutations

Graphical representation of the permutation

σ = 8 4 6 2 5 7 1 3

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

8 4 6 2 5 7 1 3Jean-Luc Baril WM Duplication Random Loss Model

Page 3: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

The Genome - DefinitionPattern in permutations

Let σ = σ1σ2 . . . σn be a permutation:

ascent → σi < σi+1

run up → σi < σi+1 < · · · < σj

descent, run-down

valley → σi−1 > σi < σi+1

Alternating permutation → σ1 > σ2 < σ3 > σ4 < σ5 > · · ·

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 4: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

The Genome - DefinitionPattern in permutations

Let σ = σ1σ2 . . . σn be a permutation:

ascent → σi < σi+1

run up → σi < σi+1 < · · · < σj

descent, run-down

valley → σi−1 > σi < σi+1

Alternating permutation → σ1 > σ2 < σ3 > σ4 < σ5 > · · ·

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 5: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

The Genome - DefinitionPattern in permutations

Let σ = σ1σ2 . . . σn be a permutation:

ascent → σi < σi+1

run up → σi < σi+1 < · · · < σj

descent, run-down

valley → σi−1 > σi < σi+1

Alternating permutation → σ1 > σ2 < σ3 > σ4 < σ5 > · · ·

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 6: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

The Genome - DefinitionPattern in permutations

Let σ = σ1σ2 . . . σn be a permutation:

ascent → σi < σi+1

run up → σi < σi+1 < · · · < σj

descent, run-down

valley → σi−1 > σi < σi+1

Alternating permutation → σ1 > σ2 < σ3 > σ4 < σ5 > · · ·

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 7: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

The Genome - DefinitionPattern in permutations

Let σ = σ1σ2 . . . σn be a permutation:

ascent → σi < σi+1

run up → σi < σi+1 < · · · < σj

descent, run-down

valley → σi−1 > σi < σi+1

Alternating permutation → σ1 > σ2 < σ3 > σ4 < σ5 > · · ·

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 8: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

The Genome - DefinitionPattern in permutations

Definition:

σ ∈ Sn contains the pattern π ∈ Sk (π � σ) if:∃1 ≤ i1 < i2 < · · · < ik ≤ n such that σi1σi2 . . . σik isorder-isomorphic to π, i.e.,

∀1 ≤ u, v ≤ k , σiu < σiv ⇔ πu < πv .

Example: σ = 8 4 6 2 5 7 1 3 contains the pattern π = 4132

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

8 4 6 2 5 7 1 3

Jean-Luc Baril WM Duplication Random Loss Model

Page 9: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

The Genome - DefinitionPattern in permutations

Class of permutations

C is a class of permutations if C is stable for the relation �

σ ∈ C and π � σ ⇒ π ∈ C.

Basis for a class of permutations

A class C of permutations is characterized by its basis B :

B = {σ /∈ C,∀π ≺ σ with π 6= σ, π ∈ C}

We have C = S(B) where S(B) is the class of permutationsavoiding all patterns in B .

Jean-Luc Baril WM Duplication Random Loss Model

Page 10: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelReferences - known results

The tandem duplication random-loss process

* This model is well-known in the evolutionary biology literature.* Used for vertebrate mitochondrial genomes

1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8

1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8

1 2 4 5 7 3 6 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 11: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelReferences - known results

The tandem duplication random-loss process

* This model is well-known in the evolutionary biology literature.* Used for vertebrate mitochondrial genomes

1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8

(duplication)

1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8

1 2 4 5 7 3 6 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 12: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelReferences - known results

The tandem duplication random-loss process

* This model is well-known in the evolutionary biology literature.* Used for vertebrate mitochondrial genomes

1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8

(duplication)

1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8

(random loss)

1 2 4 5 7 3 6 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 13: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelReferences - known results

The tandem duplication random-loss process

* This model is well-known in the evolutionary biology literature.* Used for vertebrate mitochondrial genomes

1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8

(duplication)

1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8

(random loss)

1 2 4 5 7 3 6 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 2 3 4 1 2 3 4 5 6 7 8 5 14 15 16

1 1

2 2

3 3

4 4

5 5

6 6

7 7

8 8

Jean-Luc Baril WM Duplication Random Loss Model

Page 14: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelReferences - known results

2006 K. Chaudhuri, K. Chen, R. Mihaescu and S. RaoOn the tandem duplication-random loss model

of genome rearrangement,SODATandem duplication random-loss process of aninterval of size K ;Efficient algorithm for the distance between 2genomes

Jean-Luc Baril WM Duplication Random Loss Model

Page 15: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelReferences - known results

2006 K. Chaudhuri, K. Chen, R. Mihaescu and S. Rao

On the tandem duplication-random loss model of genome rearrangement,SODA

2009 M. Bouvel and D. RossinA variant of the tandem duplication-random loss

model of genome rearrangement, TCS

Permutations obtained after p duplications of aninterval of size K define a class of permutationsavoiding some patterns in B .B = set of minimal permutations with d = 2p

descents.

Jean-Luc Baril WM Duplication Random Loss Model

Page 16: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelReferences - known results

2006 K. Chaudhuri, K. Chen, R. Mihaescu and S. Rao

On the tandem duplication-random loss model of genome rearrangement,SODA

2009 M. Bouvel and D. Rossin

A variant of the tandem duplication-random loss model of genome rearrangement, TCS

2010 M. Bouvel and E. PergolaPosets and permutations in the duplication-loss

model: minimal permutations with d descents,Theoretical Computer Science

enumeration minimal permutations of sizen = d + 1, d + 2, 2d ;

Jean-Luc Baril WM Duplication Random Loss Model

Page 17: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelReferences - known results

2006 K. Chaudhuri, K. Chen, R. Mihaescu and S. Rao

On the tandem duplication-random loss model of genome rearrangement,SODA

2009 M. Bouvel and D. Rossin

A variant of the tandem duplication-random loss model of genome rearrangement, TCS

2010 M. Bouvel and E. Pergola

Posets and permutations in the duplication-loss model: minimal permutations with d

descents, Theoretical Computer Science

2010 T. Mansour and S. H.F. YanMinimal permutations with d descents, EuropeanJournal of Combinatorics

enumeration minimal permutations of sizen = 2d − 1

Jean-Luc Baril WM Duplication Random Loss Model

Page 18: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelReferences - known results

2006 K. Chaudhuri, K. Chen, R. Mihaescu and S. Rao

On the tandem duplication-random loss model of genome rearrangement,SODA

2009 M. Bouvel and D. Rossin

A variant of the tandem duplication-random loss model of genome rearrangement, TCS

2010 M. Bouvel and E. Pergola

Posets and permutations in the duplication-loss model: minimal permutations with d

descents, Theoretical Computer Science

2010 T. Mansour and S. H.F. Yan

Minimal permutations with d descents, European Journal of Combinatorics

2010 M. Bouvel and L. FerrariOn the enumeration of d-minimal permutations,Arxiv

prove that the number of minimal permutations withd descents can be obtained by computing somedeterminants, but they cannot provide a generalclosed formula

Jean-Luc Baril WM Duplication Random Loss Model

Page 19: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

The whole mirror duplication random-loss process

1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 8 7 6 5 4 3 2 1

1 2 3 4 5 6 7 8 8 7 6 5 4 3 2 1

1 4 5 7 8 6 3 2

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 20: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

The whole mirror duplication random-loss process

1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 8 7 6 5 4 3 2 1

(mirror duplication)

1 2 3 4 5 6 7 8 8 7 6 5 4 3 2 1

1 4 5 7 8 6 3 2

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 21: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

The whole mirror duplication random-loss process

1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 8 7 6 5 4 3 2 1

(mirror duplication)

1 2 3 4 5 6 7 8 8 7 6 5 4 3 2 1

(random loss)

1 4 5 7 8 6 3 2

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 22: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

The whole mirror duplication random-loss process

1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 8 7 6 5 4 3 2 1

(mirror duplication)

1 2 3 4 5 6 7 8 8 7 6 5 4 3 2 1

(random loss)

1 4 5 7 8 6 3 2

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 2 3 4 1 2 3 4 5 6 7 8 13 14 15 16

1 1

2 2

3 3

4 4

5 5

6 6

7 7

8 8

Jean-Luc Baril WM Duplication Random Loss Model

Page 23: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Theorem 1

The class C(p) of permutations obtained from the identity after agiven number p of whole mirror duplications is the class ofpermutations with at most 2p−1 − 1 valleys.

2p−2 − 1 valleys

Jean-Luc Baril WM Duplication Random Loss Model

Page 24: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Theorem 1

The class C(p) of permutations obtained from the identity after agiven number p of whole mirror duplications is the class ofpermutations with at most 2p−1 − 1 valleys.

2p−1 − 1 = 2p−2 − 1 + 2p−2 − 1 + 1 valleys

Jean-Luc Baril WM Duplication Random Loss Model

Page 25: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

2p−2 − 1 < k valleys ≤ 2p−1 − 1

Jean-Luc Baril WM Duplication Random Loss Model

Page 26: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

2p−2 − 1 valleys

Jean-Luc Baril WM Duplication Random Loss Model

Page 27: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Jean-Luc Baril WM Duplication Random Loss Model

Page 28: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Jean-Luc Baril WM Duplication Random Loss Model

Page 29: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Jean-Luc Baril WM Duplication Random Loss Model

Page 30: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Theorem 2

The class C(p) of permutations obtained after a given number p ofwhole mirror duplications is the class of permutations avoiding thealternating permutations of length 2p + 1.

For p = 1, C(1) = S(213, 312)For p = 2, C(2) =S(21435, 31425, 41325, 32415, 42315, 21534, 31524, 51324, 32514,52314, 41523, 51423, 42513, 52413, 43512, 53412)

|C(p)| given by the generating function:

1

1− y

(

1− 1

y+

1

y

y − 1 · tan(

x√

y − 1 + arctan

(

1√y − 1

)))

Jean-Luc Baril WM Duplication Random Loss Model

Page 31: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Algorithm 1 for a shortest path from 12 · · · n to σ ∈ Sn.

1 3 6 2 5 7 4 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Complexity: O(n · log val(σ)) < O(n · log n)

Jean-Luc Baril WM Duplication Random Loss Model

Page 32: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Algorithm 1 for a shortest path from 12 · · · n to σ ∈ Sn.

1 3 6 2 5 7 4 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 3 4 6 7 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Complexity: O(n · log val(σ)) < O(n · log n)

Jean-Luc Baril WM Duplication Random Loss Model

Page 33: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Algorithm 1 for a shortest path from 12 · · · n to σ ∈ Sn.

1 3 6 2 5 7 4 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 3 4 6 7 8 5 2

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Complexity: O(n · log val(σ)) < O(n · log n)

Jean-Luc Baril WM Duplication Random Loss Model

Page 34: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Algorithm 1 for a shortest path from 12 · · · n to σ ∈ Sn.

1 3 6 2 5 7 4 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

⇒ O(n) 1 3 6 8 4 2 5 7

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 2 3 4 5 6 7 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Complexity: O(n · log val(σ)) < O(n · log n)

Jean-Luc Baril WM Duplication Random Loss Model

Page 35: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Algorithm 2 for a shortest path from 12 · · · n to σ ∈ Sn.

Step 1 – We label the runs up and runs down with the BinaryReflected Gray Code (F. Gray [1953], Bitner, Ehrlich, Reingold[1976])

Bn = 0Bn−1 ◦ 1Bn−1

000001011010

110111101100

Jean-Luc Baril WM Duplication Random Loss Model

Page 36: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Algorithm 2 for a shortest path from 12 · · · n to σ ∈ Sn.

Step 1 – We label the runs up and runs down with the BinaryReflected Gray Code (F. Gray [1953], Bitner, Ehrlich, Reingold[1976])

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Bn = 0Bn−1 ◦ 1Bn−1

000001011010

110111101100

Jean-Luc Baril WM Duplication Random Loss Model

Page 37: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Algorithm 2 for a shortest path from 12 · · · n to σ ∈ Sn.

Step 1 – We label the runs up and runs down with the BinaryReflected Gray Code (F. Gray [1953], Bitner, Ehrlich, Reingold[1976])

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

136 000

Bn = 0Bn−1 ◦ 1Bn−1

000001011010

110111101100

Jean-Luc Baril WM Duplication Random Loss Model

Page 38: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Algorithm 2 for a shortest path from 12 · · · n to σ ∈ Sn.

Step 1 – We label the runs up and runs down with the BinaryReflected Gray Code (F. Gray [1953], Bitner, Ehrlich, Reingold[1976])

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

136

2

000

001

Bn = 0Bn−1 ◦ 1Bn−1

000001011010

110111101100

Jean-Luc Baril WM Duplication Random Loss Model

Page 39: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Algorithm 2 for a shortest path from 12 · · · n to σ ∈ Sn.

Step 1 – We label the runs up and runs down with the BinaryReflected Gray Code (F. Gray [1953], Bitner, Ehrlich, Reingold[1976])

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

136

2

57

000

001

011

Bn = 0Bn−1 ◦ 1Bn−1

000001011010

110111101100

Jean-Luc Baril WM Duplication Random Loss Model

Page 40: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Algorithm 2 for a shortest path from 12 · · · n to σ ∈ Sn.

Step 1 – We label the runs up and runs down with the BinaryReflected Gray Code (F. Gray [1953], Bitner, Ehrlich, Reingold[1976])

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

136

2

57

4

000

001

011

010

Bn = 0Bn−1 ◦ 1Bn−1

000001011010

110111101100

Jean-Luc Baril WM Duplication Random Loss Model

Page 41: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Algorithm 2 for a shortest path from 12 · · · n to σ ∈ Sn.

Step 1 – We label the runs up and runs down with the BinaryReflected Gray Code (F. Gray [1953], Bitner, Ehrlich, Reingold[1976])

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

136

2

57

4

8

000

001

011

010

110

Bn = 0Bn−1 ◦ 1Bn−1

000001011010

110111101100

Jean-Luc Baril WM Duplication Random Loss Model

Page 42: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Step 2 – We construct the path

136

2

57

4

8

000

001

011

010

1101 2 3 4 5 6 7 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 43: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Step 2 – We construct the path

1136

2

57

4

8

0000

001

011

010

110

1 2 3 4 5 6 7 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 44: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Step 2 – We construct the path

136

22

57

4

8

000

0011

011

010

110

1 2 3 4 5 6 7 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 45: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Step 2 – We construct the path

1336

2

57

4

8

0000

001

011

010

110

1 2 3 4 5 6 7 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 46: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Step 2 – We construct the path

136

2

57

44

8

000

001

011

0100

110

1 2 3 4 5 6 7 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 47: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Step 2 – We construct the path

136

2

557

4

8

000

001

0111

010

110

1 2 3 4 5 6 7 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 48: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Step 2 – We construct the path

1366

2

57

4

8

0000

001

011

010

110

1 2 3 4 5 6 7 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 49: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Step 2 – We construct the path

136

2

577

4

8

000

001

0111

010

110

1 2 3 4 5 6 7 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 50: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Step 2 – We construct the path

136

2

57

4

88

000

001

011

010

1100

1 2 3 4 5 6 7 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 51: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Step 2 – We construct the path

136

2

57

4

8

000

001

011

010

1101 2 3 4 5 6 7 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 3 4 6 8 7 5 2

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 52: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Step 2 – We construct the path

1136

2

57

4

8

0000

001

011

010

110

1 2 3 4 5 6 7 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 3 4 6 8 7 5 2

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 53: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Step 2 – We construct the path

1336

2

57

4

8

0000

001

011

010

110

1 2 3 4 5 6 7 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 3 4 6 8 7 5 2

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 54: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Step 2 – We construct the path

136

2

57

44

8

000

001

011

0110

110

1 2 3 4 5 6 7 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 3 4 6 8 7 5 2

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 55: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Step 2 – We construct the path

1366

2

57

4

8

0000

001

011

010

110

1 2 3 4 5 6 7 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 3 4 6 8 7 5 2

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 56: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Step 2 – We construct the path

136

2

57

4

88

000

001

011

010

1110

1 2 3 4 5 6 7 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 3 4 6 8 7 5 2

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 57: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Step 2 – We construct the path

136

2

577

4

8

000

001

0111

010

110

1 2 3 4 5 6 7 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 3 4 6 8 7 5 2

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 58: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Step 2 – We construct the path

136

2

557

4

8

000

001

0111

010

110

1 2 3 4 5 6 7 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 3 4 6 8 7 5 2

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 59: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Step 2 – We construct the path

136

22

57

4

8

000

0001

011

010

110

1 2 3 4 5 6 7 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 3 4 6 8 7 5 2

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 60: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Step 2 – We construct the path

136

2

57

4

8

000

001

011

010

1101 2 3 4 5 6 7 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 3 4 6 8 7 5 2

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 3 6 2 5 7 8 4

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 61: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Step 2 – We construct the path

113366

22

5577

4

8

0000

0001

0011

010

110

1 2 3 4 5 6 7 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 3 4 6 8 7 5 2

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 3 6 2 5 7 8 4

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 62: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Step 2 – We construct the path

136

2

57

4

88

000

001

011

010

1110

1 2 3 4 5 6 7 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 3 4 6 8 7 5 2

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 3 6 2 5 7 8 4

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 63: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Step 2 – We construct the path

136

2

57

44

8

000

001

011

0010

110

1 2 3 4 5 6 7 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 3 4 6 8 7 5 2

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 3 6 2 5 7 8 4

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 64: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Step 2 – We construct the path

136

2

57

4

8

000

001

011

010

1101 2 3 4 5 6 7 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 3 4 6 8 7 5 2

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 3 6 2 5 7 8 4

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

1 3 6 2 5 7 4 8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

Jean-Luc Baril WM Duplication Random Loss Model

Page 65: AlgoPerm2012 - 14 Jean-Luc Baril

IntroductionTandem DuplicationMirror Duplication

ModelTheoremsAlgo σ → 12 · · · nAlgo 12 · · · n → σ

Complexity

One step requires : O(n)Whole process : O(n · log val(σ)) < O(n · log n)

Jean-Luc Baril WM Duplication Random Loss Model

Page 66: AlgoPerm2012 - 14 Jean-Luc Baril