Transcript
Page 1: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Permutation Pattern Matching for SeparablePermutations.

Both Emerite Neou1, Romeo Rizzi 2, Stephane Vialette1

Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454,Marne-la-Vallee, France

{neou,vialette}@univ-mlv.fr

Department of Computer Science, Universita degli Studi di Verona, [email protected]

October 20, 2016

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 1 / 32

Page 2: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Plan

1 Introduction

2 Definition

3 Core of The Algorithms

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 2 / 32

Page 3: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Permutation.

Permutation

Two orders over a finite set.

Usually the ordered set is a set of integers.

Written as word π = π[1]π[2] . . . π[n].

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 3 / 32

Page 4: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Plot of a Permutation.

We associate a figure to a permutation called a plot.

Each element of a permutation is represented by the point (i , π[i ]).

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 4 / 32

Page 5: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Example : the plot of the permutation 3 2 8 5.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 5 / 32

Page 6: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Reduced form of a permutation and reduction.

Reduced Form of a Permutation

The elements are the first n integers.

Obtained by reducing a permutation.

If π is on the set {e1, e2, . . . , en} where the naturall order ise1 < e2 < . . . < en, we obtain the reduced form of π by renamingevery ei by i .

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 6 / 32

Page 7: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Example : reduced form of the permutation 3 2 8 5.

2 < 3 < 5 < 8

2 becomes 13 becomes 25 becomes 38 becomes 4

3 2 8 5 becomes 2 1 4 3

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 7 / 32

Page 8: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Example : reduced form of the permutation 3 2 8 5.

2 < 3 < 5 < 8

2 becomes 13 becomes 25 becomes 38 becomes 4

3 2 8 5 becomes 2 1 4 3

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 7 / 32

Page 9: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Example : reduced form of the permutation 3 2 8 5.

2 < 3 < 5 < 8

2 becomes 1

3 becomes 25 becomes 38 becomes 4

3 2 8 5 becomes 2 1 4 3

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 7 / 32

Page 10: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Example : reduced form of the permutation 3 2 8 5.

2 < 3 < 5 < 8

2 becomes 13 becomes 2

5 becomes 38 becomes 4

3 2 8 5 becomes 2 1 4 3

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 7 / 32

Page 11: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Example : reduced form of the permutation 3 2 8 5.

2 < 3 < 5 < 8

2 becomes 13 becomes 25 becomes 3

8 becomes 4

3 2 8 5 becomes 2 1 4 3

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 7 / 32

Page 12: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Example : reduced form of the permutation 3 2 8 5.

2 < 3 < 5 < 8

2 becomes 13 becomes 25 becomes 38 becomes 4

3 2 8 5 becomes 2 1 4 3

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 7 / 32

Page 13: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Example : reduced form of the permutation 3 2 8 5.

2 < 3 < 5 < 8

2 becomes 13 becomes 25 becomes 38 becomes 4

3 2 8 5 becomes 2 1 4 3

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 7 / 32

Page 14: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Occurrence

Occurrence

A mapping φ from a permutation pattern σ to a permutation text π is anoccurrence of σ in π.

⇐⇒

The mapping is increasing and σ[i ] < σ[j ] iff π[φ(i)] < π[φ(j)].

⇐⇒

The reduced form of the permutation given by the mapped elements is thesame as the pattern.

We say that σ occurs in π if such mapping exists.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 8 / 32

Page 15: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Occurrence

Occurrence

A mapping φ from a permutation pattern σ to a permutation text π is anoccurrence of σ in π.

⇐⇒

The mapping is increasing and σ[i ] < σ[j ] iff π[φ(i)] < π[φ(j)].

⇐⇒

The reduced form of the permutation given by the mapped elements is thesame as the pattern.

We say that σ occurs in π if such mapping exists.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 8 / 32

Page 16: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Occurrence

Occurrence

A mapping φ from a permutation pattern σ to a permutation text π is anoccurrence of σ in π.

⇐⇒

The mapping is increasing and σ[i ] < σ[j ] iff π[φ(i)] < π[φ(j)].

⇐⇒

The reduced form of the permutation given by the mapped elements is thesame as the pattern.

We say that σ occurs in π if such mapping exists.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 8 / 32

Page 17: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Occurrence

Occurrence

A mapping φ from a permutation pattern σ to a permutation text π is anoccurrence of σ in π.

⇐⇒

The mapping is increasing and σ[i ] < σ[j ] iff π[φ(i)] < π[φ(j)].

⇐⇒

The reduced form of the permutation given by the mapped elements is thesame as the pattern.

We say that σ occurs in π if such mapping exists.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 8 / 32

Page 18: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Example : occurrence of 51342 in 391867452.

The mapping that map :1 to 2,

2 to 3,

3 to 5,

4 to 6 and

5 to 8

5 1 3 4 2

3 9 1 8 6 7 4 5 2

is an occurrence because:

the i th element of the mapping has the same position in the naturalorder than the i th element in σ.

the permutation π[2]π[3]π[5]π[6]π[8] = 91675 is reduced to 51342.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 9 / 32

Page 19: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Example : occurrence of 51342 in 391867452.

The mapping that map :1 to 2,

2 to 3,

3 to 5,

4 to 6 and

5 to 8

5 1 3 4 2

3 9 1 8 6 7 4 5 2

is an occurrence because:

the i th element of the mapping has the same position in the naturalorder than the i th element in σ.

the permutation π[2]π[3]π[5]π[6]π[8] = 91675 is reduced to 51342.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 9 / 32

Page 20: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Example : occurrence of 51342 in 391867452.

The mapping that map :1 to 2,

2 to 3,

3 to 5,

4 to 6 and

5 to 8

5 1 3 4 2

3 9 1 8 6 7 4 5 2

is an occurrence because:

the i th element of the mapping has the same position in the naturalorder than the i th element in σ.

the permutation π[2]π[3]π[5]π[6]π[8] = 91675 is reduced to 51342.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 9 / 32

Page 21: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Example : occurrence of 51342 in 391867452.

The mapping that map :1 to 2,

2 to 3,

3 to 5,

4 to 6 and

5 to 8

5 1 3 4 2

3 9 1 8 6 7 4 5 2

is an occurrence because:

the i th element of the mapping has the same position in the naturalorder than the i th element in σ.

the permutation π[2]π[3]π[5]π[6]π[8] = 91675 is reduced to 51342.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 9 / 32

Page 22: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Example : occurrence of 51342 in 391867452.

The mapping that map :1 to 2,

2 to 3,

3 to 5,

4 to 6 and

5 to 8

5 1 3 4 2

3 9 1 8 6 7 4 5 2

is an occurrence because:

the i th element of the mapping has the same position in the naturalorder than the i th element in σ.

the permutation π[2]π[3]π[5]π[6]π[8] = 91675 is reduced to 51342.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 9 / 32

Page 23: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Example : occurrence of 51342 in 391867452.

The mapping that map :1 to 2,

2 to 3,

3 to 5,

4 to 6 and

5 to 8

5 1 3 4 2

3 9 1 8 6 7 4 5 2

is an occurrence because:

the i th element of the mapping has the same position in the naturalorder than the i th element in σ.

the permutation π[2]π[3]π[5]π[6]π[8] = 91675 is reduced to 51342.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 9 / 32

Page 24: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Example : occurrence of 51342 in 391867452.

The mapping that map :1 to 2,

2 to 3,

3 to 5,

4 to 6 and

5 to 8

5 1 3 4 2

3 9 1 8 6 7 4 5 2is an occurrence because:

the i th element of the mapping has the same position in the naturalorder than the i th element in σ.

the permutation π[2]π[3]π[5]π[6]π[8] = 91675 is reduced to 51342.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 9 / 32

Page 25: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Example : occurrence of 51342 in 391867452.

The mapping that map :1 to 2,

2 to 3,

3 to 5,

4 to 6 and

5 to 8

5 1 3 4 2

3 9 1 8 6 7 4 5 2is an occurrence because:

the i th element of the mapping has the same position in the naturalorder than the i th element in σ.

the permutation π[2]π[3]π[5]π[6]π[8] = 91675 is reduced to 51342.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 9 / 32

Page 26: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Example : occurrence of 51342 in 391867452.

The plot of 51342 and 391867452.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 10 / 32

Page 27: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Example : occurrence of 51342 in 391867452.

91674 is an occurrence.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 11 / 32

Page 28: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Permutation Pattern Matching Problem.

Permutation Pattern Matching Problem

Given a pattern σ of size k and a text π of size n, we want to decidewhether σ occurs in π.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 12 / 32

Page 29: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Permutation Pattern Matching Problem.

The problem is NP-Complete (Bose et al. 1993). But

It can be solved in O(1.79O(n)) (Ahal et al. 2008).

It can be solved in O(n.2O(k2 log k)) : the problem is fixed-parametertractable parameterized by the size of σ (Guillemot and Marx 2013).

Some variants of this problem are solved in polynomial time.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 13 / 32

Page 30: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Permutation Pattern Matching Problem.

The problem is NP-Complete (Bose et al. 1993). But

It can be solved in O(1.79O(n)) (Ahal et al. 2008).

It can be solved in O(n.2O(k2 log k)) : the problem is fixed-parametertractable parameterized by the size of σ (Guillemot and Marx 2013).

Some variants of this problem are solved in polynomial time.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 13 / 32

Page 31: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Permutation Pattern Matching Problem.

The problem is NP-Complete (Bose et al. 1993). But

It can be solved in O(1.79O(n)) (Ahal et al. 2008).

It can be solved in O(n.2O(k2 log k)) : the problem is fixed-parametertractable parameterized by the size of σ (Guillemot and Marx 2013).

Some variants of this problem are solved in polynomial time.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 13 / 32

Page 32: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Permutation Pattern Matching Problem.

The problem is NP-Complete (Bose et al. 1993). But

It can be solved in O(1.79O(n)) (Ahal et al. 2008).

It can be solved in O(n.2O(k2 log k)) : the problem is fixed-parametertractable parameterized by the size of σ (Guillemot and Marx 2013).

Some variants of this problem are solved in polynomial time.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 13 / 32

Page 33: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Variant for Permutation Pattern Matching Problem.

We can consider some variants for PPM-problem :

Add constraint on the input text or/and pattern.=⇒ pattern or/and text is/are in a class.

Add constraint on the occurrence.=⇒ bivincular permutation pattern and mesh permutation pattern.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 14 / 32

Page 34: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Variant for Permutation Pattern Matching Problem.

We can consider some variants for PPM-problem :

Add constraint on the input text or/and pattern.=⇒ pattern or/and text is/are in a class.

Add constraint on the occurrence.=⇒ bivincular permutation pattern and mesh permutation pattern.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 14 / 32

Page 35: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Variant for Permutation Pattern Matching Problem.

We can consider some variants for PPM-problem :

Add constraint on the input text or/and pattern.=⇒ pattern or/and text is/are in a class.

Add constraint on the occurrence.=⇒ bivincular permutation pattern and mesh permutation pattern.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 14 / 32

Page 36: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Our interests.

What we study :

What can we do if the pattern is a separable permutation?

What can we do if the pattern and the text are separablepermutation?

What can we do if the pattern is a bivincular separable permutationpattern?

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 15 / 32

Page 37: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Our interests.

What we study :

What can we do if the pattern is a separable permutation?

What can we do if the pattern and the text are separablepermutation?

What can we do if the pattern is a bivincular separable permutationpattern?

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 15 / 32

Page 38: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Our interests.

What we study :

What can we do if the pattern is a separable permutation?

What can we do if the pattern and the text are separablepermutation?

What can we do if the pattern is a bivincular separable permutationpattern?

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 15 / 32

Page 39: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Our interests.

What we study :

What can we do if the pattern is a separable permutation?

What can we do if the pattern and the text are separablepermutation?

What can we do if the pattern is a bivincular separable permutationpattern?

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 15 / 32

Page 40: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Results.

the pattern is separable:

best result : O(kn4) time and O(kn3) space algorithm.our contribution : O(kn4) time and O(log(k)n3) space algorithm.

the pattern and the text are separable:

best result :

O

min

lT ′ nTlT ′ lT log log nT + nTnT nT ′log nT

+ nT log nT

time and O(nT ) space algorithm.our contribution :O(n2k) time and O(nk) space algorithm.

the pattern is a bivincular separable pattern:

∅O(n6k) time and space algorithm.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 16 / 32

Page 41: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Results.

the pattern is separable:

best result : O(kn4) time and O(kn3) space algorithm.

our contribution : O(kn4) time and O(log(k)n3) space algorithm.

the pattern and the text are separable:

best result :

O

min

lT ′ nTlT ′ lT log log nT + nTnT nT ′log nT

+ nT log nT

time and O(nT ) space algorithm.our contribution :O(n2k) time and O(nk) space algorithm.

the pattern is a bivincular separable pattern:

∅O(n6k) time and space algorithm.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 16 / 32

Page 42: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Results.

the pattern is separable:

best result : O(kn4) time and O(kn3) space algorithm.our contribution : O(kn4) time and O(log(k)n3) space algorithm.

the pattern and the text are separable:

best result :

O

min

lT ′ nTlT ′ lT log log nT + nTnT nT ′log nT

+ nT log nT

time and O(nT ) space algorithm.our contribution :O(n2k) time and O(nk) space algorithm.

the pattern is a bivincular separable pattern:

∅O(n6k) time and space algorithm.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 16 / 32

Page 43: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Results.

the pattern is separable:

best result : O(kn4) time and O(kn3) space algorithm.our contribution : O(kn4) time and O(log(k)n3) space algorithm.

the pattern and the text are separable:

best result :

O

min

lT ′ nTlT ′ lT log log nT + nTnT nT ′log nT

+ nT log nT

time and O(nT ) space algorithm.our contribution :O(n2k) time and O(nk) space algorithm.

the pattern is a bivincular separable pattern:

∅O(n6k) time and space algorithm.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 16 / 32

Page 44: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Results.

the pattern is separable:

best result : O(kn4) time and O(kn3) space algorithm.our contribution : O(kn4) time and O(log(k)n3) space algorithm.

the pattern and the text are separable:

best result :

O

min

lT ′ nTlT ′ lT log log nT + nTnT nT ′log nT

+ nT log nT

time and O(nT ) space algorithm.

our contribution :O(n2k) time and O(nk) space algorithm.

the pattern is a bivincular separable pattern:

∅O(n6k) time and space algorithm.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 16 / 32

Page 45: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Results.

the pattern is separable:

best result : O(kn4) time and O(kn3) space algorithm.our contribution : O(kn4) time and O(log(k)n3) space algorithm.

the pattern and the text are separable:

best result :

O

min

lT ′ nTlT ′ lT log log nT + nTnT nT ′log nT

+ nT log nT

time and O(nT ) space algorithm.our contribution :O(n2k) time and O(nk) space algorithm.

the pattern is a bivincular separable pattern:

∅O(n6k) time and space algorithm.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 16 / 32

Page 46: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Results.

the pattern is separable:

best result : O(kn4) time and O(kn3) space algorithm.our contribution : O(kn4) time and O(log(k)n3) space algorithm.

the pattern and the text are separable:

best result :

O

min

lT ′ nTlT ′ lT log log nT + nTnT nT ′log nT

+ nT log nT

time and O(nT ) space algorithm.our contribution :O(n2k) time and O(nk) space algorithm.

the pattern is a bivincular separable pattern:

∅O(n6k) time and space algorithm.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 16 / 32

Page 47: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Results.

the pattern is separable:

best result : O(kn4) time and O(kn3) space algorithm.our contribution : O(kn4) time and O(log(k)n3) space algorithm.

the pattern and the text are separable:

best result :

O

min

lT ′ nTlT ′ lT log log nT + nTnT nT ′log nT

+ nT log nT

time and O(nT ) space algorithm.our contribution :O(n2k) time and O(nk) space algorithm.

the pattern is a bivincular separable pattern:

O(n6k) time and space algorithm.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 16 / 32

Page 48: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Results.

the pattern is separable:

best result : O(kn4) time and O(kn3) space algorithm.our contribution : O(kn4) time and O(log(k)n3) space algorithm.

the pattern and the text are separable:

best result :

O

min

lT ′ nTlT ′ lT log log nT + nTnT nT ′log nT

+ nT log nT

time and O(nT ) space algorithm.our contribution :O(n2k) time and O(nk) space algorithm.

the pattern is a bivincular separable pattern:

∅O(n6k) time and space algorithm.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 16 / 32

Page 49: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Results.

Longest common separable permutation with at least one separablepermutation:

best result : O(n8) time and space algorithm.our contribution : O(n6k) time and O(n4 log k) space algorithm.

Unshuffling of a permutation into two separable patterns:

∅our contribution : O(nk3`2) algorithm.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 17 / 32

Page 50: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Results.

Longest common separable permutation with at least one separablepermutation:

best result : O(n8) time and space algorithm.

our contribution : O(n6k) time and O(n4 log k) space algorithm.

Unshuffling of a permutation into two separable patterns:

∅our contribution : O(nk3`2) algorithm.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 17 / 32

Page 51: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Results.

Longest common separable permutation with at least one separablepermutation:

best result : O(n8) time and space algorithm.our contribution : O(n6k) time and O(n4 log k) space algorithm.

Unshuffling of a permutation into two separable patterns:

∅our contribution : O(nk3`2) algorithm.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 17 / 32

Page 52: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Results.

Longest common separable permutation with at least one separablepermutation:

best result : O(n8) time and space algorithm.our contribution : O(n6k) time and O(n4 log k) space algorithm.

Unshuffling of a permutation into two separable patterns:

∅our contribution : O(nk3`2) algorithm.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 17 / 32

Page 53: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Results.

Longest common separable permutation with at least one separablepermutation:

best result : O(n8) time and space algorithm.our contribution : O(n6k) time and O(n4 log k) space algorithm.

Unshuffling of a permutation into two separable patterns:

our contribution : O(nk3`2) algorithm.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 17 / 32

Page 54: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Introduction

Results.

Longest common separable permutation with at least one separablepermutation:

best result : O(n8) time and space algorithm.our contribution : O(n6k) time and O(n4 log k) space algorithm.

Unshuffling of a permutation into two separable patterns:

∅our contribution : O(nk3`2) algorithm.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 17 / 32

Page 55: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Definition

Plan

1 Introduction

2 Definition

3 Core of The Algorithms

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 18 / 32

Page 56: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Definition

Rectangle

Recangle of a Permutation

A rectangle is a subsequence of the permutation, define as thesubsequence of elements that are between a certain range of index, andthe elements are not bigger than a given value and the elements are notsmaller than a given value.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 19 / 32

Page 57: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Definition

A rectangle in 391867452.

The rectangle is the permutation 987.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 20 / 32

Page 58: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Definition

Direct Sum and Skew Sum

Direct Sum

Given π1 of size n1, π2 of size n2, π1 ⊕ π2 =π1[1]π1[2] . . . π1[n1](π2[1] + n1)(π2[2] + n1) . . . (π2[n2] + n1).

Skew Sum

Given π1 of size n1, π2 of size n2, π1 π2 =(π1[1] + n2)(π1[2] + n2) . . . (π1[n1] + n2)π2[1]π2[2] . . . π2[n2].

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 21 / 32

Page 59: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Definition

Example : Direct Sum

⊕ =

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 22 / 32

Page 60: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Definition

Example : Direct Sum

⊕ =

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 22 / 32

Page 61: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Definition

Example : Direct Sum

⊕ =

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 22 / 32

Page 62: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Definition

Example : Direct Sum

⊕ =

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 22 / 32

Page 63: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Definition

Example : Skew Sum

=

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 23 / 32

Page 64: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Definition

Example : Skew Sum

=

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 23 / 32

Page 65: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Definition

Example : Skew Sum

=

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 23 / 32

Page 66: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Definition

Example : Skew Sum

=

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 23 / 32

Page 67: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Definition

Separable Permutationn.

Separable Permutation

π is a separable permutation

⇐⇒

π = 1OR

π = π1 ⊕ π2 or π = π1 π2, with π1 and π2 are separable permutation

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 24 / 32

Page 68: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Definition

Separable Permutationn.

Separable Permutation

π is a separable permutation

⇐⇒

π = 1OR

π = π1 ⊕ π2 or π = π1 π2, with π1 and π2 are separable permutation

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 24 / 32

Page 69: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Definition

Separable Permutationn.

Separable Permutation

π is a separable permutation

⇐⇒

π = 1OR

π = π1 ⊕ π2 or π = π1 π2, with π1 and π2 are separable permutation

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 24 / 32

Page 70: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Definition

Example : decomposition of 214376589

214376589.

red(2143)⊕ red(76589) = 2143⊕ 32145.

2143 = red(21)⊕ red(43) = 21⊕ 21.

21 = red(2) red(1) = 1 1.

32145 = red(321)⊕ red(45) = 321⊕ 12.

765 = red(7) (red(6) red(5)) =(1 (1 1)).

89 = red(8)⊕ red(9) = 1⊕ 1.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 25 / 32

Page 71: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Definition

Example : decomposition of 214376589

214376589.

red(2143)⊕ red(76589) = 2143⊕ 32145.

2143 = red(21)⊕ red(43) = 21⊕ 21.

21 = red(2) red(1) = 1 1.

32145 = red(321)⊕ red(45) = 321⊕ 12.

765 = red(7) (red(6) red(5)) =(1 (1 1)).

89 = red(8)⊕ red(9) = 1⊕ 1.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 25 / 32

Page 72: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Definition

Example : decomposition of 214376589

214376589.

red(2143)⊕ red(76589) = 2143⊕ 32145.

2143 = red(21)⊕ red(43) = 21⊕ 21.

21 = red(2) red(1) = 1 1.

32145 = red(321)⊕ red(45) = 321⊕ 12.

765 = red(7) (red(6) red(5)) =(1 (1 1)).

89 = red(8)⊕ red(9) = 1⊕ 1.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 25 / 32

Page 73: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Definition

Example : decomposition of 214376589

214376589.

red(2143)⊕ red(76589) = 2143⊕ 32145.

2143 = red(21)⊕ red(43) = 21⊕ 21.

21 = red(2) red(1) = 1 1.

32145 = red(321)⊕ red(45) = 321⊕ 12.

765 = red(7) (red(6) red(5)) =(1 (1 1)).

89 = red(8)⊕ red(9) = 1⊕ 1.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 25 / 32

Page 74: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Definition

Example : decomposition of 214376589

214376589.

red(2143)⊕ red(76589) = 2143⊕ 32145.

2143 = red(21)⊕ red(43) = 21⊕ 21.

21 = red(2) red(1) = 1 1.

32145 = red(321)⊕ red(45) = 321⊕ 12.

765 = red(7) (red(6) red(5)) =(1 (1 1)).

89 = red(8)⊕ red(9) = 1⊕ 1.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 25 / 32

Page 75: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Definition

Example : decomposition of 214376589

214376589.

red(2143)⊕ red(76589) = 2143⊕ 32145.

2143 = red(21)⊕ red(43) = 21⊕ 21.

21 = red(2) red(1) = 1 1.

32145 = red(321)⊕ red(45) = 321⊕ 12.

765 = red(7) (red(6) red(5)) =(1 (1 1)).

89 = red(8)⊕ red(9) = 1⊕ 1.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 25 / 32

Page 76: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Definition

Example : decomposition of 214376589

214376589.

red(2143)⊕ red(76589) = 2143⊕ 32145.

2143 = red(21)⊕ red(43) = 21⊕ 21.

21 = red(2) red(1) = 1 1.

32145 = red(321)⊕ red(45) = 321⊕ 12.

765 = red(7) (red(6) red(5)) =(1 (1 1)).

89 = red(8)⊕ red(9) = 1⊕ 1.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 25 / 32

Page 77: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Core of The Algorithms

Plan

1 Introduction

2 Definition

3 Core of The Algorithms

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 26 / 32

Page 78: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Core of The Algorithms

Dynamic Programming

Dynamic Programming :

To solve an instance of the problem, we only need to solve smallerand easier instances of the problem, until the instances become trivial.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 27 / 32

Page 79: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Core of The Algorithms

Trivial Case

The pattern 1 occurs in a rectangle if and only if the rectangle is notempty.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 28 / 32

Page 80: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Core of The Algorithms

Algorithm

To decide whether σ = σ1 ⊕ σ2 occurs in a rectangle R:

For every pair of rectangles R1 and R2 such that R1 is left below R2 :decide whether σ1 occurs in R1

decide whether σ2 occurs in R2

conclude that σ occurs in R.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 29 / 32

Page 81: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Core of The Algorithms

Algorithm

To decide whether σ = σ1 ⊕ σ2 occurs in a rectangle R:

For every pair of rectangles R1 and R2 such that R1 is left below R2 :

decide whether σ1 occurs in R1

decide whether σ2 occurs in R2

conclude that σ occurs in R.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 29 / 32

Page 82: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Core of The Algorithms

Algorithm

To decide whether σ = σ1 ⊕ σ2 occurs in a rectangle R:

For every pair of rectangles R1 and R2 such that R1 is left below R2 :decide whether σ1 occurs in R1

decide whether σ2 occurs in R2

conclude that σ occurs in R.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 29 / 32

Page 83: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Core of The Algorithms

Algorithm

To decide whether σ = σ1 ⊕ σ2 occurs in a rectangle R:

For every pair of rectangles R1 and R2 such that R1 is left below R2 :decide whether σ1 occurs in R1

decide whether σ2 occurs in R2

conclude that σ occurs in R.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 29 / 32

Page 84: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Core of The Algorithms

Algorithm

To decide whether σ = σ1 ⊕ σ2 occurs in a rectangle R:

For every pair of rectangles R1 and R2 such that R1 is left below R2 :decide whether σ1 occurs in R1

decide whether σ2 occurs in R2

conclude that σ occurs in R.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 29 / 32

Page 85: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Core of The Algorithms

Improvement of the Core

We do not need to check every pair of rectangles

We do not need every edge of a rectangle.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 30 / 32

Page 86: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Core of The Algorithms

Improvement of the Core

We do not need to check every pair of rectangles

We do not need every edge of a rectangle.

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 30 / 32

Page 87: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Core of The Algorithms

Conclusion

Open problems:

Separable permutation and mesh pattern?

Av(321) and PPM?

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 31 / 32

Page 88: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Core of The Algorithms

Conclusion

Open problems:

Separable permutation and mesh pattern?

Av(321) and PPM?

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 31 / 32

Page 89: Permutation Pattern Matching for Separable Permutations.igm.univ-mlv.fr/AlgoB/slides/Neou_SPIRE_2016.pdf · Permutation Pattern Matching for Separable Permutations. Both Emerite Neou1,

Core of The Algorithms

Thank You!

Both Emerite Neou, Romeo Rizzi , Stephane Vialette (Universite Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPC, F-77454, Marne-la-Vallee, France {neou,vialette}@univ-mlv.fr, Department of Computer Science, Universita degli Studi di Verona, Italy [email protected] )Permutation Pattern Matching for Separable Permutations.October 20, 2016 32 / 32


Recommended