Your SlideShare is downloading. ×
0
How Hard Can a Problem Be ?
How Hard Can a Problem Be ?
How Hard Can a Problem Be ?
How Hard Can a Problem Be ?
How Hard Can a Problem Be ?
How Hard Can a Problem Be ?
How Hard Can a Problem Be ?
How Hard Can a Problem Be ?
How Hard Can a Problem Be ?
How Hard Can a Problem Be ?
How Hard Can a Problem Be ?
How Hard Can a Problem Be ?
How Hard Can a Problem Be ?
How Hard Can a Problem Be ?
How Hard Can a Problem Be ?
How Hard Can a Problem Be ?
How Hard Can a Problem Be ?
How Hard Can a Problem Be ?
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

How Hard Can a Problem Be ?

398

Published on

A Really Simple Introduction to Complexity and Computability

A Really Simple Introduction to Complexity and Computability

Published in: Education, Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
398
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
7
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. How Hard Can a Problem Be ? Ahmad Saeed Alexandria University
  • 2. Agenda
      • Hard for whom ?
      • Easy Problems
      • Hard Problems
      • Unsolvable Problems !!
  • 3. A Problem Solver (Turing Machine)
      • Follow the instructions to solve the problem
      • Use a pencil, a rubber and a scrap paper
      • Use them to find the answer
      • You now have a : Turing Machine
  • 4. Turing Machines Formally 
      • Physically
        • A Scratch Tape ( Infinite )
        • A Moving head
      • Mathematically
        • A set of possible symbols to write on the tape
        • A set of "states"
        • A transition function between states
  • 5. Turing Machine Example
      • Determine whether the number of 1's in a sequence is 
        • odd (print 0 at the end of the tape) 
        • even (print 1 at the end of the tape) 
  • 6. Church-Turing Thesis
    • Simply: If it's physically computable, it can be computed by a Turing Machine
  • 7. "Easy" Problems (P)
      • The class of problems that could be solved in  P olynomial Time
      • Examples
        • Bubble Sort O(n 2 )
        • Matrix Multiplication O(n 3 )
      • What about a problem of O(n 100 ) ??
  • 8. Nondeterminism 
  • 9. Nondeterminism (Example)
      • Travelling Salesman Problem Find the path with the least cost to visit a set of cities
  • 10. Nondeterminism (Example)
      • What if we were really great guessers ??
  • 11. "Hard" Problems (NP)
      • N ondeterministic P olynomial
      • Problems that are solved in a polynomial time if you are (or have access to) a perfect guesser
      • Examples
        • 3 CNF (conjunctive normal form)  SAT (satisfiability)
        • Scheduling Problem
  • 12. Can all problems be solved by a computer ??
  • 13. Halting Problem
      • Given a binary representation of a program P, determine whether it enters an infinite loop on input X or not.
  • 14. Halting Problem Proof
      • Assume that we have  Halt(P,x) which is a program that 
        • returns 0 if program  P  terminates   on input  x
        • returns 1 it doesn't program doesn't halt
      • Let M(x) be a program that
        • doesn't terminate (loops forever) if Halt(x,x) returns 0
        • terminates if  Halt(x,x) returns 1
      • What's the results if M(M) ??
  • 15. What have we been talking about ??
      • Different models of computation boil down to Turing Machine
      • N = NP ??? 
      • Computers can't do everything but can we ??
  • 16. References
      • Computational Complexity: A Modern Approach Textbook by Sanjeev Arora and Boaz Barak, Cambridge University Press.
      • Lecture notes for cs1510 of Prof Kirk Pruhs of the Dept of Computer Science, University of Pittsburg
      • Lecture notes for CSc2010 of Prof Jaman L. Bhola of the Dept of Computer Science, Georgia State University
      • Wikipedia, 2011
  • 17. Any Questions ?? (Open Discussion)
  • 18. Thank you for hanging around!! Ahmad Saeed www.ahmad-saeed.co.cc [email_address]

×