Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Class 38: Big Questions about Hard Problems

David Evans
April 29, 2016

Class 38: Big Questions about Hard Problems

cs1120: Introduction to Computing
Explorations in Language, Logic, and Machine
University of Virginia, Spring 2016

http://xplorecs.org/class38

Class 38:
Computability Practice
Ali G!
Hard Problems
Nondeterminism
P = NP?

David Evans

April 29, 2016
Tweet

More Decks by David Evans

Other Decks in Science

Transcript

  1. Class 37: Big Questions about Hard Problems Introduction to Computing:

    Explorations in Language, Logic, and Machines cs1120 Spring 2016 David Evans University of Virginia Still from Jack Doerner’s Phosphorpersistence The exhibit that includes Jack Doerner's movie is today at 5pm in Ruffin Hall, Room 103 (bottom floor).
  2. Menu Computability Practice Plan for Monday’s Class? Computability in Practice

    Hard Problems – Jack’s problem: rearranging video frames – Other hard problems Last chance to qualify for a new belt test is Monday! If you need more time, need to prearrange with me by Monday, and explain your plan for what you will do. The exhibit that includes Jack Doerner's movie is today at 5pm in Ruffin Hall, Room 103 (bottom floor).
  3. Inverse Problem • Input: strings p, q that each define

    Python procedures • Output: True if p and q are inverses (e.g., for all possible inputs x, p(q(x)) = x). Otherwise, False.
  4. Proof Input: strings p, q that each define Python procedures

    Output: True if p and q are inverses (e.g., for all possible inputs x, p(q(x)) = x). Otherwise, False.
  5. Inverse Problem is Noncomputable def halts(s): return inverse(“def proc1(x): return

    x”, “def proc2(x): eval(s) return x”)) To make proof convincing: argue that this correctly defines halts: • If s doesn’t finish the inputs are not inverses, hence inverse returns false and this is correct for halts • If s does finish, the inputs are inverses, hence inverse returns true, and this is correct for halts
  6. Monday’s Class A. Ask me anything B. Jeopardy game C.

    Everything else you should know D. Other suggestion?
  7. Ali G Problem Input: whole numbers x and y with

    up to d digits each (mostly nines) Output: x × y Theorist’s Question: Is the Ali G Problem computable?
  8. Ali G Problem Input: whole numbers x and y with

    up to d digits each (mostly nines) Output: x × y Ali G’s Question: Can real computers solve it for a given d?
  9. Ali G was Right! Theory assumes ideal computers: – Unlimited,

    perfect memory – Unlimited (finite) time Real computers have: – Limited memory, time, energy, flaky programming languages, etc. – There are many computable problems we cannot solve with any real computer: the actual inputs do matter (in practice, but not in theory!)
  10. “Hard” Problems • Seem to require trying all possible solutions

    to know you have the best one: – All possible orderings of frames – All possible arrangements of tile images – All possible proofs • Work appears to be exponential in problem size These are what computer scientists call NP-Hard problems.
  11. 16 q1 1 1 1 0 1 0 … q0

    1 1 1 0 0 0 … q6 0 1 1 0 1 0 … Deterministic Turing Machine Nondeterministic Turing Machine q0 1 1 1 0 0 0 … Tries all possible transitions; accepts if any path leads to accepting state. q1 1 1 1 0 1 0 … q7 1 1 1 0 0 0 …
  12. Computability: Is NDTM more powerful than DTM? No! We can

    simulate a NDTM with a DTM. Use a tape to keep track of which paths to try (breadth-first search, not depth first!)
  13. Complexity: Are there problems that are “hard” to solve with

    a DTM that are “easy” to solve with a NDTM?
  14. Complexity Classes NP P Problems that a DTM can solve

    in polynomial time. Problems that a NDTM can solve in polynomial time.
  15. P NP P NP We know P ⊆ NP: no

    need to take advantage of non-determinism.
  16. Seven Millennium Prize Problems Birch and Swinnerton-Dyer Conjecture Hodge Conjecture

    Navier-Stokes Equations P vs NP Poincaré Conjecture (resolved March 2010) Riemann Hypothesis Yang-Mills Theory
  17. Theological Question If God exists (and is omnipotent), could she

    compute anything regular people cannot compute? Yes:P ⊂NP Being able to always guess right when given a decision makes you more powerful than having to try both. No:P = NP Being able to always guess right when given a decision does not make you more powerful than having to try both.
  18. “If P = NP, then the world would be a

    profoundly different place than we usually assume it to be. There would be no special value in ‘creative leaps’, no fundamental gap between solving a problem and recognizing the solution once it’s found. Everyone who could appreciate a symphony would be Mozart; everyone who could follow a step-by-step argument would be Gauss...” Scott Aaronson
  19. Charge • Last chance to qualify for new belt test

    is Monday: unless you pre-arrange to have more time (need to let me know before Monday, and have a specific plan what you will do) • Monday’s Class