Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Fluency with Information Technology Third Edition by Lawrence Snyder Chapter.

Slides:



Advertisements
Similar presentations
The Development of AI St Kentigerns Academy Unit 3 – Artificial Intelligence.
Advertisements

Turing Machines January 2003 Part 2:. 2 TM Recap We have seen how an abstract TM can be built to implement any computable algorithm TM has components:
Chapter 22 Limits to Computation. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Learning Objectives Explain what the Turing.
Half-life of knowledge
Learning Objectives Explain what the Turing test was designed to show
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Limits to Computation Computers Can Do Almost {Everything, Nothing} lawrence.
Artificial Intelligence
An Introduction to Artificial Intelligence. Introduction Getting machines to “think”. Imitation game and the Turing test. Chinese room test. Key processes.
Chapter 10 Algorithmic Thinking. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Learning Objectives List the five essential.
Chapter 10 What's The Plan?: Algorithmic Thinking.
Lecture 1: Introduction to the Course of Optimization 主講人 : 虞台文.
Computability and Complexity 13-1 Computability and Complexity Andrei Bulatov The Class NP.
CPSC 322 Introduction to Artificial Intelligence November 10, 2004.
Nature’s Algorithms David C. Uhrig Tiffany Sharrard CS 477R – Fall 2007 Dr. George Bebis.
Chapter 23 Computers Can Do Almost {Everything Nothing}: Limits to Computation.
The Theory of NP-Completeness
Analysis of Algorithms CS 477/677
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Fluency with Information Technology Third Edition by Lawrence Snyder Chapter.
NP-complete and NP-hard problems. Decision problems vs. optimization problems The problems we are trying to solve are basically of two kinds. In decision.
Chapter 1 General Problem Solving Concepts
Artificial Intelligence in Game Design Problems and Goals.
CSCI 4410 Introduction to Artificial Intelligence.
Chapter 22 Limits to Computation. Learning Objectives Explain what the Turing test was designed to show Discuss the issue of a computer being intelligent.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Introduction to Computers CS Zhizhang Shen Chapter 11: What Can Computers.
Artificial Intelligence: Its Roots and Scope
INTRODUCTION TO COMPUTING CHAPTER NO. 06. Compilers and Language Translation Introduction The Compilation Process Phase 1 – Lexical Analysis Phase 2 –
Scott Perryman Jordan Williams.  NP-completeness is a class of unsolved decision problems in Computer Science.  A decision problem is a YES or NO answer.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
Othello Artificial Intelligence With Machine Learning
Artificial Intelligence
1 Ethics of Computing MONT 113G, Spring 2012 Session 13 Limits of Computer Science.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 8: Complexity Theory.
MIT and James Orlin1 NP-completeness in 2005.
Introduction to Artificial Intelligence CS 438 Spring 2008 Today –AIMA, Ch. 6 –Adversarial Search Thursday –AIMA, Ch. 6 –More Adversarial Search The “Luke.
Major objective of this course is: Design and analysis of modern algorithms Different variants Accuracy Efficiency Comparing efficiencies Motivation thinking.
P, NP, and Exponential Problems Should have had all this in CS 252 – Quick review Many problems have an exponential number of possibilities and we can.
Lawrence Snyder University of Washington, Seattle © Lawrence Snyder 2004 What can a computer be commanded to do?
Intermediate 2 Software Development Process. Software You should already know that any computer system is made up of hardware and software. The term hardware.
How Solvable Is Intelligence? A brief introduction to AI Dr. Richard Fox Department of Computer Science Northern Kentucky University.
Introduction to Machine Learning Kamal Aboul-Hosn Cornell University Chess, Chinese Rooms, and Learning.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Fluency with Information Technology Third Edition by Lawrence Snyder Chapter.
1 CS 385 Fall 2006 Chapter 1 AI: Early History and Applications.
Erdal Kose CC30.10 These slides are based of Prof. N. Yanofsky Lecture notes.
Georgia Institute of Technology Speed part 6 Barb Ericson Georgia Institute of Technology May 2006.
GAME PLAYING 1. There were two reasons that games appeared to be a good domain in which to explore machine intelligence: 1.They provide a structured task.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 11: Artificial Intelligence Computer Science: An Overview Tenth Edition.
Data Structures and Algorithms Dr. Tehseen Zia Assistant Professor Dept. Computer Science and IT University of Sargodha Lecture 1.
Beauty and Joy of Computing Limits of Computing Ivona Bezáková CS10: UC Berkeley, April 14, 2014 (Slides inspired by Dan Garcia’s slides.)
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
Lecture # 39 What Can’t Be Computed?. Computability Tractable problems (P): Can be solved by a a computer is some deterministic (reasonable) polynomial.
SNU OOPSLA Lab. 1 Great Ideas of CS with Java Part 1 WWW & Computer programming in the language Java Ch 1: The World Wide Web Ch 2: Watch out: Here comes.
Complexity & Computability. Limitations of computer science  Major reasons useful calculations cannot be done:  execution time of program is too long.
Week 13 - Monday.  What did we talk about last time?  B-trees  Hamiltonian tour  Traveling Salesman Problem.
Copyright © 2012 Pearson Education, Inc. Chapter 12: Theory of Computation Computer Science: An Overview Eleventh Edition by J. Glenn Brookshear.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Computer Science: An Overview Eleventh Edition by J. Glenn Brookshear Chapter.
Chapter VI What should I know about the sizes and speeds of computers?
The single most important skill for a computer programmer is problem solving Problem solving means the ability to formulate problems, think creatively.
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
More on Logic Today we look at the for loop and then put all of this together to look at some more complex forms of logic that a program will need The.
Lecture. Today Problem set 9 out (due next Thursday) Topics: –Complexity Theory –Optimization versus Decision Problems –P and NP –Efficient Verification.
Chapter 3 Brute Force Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
Copyright © 2014 Curt Hill Algorithm Analysis How Do We Determine the Complexity of Algorithms.
Understanding AI of 2 Player Games. Motivation Not much experience in AI (first AI project) and no specific interests/passion that I wanted to explore.
Fluency with Information Technology
Introduction to Algorithms
Objective of This Course
Introduction to Algorithms
Fluency with Information Technology Third Edition
Presentation transcript:

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Fluency with Information Technology Third Edition by Lawrence Snyder Chapter 23: Computers Can Do Almost {Everything, Nothing}: Limits to Computation

1-2 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-2 Can Computers Think? The Turing Test: –Two identical rooms labeled A and B are connected electronically to a judge who can type questions directed to the occupant of either room. A human being occupies one room, and the other contains a computer. The judge's goal is to decide, based on the questions asked and the answers received, which room contains the computer. If after a reasonable period of time the judge cannot decide for certain, the computer can be said to be intelligent. –The computer is intelligent if it acts enough like a human to deceive the judge.

1-3 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-3 Can Computers Think? (cont'd) Passing the Test –Test sidesteps definition of thinking or intelligence –Does not focus on any specific ability –Advances in the last half century: Parsing grammatical structure of natural language Machine translation of natural language Recognizing semantically meaningful information

1-4 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-4 Acting Intelligently? Eliza, the Doctor Program, was programmed to ask questions in dialog like a psychotherapist and a patient Took word cues, noticed use of negatives Dialog was essentially pre-planned to appear intelligent, but was not Artificial Intelligence (AI): To exhibit intelligence, computer has to "understand" a complex situation and reason well enough to act on its understanding (no scripting)

1-5 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-5 Playing Chess Clean task: Clear rules and definition of success (beat a grand master) The Board Configuration

1-6 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-6 Playing Chess (cont'd) The Game Tree –To decide on move, computer explores moves to determine whether the move will make it better or worse off –Evaluation Function: Assigns a numerical value to each piece and computes a score for the move. Positive score is better; negative score is worse Computer checks Evaluation Function on every legal move

1-7 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-7

1-8 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-8 Using the Game Tree Tactically For each board configuration under the Evaluation Function, computer considers every possible next move from opponent and analyzes them –Can't go all the way to end of game in planning because the number of possible moves increases geometrically Using a Database of Knowledge –Computer also has "knowledge"—a database of openings and endgames.

1-9 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-9 Using Parallel Computation Chess programs improved under this basic logic –Combination of faster computers, more complete databases, and better evaluation functions –Parallel computing—application of several computers to one task—and custom hardware brought possibility of beating a grand master in a tournament

1-10 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley The Deep Blue Matches 1996, Garry Kasparov vs. IBM's Deep Blue –Deep Blue: parallel computer composed of 32 special purpose computers and 256 custom chess processors –Kasparov won 1997, Kasparov vs. Deep Blue –Kasparov lost

1-11 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Interpreting the Outcome of the Matches The problem was basically solved by speed –Deep Blue could look "deeper" into the game tree –But it did so intelligently –Intelligence may be the ability to consider many alternatives in an informed and directed way –Did it demonstrate that the computer was intelligent, or that IBM's experts and programmers were intelligent? The program responds to new inputs and realizes state not planned by its designers

1-12 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Acting Creatively Can a computer be creative? –Can it create art? –Creativity is by definition a process of breaking rules –Java applets that create designs in the style of Mondrian are only producing variations on application of rules, using random numbers But the computer or program did not invent the rules

1-13 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-13

1-14 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Acting Creatively (cont'd) Creativity as a spectrum –Inspiration ranges from "flash out of the blue" to hard work "incremental revision" –The Hard Work Forms Bruce Jacob wrote a program to compose musical canons (variations on a theme) –Randomly generates new themes, assesses as good or bad, discards bad ones –Forcing random variation to fit rules sometimes produces new techniques –Incremental revision appears to be algorithmic

1-15 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley What Part of Creativity is Algorithmic? The more deeply we understand creativity, the more we find ways in which it is algorithmic To the extent that creativity is algorithmic, a computer can be creative Progress in understanding creativity benefits people too

1-16 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley The Universality Principle What makes one computer more powerful than another? Any computer using simple instructions could simulate any other computer –Universality Principle: All computers have the same power All computers compute the same set of computations

1-17 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Universal Information Processor Computer is sufficient for any task if we can buy or write the software needed General purpose, not specialized People play a big role in customizing computers for specific task—one reason IT fluency is important

1-18 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Practical Consequences of the Universality Principle Computers perform same computations, but at different rates Obvious difficulties: –Why doesn't Macintosh software run on PC? –How do old machines become outmoded if they're all the same? –Is the computer in my laptop the same as the one in my microwave?

1-19 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Macintosh vs. PC Processors have different combinations of instructions –Encoded differently, operate differently, and contain separate instructions –It is possible to write a program for each machine to process instructions of the other machine –The real difference is that the operating systems work differently

1-20 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Outmoded Computers Speed is the main difference New software runs slowly on old machines Hardware and software products may be incompatible with older machines –Business decision, not technology impediment

1-21 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley The Laptop and the Microwave Computers are embedded in consumer products because it is cheaper than implementing same system with custom electronics Embedded computers could run other computer applications, but –Their programs are fixed –They have limited input/output devices

1-22 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley More Work, Slower Speed Why do some tasks take longer to compute? Comparing Alphabetize CDs with Face Forward –Recall Alphabetize CDs from Chapter 10 –Consider task of making sure all CDs face forward The amount of work is proportional to the amount of data –Work-proportional-to-n algorithm

1-23 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Work Proportional to n 2 When we observe that one computation is taking more time than another despite requiring the same amount of data, it is generally because the algorithm does more work to solve the problem Work-proportional-to-n algorithm: –Doing the task on 1000 items takes 1000 times as long as on 1 item Work-proportional-to-n 2 algorithm: –Doing the task on 1000 items takes 1 million times as long as on 1 item

1-24 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley How Hard Can a Problem Be? The time required to solve the problem using any currently known algorithm increases very quickly as the size of the problem grows. As a result, the time required to solve even moderately large versions of many of these problems easily reaches into the billions or trillions of years, using any amount of computing power available today. As a consequence, determining whether or not it is possible to solve these problems quickly is one of the principal unsolved problems in computer science today.

1-25 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley How Hard Can a Problem Be? The Travelling Salesman Problem (TSP) is a problem in combinatorial optimization studied in operations research and theoretical computer science. Given a list of cities and their pairwise distances, the task is to find a shortest possible tour that visits each city exactly once. The problem was first formulated as a mathematical problem in 1930 and is one of the most intensively studied problems in optimization. It is used as a benchmark for many optimization methods. –Even though the problem is computationally difficult, a large number of heuristics and exact methods are known, so that some instances with tens of thousands of cities can be solved.heuristics The TSP has several applications even in its purest formulation, such as planning, logistics, and the manufacture of microchips. Slightly modified, it appears as a sub-problem in many areas, such as DNA sequencing. In these applications, the concept city represents, for example, customers, soldering points, or DNA fragments, and the concept distance represents travelling times or cost, or a similarity measure between DNA fragments.

1-26 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley How Hard Can a Problem Be? An optimal TSP tour through Germany’s 15 largest cities. It is the shortest among 43,589,145,600 possible tours visiting each city exactly once

1-27 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley How Hard Can a Problem Be? The knapsack problem or rucksack problem is a problem in combinatorial optimization: – Given a set of items, each with a weight and a value, determine the number of each item to include in a collection so that the total weight is less than a given limit and the total value is as large as possible. –It derives its name from the problem faced by someone who is constrained by a fixed-size knapsack and must fill it with the most useful items.knapsack –Example of a one-dimensional (constraint) knapsack problem: which boxes should be chosen to maximize the amount of money while still keeping the overall weight under or equal to 15 kg?

1-28 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley How Hard Can a Problem Be? NP-Complete Problems –No known practical algorithmic solutions –Intractable: Only solution is to try all possible solutions and pick the best (like finding the cheapest set of airline tickets for touring n cities) Large data sets cannot be solved with a realistic amount of computer time

1-29 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley How Hard Can a Problem Be? (cont'd) Unsolvable Problems –Some problems have no algorithms at all –Computer cannot determine if a program has a bug (like an infinite loop) in it The Nonexistent Loop Checker –Trying to solve the Halting Problem –Suppose you could develop a program called Loop Checker that could check for loops. –Program LC (P,x) takes as input any program P and input data x, analyzes P and answers back “Yes” or “No” as to whether P will loop forever on input x.

1-30 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley How Hard Can a Problem Be? (cont'd) –Create another program CD(P), that also takes a program P –What does CD(CD) output: Where not sure what it answers back, but suppose it it says “No”, CD does not loop forever when the CD program is its input. But looking at the flowchart, we see that the left arrow is taken and it does loop forever If CD answers “Yes”, it does loop forever, then we follow the right arrow and stop looping The Loop Checker can not answer correctly – neither Yes nor No is the right answer. The problem can not be algorithmically solved

1-31 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley How Hard Can a Problem Be? (cont'd)

1-32 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23-32