Presentation is loading. Please wait.

Presentation is loading. Please wait.

2101INT – Principles of Intelligence Systems Lecture 3.

Similar presentations


Presentation on theme: "2101INT – Principles of Intelligence Systems Lecture 3."— Presentation transcript:

1 2101INT – Principles of Intelligence Systems Lecture 3

2 Last week we covered Weak AI vs Strong AI The Chinese Room Materialism vs Dualism

3 Hard vs Easy Problems Back in the 60’s (the dawn of computing science) there were some problems that were generally easy, and others that were just plain hard By easy, we mean that they could be solved in polynomial time, and similarly by hard, that they could only be solved in exponential time

4 Enter P vs NP It wasn’t until 1971 that Cook published his seminal paper “The complexity of theorem proving procedures” Problems in class P can be solved in polynomial time Problems in class NP can be verified in polynomial time. That is, if I give you a solution, you can tell in polynomial time whether I am correct. BUT, for me to guarantee that my solution will be correct requires exponential time

5 Why is P vs NP important? Primarily because as computer scientists we need to find solutions to problems, efficiently. Any polynomial-time algorithm, no matter how bad, will always outperform an exponential time one if the problem is large enough. It is so important that there is a US$1M prize for a correct proof of P=NP

6 Why is P vs NP important in AI? Search is a major part of AI, since it is the way that computers generally exhibit intelligent behaviour Many search problems (the interesting ones) are in NP Any NP-hard problem is translatable into any other problem, so a proof that one is NP is a proof for all

7 How to handle a new problem 1. Can you show that the problem is in P? a. Yes – great. Brag to your co-workers in the tea-room and hit your boss for a raise. b. No – not so good. Either go to your boss and say “I guess I’m just too dumb  ” or proceed to step 2 2. Can you show that the problem is in NP? a. Yes – okay, you can now go to your boss and say “I can’t find a polynomial algorithm but neither can any of these people” b. Or, you might be able to say this: “Although in general the problem is in NP, we could exploit a special case” c. Or, “Finding an optimal solution is in NP, but we can find an approximate solution in polynomial time”

8 Example problems in P Linear Programming Greatest Common Divisor Maximum Matching Minimum Spanning Tree Maximum Network Flow Shortest Path PRIMES

9 Example problems in NP Travelling Salesman 3-Satisfiability MAX-k-SAT (for k  2) Clique Problem Set Cover Hamiltonian Circuit Prime Factorisation

10 How do we exploit P  NP Consider two of the problems PRIMES (in P) and Prime Factorisation (in NP, we think) ($1M for this one too, guys) PRIMES is the problem of determining if a number is composite or prime. The proof of this was only published in 2002. Prime factorisation is the problem of breaking a number down into its prime factors

11 How do we exploit P  NP cont. So we can find some prime numbers in polynomial time, but if we multiply them together it will take someone exponential time to break them up. When is this useful? Cryptography – Modern cryptography relies on the fact that P  NP

12 Special Cases Many NP-hard do have special cases that admit polynomial time solutions Current interest is directed towards “Fixed Parameter Tractability” (FPT) FPT methods abstract the exponential part of the problem away from that which can be solved in polynomial time

13 Heuristic Algorithms If you’re not a theoretician and don’t want to spend your weekends with a maths text, the empirical option is for you Heuristic algorithms can’t guarantee you an optimal solution in polynomial time, but often on average they can. Don’t be fooled though – worst case performance of some of these algorithms can be O(  )


Download ppt "2101INT – Principles of Intelligence Systems Lecture 3."

Similar presentations


Ads by Google