SlideShare a Scribd company logo
How Hard Can a Problem Be ? Ahmad Saeed Alexandria University
Agenda Hard for whom ? Easy Problems Hard Problems Unsolvable Problems !!
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
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
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) 
Church-Turing Thesis Simply:  If it's physically computable, it can be computed by a Turing Machine
"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 ) ??
Nondeterminism 
Nondeterminism (Example) Travelling Salesman Problem Find the path with the least cost to visit a set of cities
Nondeterminism (Example) What if we were really great guessers ??
"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
Can all problems be solved by a computer ??
Halting Problem Given a binary representation of a program P, determine whether it enters an infinite loop on input X or not.
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)  ??
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 ??
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
Any Questions ?? (Open Discussion)
Thank you for hanging around!! Ahmad Saeed www.ahmad-saeed.co.cc [email_address]

More Related Content

PPTX
Np completeness
PPT
PPTX
PDF
A comprehensive view on P vs NP
PPT
Np completeness
PPTX
np complete
PPTX
Understanding and using while in c++
PPT
Np completeness h4
Np completeness
A comprehensive view on P vs NP
Np completeness
np complete
Understanding and using while in c++
Np completeness h4

Viewers also liked (9)

PDF
Presentation
PDF
Modular gps platform 2010
PDF
Infocom 2013 MiniConference
PDF
ISP-friendly Peer-assisted On-demand Streaming of Long Duration Content in BB...
PDF
Optimal Relay Selection and Beamforming in MIMO Cognitive Multi-Relay Networks
ODP
G T K+ 101
ODP
Research success story in the making
PDF
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
PDF
Study: The Future of VR, AR and Self-Driving Cars
Presentation
Modular gps platform 2010
Infocom 2013 MiniConference
ISP-friendly Peer-assisted On-demand Streaming of Long Duration Content in BB...
Optimal Relay Selection and Beamforming in MIMO Cognitive Multi-Relay Networks
G T K+ 101
Research success story in the making
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Study: The Future of VR, AR and Self-Driving Cars
Ad

Similar to How Hard Can a Problem Be ? (20)

PPT
Halting Problemof P vesus NP Problems in TOC
PDF
Can machine think like human being : A Godelian perspective
PPTX
COMPLEXITY CHAPTER 3 LECTURE FOR FOURTH YEAR.pptx
PPT
compatibility and complexity in the IS.ppt
PPTX
Limits of Computation
PPTX
The Limits of Computation
PDF
Computational Complexity for Poets
PPTX
Webinar : P, NP, NP-Hard , NP - Complete problems
PPTX
fundamentals of python programmingg.pptx
PDF
Computational Complexity: Introduction-Turing Machines-Undecidability
PPTX
Computability and Complexity
PPTX
lec1computational complexity theory.pptx
PPTX
[D2 COMMUNITY] Spark User Group - 머신러닝 인공지능 기법
PDF
Measuring Computational Complexity the qualitative and quantitative intertwin...
PPTX
Algorithm Design and Complexity - Course 1&2
PDF
P, NP, NP-Complete, and NP-Hard
PPTX
L1_Start_of_Learning_of_Algorithms_Basics.pptx
PDF
Undecidabality
PPTX
L1_DatabAlgorithm Basics with Design & Analysis.pptx
Halting Problemof P vesus NP Problems in TOC
Can machine think like human being : A Godelian perspective
COMPLEXITY CHAPTER 3 LECTURE FOR FOURTH YEAR.pptx
compatibility and complexity in the IS.ppt
Limits of Computation
The Limits of Computation
Computational Complexity for Poets
Webinar : P, NP, NP-Hard , NP - Complete problems
fundamentals of python programmingg.pptx
Computational Complexity: Introduction-Turing Machines-Undecidability
Computability and Complexity
lec1computational complexity theory.pptx
[D2 COMMUNITY] Spark User Group - 머신러닝 인공지능 기법
Measuring Computational Complexity the qualitative and quantitative intertwin...
Algorithm Design and Complexity - Course 1&2
P, NP, NP-Complete, and NP-Hard
L1_Start_of_Learning_of_Algorithms_Basics.pptx
Undecidabality
L1_DatabAlgorithm Basics with Design & Analysis.pptx
Ad

Recently uploaded (20)

PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Insiders guide to clinical Medicine.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Computing-Curriculum for Schools in Ghana
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
GDM (1) (1).pptx small presentation for students
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
Institutional Correction lecture only . . .
PDF
Complications of Minimal Access Surgery at WLH
PPTX
Lesson notes of climatology university.
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
Cell Types and Its function , kingdom of life
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Microbial disease of the cardiovascular and lymphatic systems
2.FourierTransform-ShortQuestionswithAnswers.pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Insiders guide to clinical Medicine.pdf
human mycosis Human fungal infections are called human mycosis..pptx
Computing-Curriculum for Schools in Ghana
Final Presentation General Medicine 03-08-2024.pptx
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
GDM (1) (1).pptx small presentation for students
Renaissance Architecture: A Journey from Faith to Humanism
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Institutional Correction lecture only . . .
Complications of Minimal Access Surgery at WLH
Lesson notes of climatology university.
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Cell Types and Its function , kingdom of life
Microbial diseases, their pathogenesis and prophylaxis
Microbial disease of the cardiovascular and lymphatic systems

How Hard Can a Problem Be ?

  • 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 ) ??
  • 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]