1 – 1: decisions, decisions, decisionsjforlano/presentation1.pdf · *from lecture 1 of e....

46

Upload: others

Post on 25-May-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts
Page 2: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts
Page 3: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts

• 1 – 1: Decisions, decisions, decisions• 1 – 2: P, NP & Reductions• 1 – 3: SAT and 3SAT

• 2 – 1: Super Mario Bros.! • 2 – 2: More video games

• 3 – 1: Ref. bois

Page 4: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts

• Problem: `The Travelling Salesman’• Input:• Output:

Page 5: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts

• Problem: `The Travelling Salesman’• Input:• Output:

Page 6: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts

• Problem: `The Travelling Salesman’• Input:• Output:

Page 7: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts

• Problem: `The Travelling Salesman’• Input:• Output:

d

l

Page 8: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts

• Decision problems: only two outputs

YES NOor

Page 9: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts

• Decision problems: only two outputs

or

TRUE FALSEor

Page 10: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts

• Decision problems: only two outputs

or

or

1 0or

`Boolean Algebra’

Page 11: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts

• Information represented by strings:

• Boolean functions:

• Decision problem/Language (of f):

Page 12: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts

• Mathematically analyse `computing’ via a model of computation:

e.g. Turing Machines ™

Page 13: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts
Page 14: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts
Page 15: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts
Page 16: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts
Page 17: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts
Page 18: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts
Page 19: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts

http://www.win.tue.nl/~gwoegi/P-versus-NP.htm

Page 20: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts

Theorem: If 𝑃𝑃 = 𝑁𝑁𝑃𝑃, then for every 𝑁𝑁𝑃𝑃 language 𝐿𝐿, there exists a polynomial-time TM 𝐵𝐵 that on input 𝑥𝑥 ∈ 𝐿𝐿 outputs a certificate for 𝑥𝑥.

Yes/No problem = Search problem!

Page 21: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts
Page 22: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts
Page 23: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts

“As hard as every problem in X”

Page 24: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts

“As hard as every problem in 𝑿𝑿”

Page 25: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts

Moral: Reduce from known

Hard problem to yourproblem

Page 26: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts

*From Lecture 1 of E. Demaine. 6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs. Fall 2014. Massachusetts Institute of Technology: MIT OpenCourseWare, https://ocw.mit.edu. License: Creative Commons BY-NC-SA.

< in finite time

Page 27: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts

SAT3SAT

CLIQUE

Linear programming

Prime factorisation

Register allocation

SudokuMinesweeper

Subset sumVertex cover

Graph colouringProtein structure prediction

Knapsack problem

Deadlock

Guarding art galleries

Sorting

Hamiltonian path

Jigsaw

Set packing

Steiner treeBattleships

Residency matching

Page 28: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts
Page 29: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts
Page 30: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts

clause literal

Page 31: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts
Page 32: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts
Page 33: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts

G. Aloupis, E.D. Demaine, A. Guo and G. Viglietta, “Classic Nintendo Games are (Computationally) Hard,” Theoretical Computer Science, volume 586, 2015, pages 135–160

E.D. Demaine, G. Viglietta, and A. Williams, “Super Mario Bros.Is Harder/ Easier Than We Thought,” Proceedings of the 8th International Conference on Fun with Algorithms (FUN 2016), La Maddalena, Italy, June 8–10, 2016, 13:1–13:14

Theorem: It is NP-hard to decide whether the goal is reachable from the start of a stage in generalisedSuper Mario Bros.

Page 34: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts
Page 35: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts

Start gadget

Finish gadget

Page 36: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts
Page 37: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts
Page 38: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts
Page 39: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts
Page 40: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts

Crossover gadget

Page 41: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts

Glitches GIFs. Available at: http://tasvideos.org/GameResources/NES/SuperMarioBros.html

Proof is resilient to

glitches

Page 42: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts
Page 43: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts
Page 44: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts

• Sprites and Maps from NES Maps: http://www.nesmaps.com/maps/SuperMarioBrothers/sprites/SuperMarioBrothersSprites.html

• G. Aloupis, E.D. Demaine, A. Guo and G. Viglietta, “Classic Nintendo Games are (Computationally) Hard,” Theoretical Computer Science, volume 586, 2015, pages 135–160

• S. Arora and B. Barak, “Computational Complexity: A Modern Approach,” Cambridge University Press, 2009

• R. Breuklelaar, E. D. Demaine, S. Hohenberger, H. J. Hoogeboom, W.A. Kosters, and D. Libon-Newell, “Tetris is Hard, Even to Approximate,” International Journal of Computational Geometry and Applications, volume 14, number 1–2, 2004, pages 41–68.

• R. Breukelaar, H. J. Hoogeboom,and W.A. Kosters, “Tetris is Hard, Made easy”. Technical Report 2003-9, Leiden Institute of Advanced Computer Science, Universiteit Leiden, 2003

• E. Demaine. 6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs. Fall 2014. Massachusetts Institute of Technology: MIT OpenCourseWare, https://ocw.mit.edu. License: Creative Commons BY-NC-SA.

• E.D. Demaine, G. Viglietta, and A. Williams, “Super Mario Bros.Is Harder/ Easier Than We Thought,” Proceedings of the 8th International Conference on Fun with Algorithms (FUN 2016), La Maddalena, Italy, June 8–10, 2016, 13:1–13:14

• E.D. Demaine, J. Lockhart, and J. Lynch, “The Computational Complexity of Portal and Other 3D Video Games,” CoRR arXiv:1611.10319.

• R. Kaye, “Minesweeper is NP-complete,” The Mathematical Intelligence 22:9–15, 2000.• P\neq NP quote: Scott Aaronson, Shetl-Optimized Blog, “The Scientific Case for P\neq NP,”

https://www.scottaaronson.com/blog/?p=1720• The P vs. NP page: http://www.win.tue.nl/~gwoegi/P-versus-NP.htm

Page 45: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts

• Robert A. Hearn and Erik D. Demaine. Games, puzzles, and computation. CRC Press, 2009.

• S. Arora and B. Barak, “Computational Complexity: A Modern Approach,” Cambridge University Press, 2009

Page 46: 1 – 1: Decisions, decisions, decisionsjforlano/Presentation1.pdf · *From Lecture 1 of E. Demaine.6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs.Fall 2014. Massachusetts