53
Limits of Technology When adding even more memory will not do Fluency with Information Technology INFO100 and CSE100 Katherine Deibel 2012-02-15 Katherine Deibel, Fluency in Information Technology 1

Fluency with Information Technology INFO100 and CSE100 Katherine Deibel 2012-02-15Katherine Deibel, Fluency in Information Technology1

Embed Size (px)

Citation preview

Limits of TechnologyWhen adding even more memory will not do

Fluency with Information Technology

INFO100 and CSE100

Katherine Deibel

2012-02-15 Katherine Deibel, Fluency in Information Technology 1

Let's Sit Back and Awe

Computers do some really amazing things don't they?

The following slides are some of examples of computer applications that I find simply amazing

2012-02-15 Katherine Deibel, Fluency in Information Technology 2

Photorealism

Computer images have become complex enoughthat telling the differencebetween real humans andCGI characters is hard

We seem to be leavingthe "uncanny valley"

2012-02-15 Katherine Deibel, Fluency in Information Technology 3

Art and Mobility Disabilities

Drawing, painting, etc. is often inaccessible to people with severe motor disabilities (quadriplegia)

Susumu Harada developed a hands-free drawing software that use the voice to control the mouse

2012-02-15 Katherine Deibel, Fluency in Information Technology 4

Susumu HaradaUsing one’s voice to control a mouse

Vocal Joystick / VoiceDraw

2012-02-15 Katherine Deibel, Fluency in Information Technology 5

Indus River Script

The Indus River civilization was one of the first human civilizations (located around coastal Pakistan)

They left scripts that have not been interpreted and may be art or language

Rajesh Rao demonstrated through AI techniques to demonstrate that the it holds the same patterns as spoken language

2012-02-15 Katherine Deibel, Fluency in Information Technology 6

The Potential of Technology

Creative thinking

+ Flexibility of technology

+ Awareness of issues

No problem is beyond solution

2012-02-15 Katherine Deibel, Fluency in Information Technology 7

COMPUTERS HAVE NO LIMITS!

Computing Power on the Apollo

Apollo Guidance Computer: 2.048 MHz processor 32KB of RAM 4KB of ROM 4 16-bit registers for computation 4 16-bit memory registers in CPU

2012-02-15 Katherine Deibel, Fluency in Information Technology 8

THIS GOT US TO THE MOON!?!

COMPUTERS MUST HAVE NO LIMITS!

Computers Do Have Limits

Physical Limits Number of transistors we can fit on a chip

Speed of light limits transmission Philosophical Limits

Can a computer reason like a human?

Can a computer be conscious/sentient? Mathematical Limits

Some problems are intractable

Some problems are just really hard

Exactness is a problem2012-02-15 Katherine Deibel, Fluency in Information Technology 9

A Historical Perspective

Understanding the limits of computers is a tale of three brilliant minds

2012-02-15 Katherine Deibel, Fluency in Information Technology 10

David Hilbert Kurt Gödel Alan Turing

Katherine Deibel, Fluency in Information Technology 11

1. The Turing Test…

2012-02-15

A. B. C. D.

25% 25%25%25%A. Is a test of intelligenceB. Is a test of humanityC. Involves two individuals

communicating electronically

D. All of the above

Katherine Deibel, Fluency in Information Technology 12

2. The name of the computer program that simulated conversation with a psychologist was?

2012-02-15

A. B. C. D.

25% 25%25%25%A. SigmundB. FrasierC. ElizaD. Bob

3. Computers can consistently beat (win or force a tie) human opponents at which of the following games?

2012-02-15 Katherine Deibel, Fluency in Information Technology 13

A. B. C. D. E. F. G.

14% 14% 14% 14%14%14%14%

A. Tic-Tac-ToeB. CheckersC. ChessD. GoE. Two of A-DF. Three of A-DG. All of A-D

A Historical Perspective

Understanding the limits of computers is a tale of three brilliant minds

2012-02-15 Katherine Deibel, Fluency in Information Technology 14

David Hilbert Kurt Gödel Alan Turing

Turn of the Century Science

The end of the nineteenth century was a celebration of new science and the belief that everything would be solved

2012-02-15 Katherine Deibel, Fluency in Information Technology 15

Charles Duell,U.S. Patent

Commissioner

"Everything that can be invented has been invented."Apocryphal quote misattributed to him but indicative of mindset of that era

Katherine Deibel, Fluency in Information Technology 16

Completing Mathematics

With new formalisms, many thought that even all of mathematics was soon to be codified and solved Bertrand Russell and Alfred

Whitehead were preparing Principia Mathematica

This three-volume book sought to derive all of mathematics from a set of basic axioms

2012-02-15

Some Faults Already Known

In the late 1800s, George Cantor formalized set theory and infinity He then spent years in a sanatorium

To be fair, many mathematicians hounded him and his work because it disagreed with common sense and suggested "dark" truths

2012-02-15 Katherine Deibel, Fluency in Information Technology 17

There was always a rumor in mathematics that one should not peer into infinity for therein lay madness

Katherine Deibel, Fluency in Information Technology 18

Hilbert's 23 Problems

In 1900, Hilbert proposed a list of 23 key unsolved problems in mathematics and logic

2. Prove that the axioms of arithmetic are logically consistent.

10. Design an algorithm to solve any Diophantine equation with rational coefficients.

Everyone was certain that both questions had positive answers to be discovered

2012-02-15

David Hilbert

Kurt Gödel Solves Question Two

In 1931, Gödel answered if it was possible to prove arithmetic to be logical consistent

The answer was NO Two Incompleteness Theorems:

Any sufficiently complex axiomatic system cannot be used to prove that itself is: Complete

Consistent

2012-02-15 Katherine Deibel, Fluency in Information Technology 19

Kurt Gödel

Implications

Gödel's theorems awoke the idea that systems of mathematics and logic are inherently limited

Maybe some problems (like problem 10) have no algorithmic solutions Problem 10 proven in 1910

to be impossible

2012-02-15 Katherine Deibel, Fluency in Information Technology 20

Gödel, Escher, Bach

by

Douglas Hofstadter

Development of the Computer

Turing worked for the British in WWII to break Nazi Germany's Enigma encryption scheme

Earlier graduate work extended Gödel's theorems to computers Developed a mathematical model of a

computer—the Turing Machine His Turing Machine

Could simulate any computer system

Demonstrated that some problems are intractable (unsolvable)

2012-02-15 Katherine Deibel, Fluency in Information Technology 21

Alan Turing

Katherine Deibel, Fluency in Information Technology 22

The Turing Machine

Mathematical model of a computer consisting of An infinite tape A read-write head that

handles one cell at a time A fixed alphabet of symbols A fixed set of possible states A set of rules governing

writing, reading, head movement, state changes, etc.

2012-02-15

UW's CSE's

Steam-Powered

Turing Machine

A Real-World "Turing Machine"

Everything but the infinite tape:

http://www.youtube.com/watch?v=E3keLeMwfHY

2012-02-15 Katherine Deibel, Fluency in Information Technology 23

The Turing Machine

The Turing Machine is the basis for all theoretical computer science

Church-Turing Thesis:All functions that can be computed can be done so on a Turing Machine.

This allows for us to theorize about computation without programming!

2012-02-15 Katherine Deibel, Fluency in Information Technology 24

The Halting Problem

Can we write a program to determine if another program will ever finish?

function willItHalt(program) {

}

2012-02-15 Katherine Deibel, Fluency in Information Technology 25

The Halting Problem

If we could write willItHalt(…) Easy to determine if complex problems

have a solution

Prevent infinite loops

Would actually allow us to detect any virus or malware

It is too bad that we can never write such a program

2012-02-15 Katherine Deibel, Fluency in Information Technology 26

Proof: The Halting Problem

HALT(p, i) returns true if program p halts on input i, false otherwise

function TRICK(p, i) {if(HALT(p,i) == true) loop forever;else return true;

} What happens with TRICK(TRICK,TRICK)?

2012-02-15 Katherine Deibel, Fluency in Information Technology 27

TRICK(TRICK, TRICK)

Assume HALT(TRICK, TRICK) returns true TRICK does not loop forever

But… look at the code:

if(HALT(TRICK,TRICK) == true)

loop forever; Therefore, TRICK loops forever CONTRADICTION!

2012-02-15 Katherine Deibel, Fluency in Information Technology 28

TRICK(TRICK, TRICK)

Assume HALT(TRICK, TRICK) returns false TRICK does loop forever

But… look at the code:

if(HALT(TRICK,TRICK) == true)

loop forever;else

return true; Therefore, TRICK halts CONTRADICTION!

2012-02-15 Katherine Deibel, Fluency in Information Technology 29

TRICK(TRICK,TRICK)

TRICK cannot halt because of the contradiction it creates

TRICK cannot loop forever because of the contradiction it creates

Therefore, TRICK is impossible Therefore, HALT is impossible

2012-02-15 Katherine Deibel, Fluency in Information Technology 30

The Fundamental Contradiction

A Turing Machine is so powerful that it cannot be applied to itself The self-reference problem

The Barber Paradox:The town barber shaves only those men in town who do not shave themselves.Who shaves the barber?

2012-02-15 Katherine Deibel, Fluency in Information Technology 31

Implications

The intractability of the Halting Problem leads to Many problems that cannot be solved

Imperfect protection from "bad" programs

2012-02-15 Katherine Deibel, Fluency in Information Technology 32

A Sad Ending

In 1952, Alan Turing was discovered to be homosexual and convicted of sexual indecency Turing agreed to receive hormone

"treatments" instead of going to jail A few months later, Turing was found

dead of cyanide poisoning Suicide was not established but was likely

2012-02-15 Katherine Deibel, Fluency in Information Technology 33

What Can We Solve?Interesting Problems Can Be Hard

2012-02-15 Katherine Deibel, Fluency in Information Technology 34

What Can We Solve?

Fortunately, there are plenty of problems that Turing Machines (and computers) can solve

The question is:How efficiently can we solve them?

2012-02-15 Katherine Deibel, Fluency in Information Technology 35

Problem Complexity

We have mathematical models of the complexity of problems to solve Big O notation: O( f(n) )

means a program will take f(n) steps Basic idea for this class:

Fast, easy problems take polynomial time: O(n), O(n2), O(n3), O(n log n)

Harder problems are exponential: O(2n)

2012-02-15 Katherine Deibel, Fluency in Information Technology 36

Polynomial Time Problems

Sorting a list Finding the max, min, median, etc. Determining if a number is prime Finding the shortest road distance

between two cities

2012-02-15 Katherine Deibel, Fluency in Information Technology 37

Solving versus Checking

There is a difference between solving a problem and checking a solution Checking a solution may take only

polynomial time

Finding the solution is the problem, especially if you have to try all the possibilities

2012-02-15 Katherine Deibel, Fluency in Information Technology 38

Traveling Salesman

A salesman has to visit n cities Some cities are connected by

airplane trips Each trip has a cost associated with it The salesman wants to visit each city

exactly ONE time Can he do this? What is the minimum cost if he can?

2012-02-15 Katherine Deibel, Fluency in Information Technology 39

We have no efficient algorithm for this!

Katherine Deibel, Fluency in Information Technology 40

NP-Complete Problems

NP-Complete problems Can be checked in polynomial time

Have no known efficient algorithm All NP-Complete problems are related

If we figure out how to solve one in polynomial time, we can solve ALL of them in polynomial time

Known as the "Does NP = P" problem

2012-02-15

NP-Complete Problems

Traveling Salesman Graph Coloring Subset Sum Boolean Satisfiability Clique finding Knapsack problems

2012-02-15 Katherine Deibel, Fluency in Information Technology 41

All have useful applications in the real world

Our Options

Approximation algorithms Give us near-optimal solutions

Probabilistic algorithms Use random numbers to get us a chance

at having the best answer

2012-02-15 Katherine Deibel, Fluency in Information Technology 42

When Addition FailsThe Limits are Closer than You Think

2012-02-15 Katherine Deibel, Fluency in Information Technology 43

Katherine Deibel, Fluency in Information Technology 44

4. What does this JavaScript code output?

var x = 1 + 2;alert(x + " " +(x==3));

2012-02-15

A. B. C. D. E. F.

17% 17% 17%17%17%17%

A. 1 trueB. 2 trueC. 2 falseD. 3 trueE. 3 falseF. 4 false

Katherine Deibel, Fluency in Information Technology 45

5. What does this JavaScript code output?

var x = 0.1 + 0.2;alert((x==0.3) + " " +(x>=0.3));

2012-02-15

A. B. C. D.

25% 25%25%25%A. true trueB. true falseC. false trueD. false false

What's going on?

Try it out:

What we get:false true0.1 + 0.2 = 0.30000000000000004

2012-02-15 Katherine Deibel, Fluency in Information Technology 46

var x = 0.1 + 0.2;alert((x==0.3) + " " +(x>=0.3));alert("0.1 + 0.2 = " + x);

Decimals are tricky

Remember, every number in a computer is represented in binary

We have discussed how to represent nonnegative integers But what about negative integers?

What about real numbers?

2012-02-15 Katherine Deibel, Fluency in Information Technology 47

Number Formats

Computers have to play tricks with binary to represent numbers Negative numbers are done through

having a bit for indicating sign plus some other tricks

Floating point numbers (decimals) are only approximations based on binary fractions and rounding rules

2012-02-15 Katherine Deibel, Fluency in Information Technology 48

Lesson: Careful Comparing

If you have to compare decimal numbers, do the following:

function fuzzyEqual(x, y, err) {

if ( Math.abs(x-y) <= err )

return true;

else

return false;

}

2012-02-15 Katherine Deibel, Fluency in Information Technology 49

fuzzyEqual(x, y, err)

err is a tolerance value for how close you want to be

Math.abs makes (x-y) positive

2012-02-15 Katherine Deibel, Fluency in Information Technology 50

Other Number Limits

Numbers are infinite; computers are finite All number types have upper and lower limits

Going above and below will cause either software crashes or calculation errors

Signed zero Some systems distinguish between +0 and -0

2012-02-15 Katherine Deibel, Fluency in Information Technology 51

Summary

Computers have fundamental limits to them in terms of math and logic Some problems are unsolvable

Some are hard to solve

Some basic math can be a problem But computers do and will do amazing things

Will we have sentient AI in the future?

Will computers have emotions?

Will computers win at chess, go, shogi, etc.?

2012-02-15 Katherine Deibel, Fluency in Information Technology 52

Additional Reading/Viewing

BBC documentary (2008). Dangerous knowledge. A. Doxiadis, C. Papadimitriou, A. Papadatos &

A.D. Donna (2009). Logicomix: An epic search for truth.

D.R. Hofstadter (1979). Gödel, Escher, Bach: An eternal golden braid.

2012-02-15 Katherine Deibel, Fluency in Information Technology 53