190 likes | 214 Views
Explore the challenges of solving intractable problems and the limits of computation. Learn about the Halting Problem and its implications. Discover the basics of Artificial Intelligence and its different approaches. Engage in hands-on lab activities to understand these concepts.
E N D
CSC 110 – Fluency in Information TechnologyChapter 23: Limits to Computation Dr. Curry Guinn
Today’s Class • Intractable problems • Halting problem • AI • Lab
How hard does the computer have to work to solve a problem? • How many operations must it perform in order to • Add up a list of numbers of length N? • N additions • Sorting using that Alphabetize CD algorithm with N CDs? • N * N operations (N2) • Inverting a matrix of size N • N * N * N operations (N3)
Traveling Salesman Problem • A salesman spends his time visiting n cities (or nodes) cyclically. In one tour he visits each city just once, and finishes up where he started. In what order should he visit them to minimize the distance travelled?
Traveling Salesman • The optimal solution seems to require checking almost every possible path • That’s on the order of 2N operations. • So what? • It’s a lot lot lot worse than N2. • How much worse?
The point is … • Perfect solutions for problems like the Traveling Salesman problem are INTRACTABLE for even relatively small values (like 1000). • These problems can be solved in principle but not in practice.
The Halting Problem • We cannot make a program that will tell whether another program will loop forever. • How do we know this? • Generate a contradiction like • “This sentence is false.”
The Halting Problem • Suppose program LC could tell whether another program P looped forever with a given input x. • LC(P, x) returns “YES” if P will loop forever with input x. • LC(P, x) returns “NO” if P will halt at some point on input x.
The Halting Problem • Make another program CD(P) that runs the previous program LC(P,P). • If LC(P,P) returns true, CD(P) returns true. • If LC(P,P) returns false, CD(P) loops forever. • So what does CD(CD) compute? • Calls LC(CD,CD). • If CD(CD) runs forever, LC returns yes. But if LC returns yes, CD(CD) returns true (doesn’t run forever). • If CD(CD) does not run forever, LC returns no. But if LC returns no, CD(CD) runs forever.
The Halting Problem: So What? • It means that there are theoretical things the computer simply can’t do • Creating software that debugs other software has its limits
Introduction to Artificial Intelligence • What is AI? • Is it • Acting like a human? • Turing’s approach. • It behaves like we do, but the underlying mechanisms may be quite different • Thinking like a human? • Cognitive modeling approach • Thinking rationally? • Logic-based approach • Acting rationally? • Making good decisions based on logic and statistics based on available knowledge.
AI: What is it? • My definition: AI is whatever we don’t know how to get computers to do yet. • When we know how to get computers to do it, no longer AI.
Lab: Part 1 • Here is an example of the Traveling Salesman Problem • Try to solve it yourself: http://www.tsp.gatech.edu/games/tspOnePlayer.html • Plan a trip and find the shortest flight path or driving path: http://www.tsp.gatech.edu/maps/index.html
Lab: Part 2 • The book mentions creating art inspired by Piet Mondrian • Here’s one link: http://javaboutique.internet.com/Mondrian/ • Pretty, yes?
Wrap-up • Read how computer chess works (Wed): http://computer.howstuffworks.com/chess.htm • Natural Language Processing (Fri): http://people.uncw.edu/guinnc/papers/ittsec_nlp.97.pdf