AlgoPerm2012 - 13 Laurent Bulteau

Post on 20-Jun-2015

246 views 0 download

Tags:

description

Laurent Bulteau (LINA, Université de Nantes) Pancake Flipping Is Hard Algorithms & Permutations 2012, Paris. http://igm.univ-mlv.fr/AlgoB/algoperm2012/

Transcript of AlgoPerm2012 - 13 Laurent Bulteau

Pancake Flipping Is Hard

Laurent BULTEAU, Guillaume FERTIN, Irena RUSULINA, Université de Nantes

Feb. 21st, 2012

Pancake Flipping Problem

L. Bulteau Pancake Flipping Is Hard 2/28

Pancakes

we are given a stack of pancakes, all of different sizes

we want to rearrange it into a beautiful pyramidal stackwe have a spatula, to flip the top of the stackwe are lazy

L. Bulteau Pancake Flipping Is Hard 3/28

Pancakes

we are given a stack of pancakes, all of different sizeswe want to rearrange it into a beautiful pyramidal stack

we have a spatula, to flip the top of the stackwe are lazy

L. Bulteau Pancake Flipping Is Hard 3/28

Pancakes

we are given a stack of pancakes, all of different sizeswe want to rearrange it into a beautiful pyramidal stackwe have a spatula, to flip the top of the stack

we are lazy

L. Bulteau Pancake Flipping Is Hard 3/28

Pancakes

we are given a stack of pancakes, all of different sizeswe want to rearrange it into a beautiful pyramidal stackwe have a spatula, to flip the top of the stackwe are lazy

L. Bulteau Pancake Flipping Is Hard 3/28

PancakesExample

L. Bulteau Pancake Flipping Is Hard 4/28

PancakesExample

L. Bulteau Pancake Flipping Is Hard 4/28

PancakesExample

L. Bulteau Pancake Flipping Is Hard 4/28

PancakesExample

L. Bulteau Pancake Flipping Is Hard 4/28

PancakesExample

L. Bulteau Pancake Flipping Is Hard 4/28

PancakesExample

L. Bulteau Pancake Flipping Is Hard 4/28

PancakesExample

L. Bulteau Pancake Flipping Is Hard 4/28

PancakesExample

L. Bulteau Pancake Flipping Is Hard 4/28

PancakesExample

L. Bulteau Pancake Flipping Is Hard 4/28

PancakesExample

L. Bulteau Pancake Flipping Is Hard 4/28

PancakesExample

L. Bulteau Pancake Flipping Is Hard 4/28

PancakesExample

L. Bulteau Pancake Flipping Is Hard 4/28

PancakesExample

L. Bulteau Pancake Flipping Is Hard 4/28

PancakesExample

L. Bulteau Pancake Flipping Is Hard 4/28

PancakesExample

L. Bulteau Pancake Flipping Is Hard 4/28

PancakesExample

L. Bulteau Pancake Flipping Is Hard 4/28

PancakesExample

L. Bulteau Pancake Flipping Is Hard 4/28

The problem to be solved

ProblemGiven a stack of n pancakes, how can it be arranged with as littleeffort as possible?

L. Bulteau Pancake Flipping Is Hard 5/28

Other points of view

“Pancake view”Given a stack of n pancakes, how can it be arranged with as littleeffort as possible?

Formal problem : MIN-SBPR

Given a permutation π of {1, . . . , n}, compute the prefix reversaldistance between π and the Identity, written prd(π).

“Biology view”

Given two genomes using the same n genes, how many steps havebeen used in evolution between one and the other?

L. Bulteau Pancake Flipping Is Hard 6/28

Other points of view

Pancakes Formal BiologyPancake Integer GeneStack Permutation Genome

Nice stack Identity Reference genomeFlip Prefix reversal Evolution step

We are lazy Minimization formulation Parsimony principle(distance)

L. Bulteau Pancake Flipping Is Hard 7/28

Other points of view

Pancakes Formal BiologyPancake Integer GeneStack Permutation Genome

Nice stack Identity Reference genomeFlip Prefix reversal Evolution step

We are lazy Minimization formulation Parsimony principle(distance)

L. Bulteau Pancake Flipping Is Hard 7/28

Other points of view

Pancakes Formal BiologyPancake Integer GeneStack Permutation Genome

Nice stack Identity Reference genomeFlip Prefix reversal Evolution step

We are lazy Minimization formulation Parsimony principle(distance)

L. Bulteau Pancake Flipping Is Hard 7/28

Pancake Problem

Complexity: NP-complete

Related results:Reversal distance, not necessarily prefix:

NP-complete (APX-hard) for unsigned permutations,polynomial for signed permutations.

Burnt pancakes variant, or Prefix Reversal Distance for signedpermutations:

complexity unknown.Algorithms:

polynomial-time algorithm for a subclass of signedpermutations (simple permutations [Labarre, Cibulka, 2011])2-approximation algorithm

L. Bulteau Pancake Flipping Is Hard 8/28

Known bounds

Upper bound

prd(π) ≤ 2(n − 1)

Repeat at most n − 1 timesFind the largest unsorted pancake, flip it to the topFlip it back to its destination

At most 2(n − 1) flips to sort a stack.

L. Bulteau Pancake Flipping Is Hard 9/28

Known bounds

Upper bound

prd(π) ≤ 2(n − 1)Anything better ?

L. Bulteau Pancake Flipping Is Hard 9/28

Known bounds

Upper bound

prd(π) ≤ 2(n − 1)Anything better ? – Yes :prd(π) ≤ (5n + 5)/3 [Gates & Papadimitriou, 1979]

L. Bulteau Pancake Flipping Is Hard 9/28

Known bounds

Upper bound

prd(π) ≤ 2(n − 1)Anything better ? – Yes :prd(π) ≤ (5n + 5)/3 [Gates & Papadimitriou, 1979]prd(π) ≤ (18n)/11 + O(1) [Chitturi et al., 2009]

L. Bulteau Pancake Flipping Is Hard 9/28

Known bounds

Upper bound

prd(π) ≤ (18n)/11 + O(1) [Chitturi et al., 2009]

Lower boundprd(π) ≥ db(π)

Breakpoint at position i if:i < n and π(i + 1) 6= π(i)± 1i = n and π(n) 6= n

db(π) : number of breakpoints

At most one breakpoint is removed with each flip

L. Bulteau Pancake Flipping Is Hard 9/28

Known bounds

Upper bound

prd(π) ≤ (18n)/11 + O(1) [Chitturi et al., 2009]

Lower boundprd(π) ≥ db(π)

Breakpoint at position i if:i < n and π(i + 1) 6= π(i)± 1i = n and π(n) 6= n

db(π) : number of breakpointsAt most one breakpoint is removed with each flip

L. Bulteau Pancake Flipping Is Hard 9/28

Our result

Reduction from 3-SAT: from a formula φ, create apermutation πφ such that prd(πφ) = db(πφ) iff φ is satisfiable.Given a permutation π, deciding wether π can be sorted withno more than db(π) flips is NP-hard.

MIN-SBPR is NP-hard (hence NP-complete)

L. Bulteau Pancake Flipping Is Hard 10/28

Reduction

L. Bulteau Pancake Flipping Is Hard 11/28

Efficient flips

A flip is efficient if it removes one breakpoint: π → π′

prd(πφ) = db(πφ) iff there exists a “path” of efficient flipsfrom πφ to the Identity. πφ →∗ I1

nAt most two efficient flips are possible from every permutation

x...h

h − 1...y

h + 1...

h...x

h − 1...y

h + 1...

y...

h − 1x...h

h + 1...

L. Bulteau Pancake Flipping Is Hard 12/28

Efficient flips

A flip is efficient if it removes one breakpoint: π → π′

prd(πφ) = db(πφ) iff there exists a “path” of efficient flipsfrom πφ to the Identity. πφ →∗ I1

nAt most two efficient flips are possible from every permutation

x...h

h − 1...y

h + 1...

h...x

h − 1...y

h + 1...

y...

h − 1x...h

h + 1...

L. Bulteau Pancake Flipping Is Hard 12/28

Efficient flips

A flip is efficient if it removes one breakpoint: π → π′

prd(πφ) = db(πφ) iff there exists a “path” of efficient flipsfrom πφ to the Identity. πφ →∗ I1

nAt most two efficient flips are possible from every permutation

x...h

h − 1...y

h + 1...

↙X

h...

x = h − 2h − 1...y

h + 1...

y...

h − 1x...h

h + 1...

L. Bulteau Pancake Flipping Is Hard 12/28

Efficient flips

A flip is efficient if it removes one breakpoint: π → π′

prd(πφ) = db(πφ) iff there exists a “path” of efficient flipsfrom πφ to the Identity. πφ →∗ I1

nAt most two efficient flips are possible from every permutation

x...h

h − 1...y

h + 1...

h...x

h − 1...

y = h + 2h + 1...

↘X

y...

h − 1x...h

h + 1...

L. Bulteau Pancake Flipping Is Hard 12/28

Efficient flips

A flip is efficient if it removes one breakpoint: π → π′

prd(πφ) = db(πφ) iff there exists a “path” of efficient flipsfrom πφ to the Identity. πφ →∗ I1

nAt most two efficient flips are possible from every permutation

x...h

h − 1...y

h + 1...

↙X

h...

x = h − 2h − 1...

y = h + 2h + 1...

↘X

y...

h − 1x...h

h + 1...

L. Bulteau Pancake Flipping Is Hard 12/28

Reduction ideas

Create πφ in order to know precisely which efficient flips arepossible (from πφ or subsequent permutations)

One possible flip: usual case, there is one path to followTwo possible flips: a choice has to be made

e.g., assigning “true” or “false” to a variableNo possible flip: bad choices have been made

e.g., a clause is unsatisfiedNecessity to end with the Identity permutation.

L. Bulteau Pancake Flipping Is Hard 13/28

Gadgets

Lock 3 states: closed, open, tested

Fork chooses between two optionsHook moves a subsequence in/out ofthe headDock stores subsequences when theyare sorted

Literals holds a lock for each literalin the formula

Variable opens locks correspondingto either x or ¬xClause tests one lock out of three

πφ

Literals Variable Clause

Lock Fork Hook Dock

Integers

L. Bulteau Pancake Flipping Is Hard 14/28

Gadgets

Lock 3 states: closed, open, testedFork chooses between two options

Hook moves a subsequence in/out ofthe headDock stores subsequences when theyare sorted

Literals holds a lock for each literalin the formula

Variable opens locks correspondingto either x or ¬xClause tests one lock out of three

πφ

Literals Variable Clause

Lock Fork Hook Dock

Integers

L. Bulteau Pancake Flipping Is Hard 14/28

Gadgets

Lock 3 states: closed, open, testedFork chooses between two optionsHook moves a subsequence in/out ofthe head

Dock stores subsequences when theyare sorted

Literals holds a lock for each literalin the formula

Variable opens locks correspondingto either x or ¬xClause tests one lock out of three

πφ

Literals Variable Clause

Lock Fork Hook Dock

Integers

L. Bulteau Pancake Flipping Is Hard 14/28

Gadgets

Lock 3 states: closed, open, testedFork chooses between two optionsHook moves a subsequence in/out ofthe headDock stores subsequences when theyare sorted

Literals holds a lock for each literalin the formula

Variable opens locks correspondingto either x or ¬xClause tests one lock out of three

πφ

Literals Variable Clause

Lock Fork Hook Dock

Integers

L. Bulteau Pancake Flipping Is Hard 14/28

Gadgets

Lock 3 states: closed, open, testedFork chooses between two optionsHook moves a subsequence in/out ofthe headDock stores subsequences when theyare sorted

Literals holds a lock for each literalin the formula

Variable opens locks correspondingto either x or ¬xClause tests one lock out of three

πφ

Literals Variable Clause

Lock Fork Hook Dock

Integers

L. Bulteau Pancake Flipping Is Hard 14/28

Gadgets

Lock 3 states: closed, open, testedFork chooses between two optionsHook moves a subsequence in/out ofthe headDock stores subsequences when theyare sorted

Literals holds a lock for each literalin the formula

Variable opens locks correspondingto either x or ¬x

Clause tests one lock out of three

πφ

Literals Variable Clause

Lock Fork Hook Dock

Integers

L. Bulteau Pancake Flipping Is Hard 14/28

Gadgets

Lock 3 states: closed, open, testedFork chooses between two optionsHook moves a subsequence in/out ofthe headDock stores subsequences when theyare sorted

Literals holds a lock for each literalin the formula

Variable opens locks correspondingto either x or ¬xClause tests one lock out of three

πφ

Literals Variable Clause

Lock Fork Hook Dock

Integers

L. Bulteau Pancake Flipping Is Hard 14/28

Lock gadget

Lock gadget (closed)

L =

129856431112

key = 10test = 7

Open

Lo =

12346589101112

Tested

I112 =

123456789101112

L. Bulteau Pancake Flipping Is Hard 15/28

Lock gadget

Lock gadget (closed)

L =

129856431112

key = 10test = 7

Open

Lo =

12346589101112

Tested

I112 =

123456789101112

L. Bulteau Pancake Flipping Is Hard 15/28

Lock gadget

Lock gadget (closed)

L =

129856431112

key = 10test = 7

Open

Lo =

12346589101112

Tested

I112 =

123456789101112

L. Bulteau Pancake Flipping Is Hard 15/28

Lock gadget

Lock gadget (closed)

L =

p + 1p + 2p + 9p + 8p + 5p + 6p + 4p + 3p + 11p + 12

key = p + 10test = p + 7

Open

Lo =

p + 1p + 2p + 3p + 4p + 6p + 5p + 8p + 9p + 10p + 11p + 12

Tested

Ip+1p+12 =

p + 1p + 2p + 3p + 4p + 5p + 6p + 7p + 8p + 9p + 10p + 11p + 12

L. Bulteau Pancake Flipping Is Hard 15/28

Lock gadget

Lock gadget (closed)

L =

129856431112

key = 10test = 7

Open

Lo =

12346589101112

Tested

I112 =

123456789101112

L. Bulteau Pancake Flipping Is Hard 15/28

Lock gadget

Opening

key...L...

→∗...Lo

...

Testing(when open)

test...Lo

...

→∗...I1

12...

Testing(when closed)

test...L...

→∗ ∅

L. Bulteau Pancake Flipping Is Hard 16/28

Lock gadget

Opening

key

XL

Y

→∗XLo

Y

Testing(when open)

test

XLo

Y

→∗XI1

12

Y

Testing(when closed)

test

XL

Y

→∗ ∅

L. Bulteau Pancake Flipping Is Hard 16/28

Lock gadget

keyXLY

∅↙

21

?X109856431112Y

10X129856431112Y

34658921

?X101112Y

98564321

?X101112Y

X12346589101112Y

=XLo

Y

L. Bulteau Pancake Flipping Is Hard 17/28

Lock gadget

keyXLY

∅↙

21

?X109856431112Y

10X129856431112Y

34658921

?X101112Y

98564321

?X101112Y

X12346589101112Y

=XLo

Y

L. Bulteau Pancake Flipping Is Hard 17/28

Lock gadget

keyXLY

∅↙

21

?X109856431112Y

10X129856431112Y

34658921

?X101112Y

98564321

?X101112Y

X12346589101112Y

=XLo

Y

L. Bulteau Pancake Flipping Is Hard 17/28

Lock gadget

keyXLY

∅↙

21

?X109856431112Y

10X129856431112Y

34658921

?X101112Y

98564321

?X101112Y

X12346589101112Y

=XLo

Y

L. Bulteau Pancake Flipping Is Hard 17/28

Lock gadget

keyXLY

∅↙

21

?X109856431112Y

10X129856431112Y

34658921

?X101112Y

98564321

?X101112Y

X12346589101112Y

=XLo

Y

L. Bulteau Pancake Flipping Is Hard 17/28

Lock gadget

testXLY

7X129856431112Y

→ ∅

L. Bulteau Pancake Flipping Is Hard 18/28

Lock gadget

testXLo

Y

∅↙

4321

?X76589101112Y

7X12346589101112Y

564321

?X789101112Y

654321

?X789101112Y

X123456789101112Y

=XI1

12Y

L. Bulteau Pancake Flipping Is Hard 19/28

Overall flow

Literalsxi : set Pi

¬xi : set Ni

Clause Cj

aj ∨ bj ∨ cj

I

Open locks in P1 Open locks in N1Open remaininglocks in P1 ∪ N1

......

......

Open locks in Pl Open locks in NlOpen remaininglocks in Pl ∪ Nl

Test lock a1 Test lock b1 Test lock c1Test remaining

locks in {a1, b1, c1}

......

......

Test lock ak Test lock bk Test lock ckTest remaining

locks in {ak , bk , ck}

L. Bulteau Pancake Flipping Is Hard 20/28

Fork gadget

E =

11873

F =

1096121345151421

F 1 =

109678111213141554321

(...)

F 2 =

378111096121345151421

(...)

Two efficient paths

XF 1

...

∗↙

EXF...

↘∗?XF 2

...

F 1

...→∗

?I115...

F 2

...→∗

?I115...

L. Bulteau Pancake Flipping Is Hard 21/28

Fork gadget

E =

11873

F =

1096121345151421

F 1 =

109678111213141554321

(...)

F 2 =

378111096121345151421

(...)

Two efficient paths

XF 1

...

∗↙

EXF...

↘∗?XF 2

...

F 1

...→∗

?I115...

F 2

...→∗

?I115...

L. Bulteau Pancake Flipping Is Hard 21/28

Fork gadget

E =

11873

F =

1096121345151421

F 1 =

109678111213141554321

(...) F 2 =

378111096121345151421

(...)

Two efficient paths

XF 1

...

∗↙

EXF...

↘∗?XF 2

...

F 1

...→∗

?I115...

F 2

...→∗

?I115...

L. Bulteau Pancake Flipping Is Hard 21/28

Fork gadget

E =

11873

F =

1096121345151421

F 1 =

109678111213141554321

(...) F 2 =

378111096121345151421

(...)

Two efficient paths

XF 1

...

∗↙

EXF...

↘∗?XF 2

...

F 1

...→∗

?I115...

F 2

...→∗

?I115...

L. Bulteau Pancake Flipping Is Hard 21/28

Hook gadget

G =34

H =

1211659821

take = 10

put = 7

G ′ =(...)

H ′ =(...)

G ′′ =(...)

H ′′ =(...)

Moves a substring up and down

take...GXH...

→∗

XG ′...H ′...

putX ′

G ′...H ′...

→∗

...G ′′

X ′

H ′′...

G ′′

XH ′′...

→∗X

?I112...

L. Bulteau Pancake Flipping Is Hard 22/28

Hook gadget

G =34

H =

1211659821

take = 10

put = 7

G ′ =(...)

H ′ =(...)

G ′′ =(...)

H ′′ =(...)

Moves a substring up and down

take...GXH...

→∗

XG ′...H ′...

putX ′

G ′...H ′...

→∗

...G ′′

X ′

H ′′...

G ′′

XH ′′...

→∗X

?I112...

L. Bulteau Pancake Flipping Is Hard 22/28

Hook gadget

G =34

H =

1211659821

take = 10

put = 7

G ′ =(...)

H ′ =(...)

G ′′ =(...)

H ′′ =(...)

Moves a substring up and down

take...GXH...

→∗

XG ′...H ′...

putX ′

G ′...H ′...

→∗

...G ′′

X ′

H ′′...

G ′′

XH ′′...

→∗X

?I112...

L. Bulteau Pancake Flipping Is Hard 22/28

Dock gadget

Dock(2, 7) =

1289

Stores a sorted substring (?I) out of thehead of the stack.

?I37...

Dock(2, 7)...

→∗...I1

9...

L. Bulteau Pancake Flipping Is Hard 23/28

Dock gadget

Dock(2, 7) =

1289

Stores a sorted substring (?I) out of thehead of the stack.

?I37...

Dock(2, 7)...

→∗...I1

9...

L. Bulteau Pancake Flipping Is Hard 23/28

Variable gadget

Variable gadget1 First part Move up the main sequence

2 Choose between xi and ¬xi

3 Open locks in Ni

4 Put back main sequence5 Other gadgets are activated6 Second part Hook collapses7 Open locks in Pi

8 Fork collapses9 Dock stores sorted sequences

10 End Gadget sorted

take

...

GE

keyp1

...keypq

putkeyn1

...keynq′

FH...

Dock

HookFork

⋆I⋆I...

Dock

L. Bulteau Pancake Flipping Is Hard 24/28

Variable gadget

Variable gadget1 First part Move up the main sequence2 Choose between xi and ¬xi

3 Open locks in Ni

4 Put back main sequence5 Other gadgets are activated6 Second part Hook collapses7 Open locks in Pi

8 Fork collapses9 Dock stores sorted sequences

10 End Gadget sorted

Ekeyp1

...keypq

putkeyn1

...keynq′

FG ′

...

H ′

...Dock

Hook

Fork

⋆I⋆I...

Dock

L. Bulteau Pancake Flipping Is Hard 24/28

Variable gadget

Variable gadget1 First part Move up the main sequence2 Choose between xi and ¬xi

3 Open locks in Ni

4 Put back main sequence5 Other gadgets are activated6 Second part Hook collapses7 Open locks in Pi

8 Fork collapses9 Dock stores sorted sequences

10 End Gadget sorted

keynq′...

keyn1

putkeypq

...keyp1

F 2

G ′

...

H ′

...Dock

Hook

⋆I⋆I...

Dock

L. Bulteau Pancake Flipping Is Hard 24/28

Variable gadget

Variable gadget1 First part Move up the main sequence2 Choose between xi and ¬xi

3 Open locks in Ni

4 Put back main sequence

5 Other gadgets are activated6 Second part Hook collapses7 Open locks in Pi

8 Fork collapses9 Dock stores sorted sequences

10 End Gadget sorted

putkeyn1

...keynq′

F 2

G ′

...

H ′

...Dock

Hook

⋆I⋆I...

Dock

L. Bulteau Pancake Flipping Is Hard 24/28

Variable gadget

Variable gadget1 First part Move up the main sequence2 Choose between xi and ¬xi

3 Open locks in Ni

4 Put back main sequence5 Other gadgets are activated

6 Second part Hook collapses7 Open locks in Pi

8 Fork collapses9 Dock stores sorted sequences

10 End Gadget sorted

...

G ′′

keyn1

...keynq′

F 2

H ′′

...Dock

Hook

⋆I⋆I...

Dock

L. Bulteau Pancake Flipping Is Hard 24/28

Variable gadget

Variable gadget1 First part Move up the main sequence2 Choose between xi and ¬xi

3 Open locks in Ni

4 Put back main sequence5 Other gadgets are activated6 Second part Hook collapses

7 Open locks in Pi

8 Fork collapses9 Dock stores sorted sequences

10 End Gadget sorted

G ′′

keyn1

...keynq′

F 2

H ′′

...Dock

Hook

⋆I⋆I...

Dock

L. Bulteau Pancake Flipping Is Hard 24/28

Variable gadget

Variable gadget1 First part Move up the main sequence2 Choose between xi and ¬xi

3 Open locks in Ni

4 Put back main sequence5 Other gadgets are activated6 Second part Hook collapses7 Open locks in Pi

8 Fork collapses9 Dock stores sorted sequences

10 End Gadget sorted

keyn1

...keynq′

F 2

⋆I...

Dock

⋆I⋆I...

Dock

L. Bulteau Pancake Flipping Is Hard 24/28

Variable gadget

Variable gadget1 First part Move up the main sequence2 Choose between xi and ¬xi

3 Open locks in Ni

4 Put back main sequence5 Other gadgets are activated6 Second part Hook collapses7 Open locks in Pi

8 Fork collapses

9 Dock stores sorted sequences10 End Gadget sorted

F 2

⋆I...

Dock

⋆I⋆I...

Dock

L. Bulteau Pancake Flipping Is Hard 24/28

Variable gadget

Variable gadget1 First part Move up the main sequence2 Choose between xi and ¬xi

3 Open locks in Ni

4 Put back main sequence5 Other gadgets are activated6 Second part Hook collapses7 Open locks in Pi

8 Fork collapses9 Dock stores sorted sequences

10 End Gadget sorted

⋆I⋆I...

Dock

L. Bulteau Pancake Flipping Is Hard 24/28

Variable gadget

Variable gadget1 First part Move up the main sequence2 Choose between xi and ¬xi

3 Open locks in Ni

4 Put back main sequence5 Other gadgets are activated6 Second part Hook collapses7 Open locks in Pi

8 Fork collapses9 Dock stores sorted sequences

10 End Gadget sorted

...I

⋆I⋆I...

Dock

L. Bulteau Pancake Flipping Is Hard 24/28

Clause gadget

Same structure,with twochoices:[[a or b] or c]

take1

...G1

E1

take2

put1testcF1

G2

E2

testaput2testbF2

H2

H1

...Dock1

Dock2

Hook 1

Hook 2

Fork 1

Fork 2

L. Bulteau Pancake Flipping Is Hard 25/28

Overall construction

πφ =

takeV1...

takeVl

takeC1...

takeCk

V1...VlC1...Ck

(docks)(locks)

I

Open locks in P1 Open locks in N1Open remaininglocks in P1 ∪ N1

......

......

Open locks in Pl Open locks in NlOpen remaininglocks in Pl ∪ Nl

Test lock a1 Test lock b1 Test lock c1Test remaining

locks in {a1, b1, c1}

......

......

Test lock ak Test lock bk Test lock ckTest remaining

locks in {ak , bk , ck}

L. Bulteau Pancake Flipping Is Hard 26/28

Finally

There exists an efficient path from πφ to the identity iff φ issatisfiable.The construction requires a polynomial time.MIN-SBPR is NP-hard.

L. Bulteau Pancake Flipping Is Hard 27/28

Conclusion

The complexity class of the Pancake Flipping problem is settledThere remains many intriguing questions:

What about the burnt variant?Any approximation algorithm?Any FPT algorithm with a relevant parameter?Any better bound for the diameter than1.07n ≤ f (n) ≤ 1.64n (unburnt) and1.5n ≤ g(n) ≤ 2n (burnt)?

Thank you!

L. Bulteau Pancake Flipping Is Hard 28/28

Conclusion

The complexity class of the Pancake Flipping problem is settledThere remains many intriguing questions:

What about the burnt variant?Any approximation algorithm?Any FPT algorithm with a relevant parameter?Any better bound for the diameter than1.07n ≤ f (n) ≤ 1.64n (unburnt) and1.5n ≤ g(n) ≤ 2n (burnt)?

Thank you!

L. Bulteau Pancake Flipping Is Hard 28/28