Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Alan Turing. 2 The Vision  Alan Turing, regarded by some as the father of computer science, was among the first to envision the power of a computer.

Similar presentations


Presentation on theme: "1 Alan Turing. 2 The Vision  Alan Turing, regarded by some as the father of computer science, was among the first to envision the power of a computer."— Presentation transcript:

1 1 Alan Turing

2 2 The Vision  Alan Turing, regarded by some as the father of computer science, was among the first to envision the power of a computer and the importance of software over hardware. He knew the computer would mean unlimited potential in the creation and implementation of artificial intelligence and was determined to be the first to act on this belief.

3 3 The Idea  In 1935, at Cambridge university, Turing conceived the idea of the modern digital computer. This machine consisted of unlimited memory and a scanner that moves across, reading the memory and writing new data. The actions of the scanner would be dictated by a program, changing the program would allow for change in the scanners movements and the machine’s end result.

4 4 The Turing Machine  The machine he thought of is now known as the Turing Machine and helped start program-stored computers.  This machine is described as with “infinite tape that is divided into squares, any square of which may hold a non-blank symbol from a finite alphabet”.  At any time, the tape of the machine is going through the reader and giving it instructions based on the symbols in the squares.  Following these instructions, Turing argued, the machine could do any calculation a human could do that did not involve any form of ingenuity, it could follow directions.

5 5 Deviation From the Norm  Turing’s decision could change its function just by changing the instructions it received. This was an important deviation from analog machines that required changes in the machine itself, via switches and cables, to cause a change in the end result.  He also hinted at artificial intelligence when he said, “'What we want is a machine that can learn from experience', adding that the 'possibility of letting the machine alter its own instructions provides the mechanism for this'.

6 6 The War Years  During WWII, Germany was in possession of the enigma, a machine that helped them encipher messages. Britain badly needed this code to be broken and turned to the logical Turing for a solution.  In 1940, while living in Bletchley Park (pictured), he and Gordon Welchman designed the British Bombe, a machine meant to decipher the enigma’s coded messages.

7 7 The Aftermath  This important invention helped in the war effort and great honor was given to Turing. He was made a top-level liaison between the US and the UK. He began his interest in intelligent machinery and artificial intelligence. And he was exposed to digital electronics.  All of these elements would come together in his next design, the ACE.

8 8 Automatic Computing Engine: ACE  In 1945, Turing’s proposed to build the ACE, the first electronic program-oriented digital computer. Turing’s proposal provided supplied detailed circuit designs and specifications of hardware units, specimen programs in machine code, and even an estimate of the cost of building the machine, somewhere around 11,000 pounds. However, progress on this machine was limited due to the disorganization in NPL, National Physics Laboratory, and a lack of sufficient memory the design required, some where around the size of the early Apple computers

9 9 Ideas Lead to Another Design  The heads of NPL had predicted the DEUCE, the commercial version of the ACE, would only sell three units. It sold thirty. Numerous other designs were based on the ACE, including the G15, Packard-Bell PB250 and the MOSAIC, used for air defense during the Cold War. The logic behind the ACE, the electric stored-program digital computer, was to be used to build the Ferranti Mark I, with programming written by Turing. This computer was Britain's first general-purpose digital computer and had working AI for chess and checkers

10 10 The Problem of Memory  The ACE used mercury-filled tubes for their high-speed memory design. This was called acoustic memory as it originated from radar. Mercury delay lines were added so that the computer could get either 0’s or 1’s, indicating a certain action that should be taken.  This, however, wasted time as no random access could be obtained. Turing tried to tackle this problem and succeeded in creating optimum coding.

11 11 Optimum Coding  In this system, instructions were not stored in consecutive positions but rather in relative positions that could be selected by the programmer so that each instruction could emerge when it was needed.  Each instruction also indicated where the next instruction was located.  This increased the challenge of programming but also increased the speed of the computer, a worthwhile exchange.

12 12 Importance  His breakthrough in designing the fundamental idea behind every computer program was essential in builidign the first digital program-stored computer.  The implementation of this design assured that the computer could change quickly and easily to fit a new demand by simply changing the programmed instructions that it followed.  He also improved on the speed of the computer and increased its ability to process more memory-consuming assignments.

13 13 Decidability and Partial Decidability

14 14  An alphabet is a finite set of symbols. Example: a,b,c are symbols; {a,b,c} is an alphabet. Example: 0,1 are symbols; {0,1} is an alphabet.   (Sigma) represents an alphabet.  A string over  is a sequence of symbols from . Example: 01001 is a string over {0,1} Example: aabbaaa is a string over {a,b,c}   * is the set of all finite strings over 

15 15 Example: {0,1}* is the set of all finite binary strings  Note that the input to a Turing machine is a string of tape symbols.  The output to a Turing machine is also a string of symbols.

16 16  A problem is a set of yes-no questions.  A problem consists of a set of objects (instances of the problem) called the base set, together with a right answer, either “yes” or “no”, for each object. Example: Blank tape halting problem.  Base set: set of all Turing machines  Instance of the problem: A Turing machine M  Right answer for M: “Yes” if TM M halts on blank tape, “no” if not

17 17 Example: Student passing problem  Base set: set of all comp006 students  Instance of problem: A particular student A  Right answer for A: “Yes” if student A passes, “no” if not  If P is a problem then  P, the complement of P, is P with the “yes” and “no” answers interchanged.

18 18 The complement of the blank tape halting problem is the blank tape non-halting problem, in which the answer is “yes” if the TM fails to halt on blank tape, and “no” if it halts. The complement of the passing problem is the failing problem.  A problem may have one or more encodings which represent instances of the problem as strings of symbols. For the blank tape halting problem an encoding represents Turing machines as strings of symbols.

19 19 For the passing problem an encoding represents students as strings of symbols.  Let S be the base set of a problem P and let x be an element of S. A Turing machine M solves the instance x of P if M gives the right answer on the encoding x’ of x and halts. M can print “yes” or “no” on the tape M can halt in state “y” or “n”  M solves a problem P if M gives the right answer on all instances of P, and halts.

20 20 M solves the blank tape halting problem if M, given an encoding of Turing machine T, always halts and answers “yes” if T halts on blank tape, and “no” if not. M solves the passing problem if M, given an encoding of a student A, halts and answers “yes” if A passes, and halts and answers “no” if A fails.

21 21  A problem P is decidable (solvable) if there is a Turing machine T that solves P; such a T always halts. Else P is undecidable (unsolvable).  A problem P is semidecidable (partially decidable, partially solvable) if there is a Turing machine T that partially solves P; such a T solves all instances of P for which the right answer is “yes”, but fails to halt for all instances of P for which the right answer is “no”.

22 22 The blank tape halting problem is semidecidable if there is a Turing machine M that, given an encoding of TM T, halts and says “yes” if T halts on blank tape, but M fails to halt if T fails to halt on blank tape The passing problem is semidecidable if there is a Turing machine M that, given an encoding of a student A, halts and says “yes” if A passes the course, but fails to halt if A fails the course. Any problem whose base set is finite, is decidable! Can you see why? Even if we don’t know the answer the problem is decidable.

23 23  If P is decidable then P is semidecidable.  If P is semidecidable and  P is semidecidable then P is decidable.  Let P yes be the set of encodings of instances x of P such that the right answer is “yes.”  Let P no be the set of encodings of instances x of P such that the right answer is “no.”

24 24  For the blank tape halting problem, P yes is the set of encodings of Turing machines that halt on blank tape. P no is the set of encodings of Turing machines that do not halt on blank tape.  For the passing problem P yes is the set of encodings of students who pass the course and P no is the set of encodings of students who do not pass the course.

25 25  If P is semidecidable then P yes is called recursively enumerable.  If P is decidable, P yes and P no are said to be recursive.  Functions can also be Turing computable  A function f from strings to strings is Turing computable if whenever the Turing machine starts with x on the tape, it ends with f(x) on the tape  Encode integers and tuples of integers as strings

26 26  Thus one defines computability of functions on integers  The common functions (addition, multiplication, subtraction) on integers are all computable by Turing machines  Not all functions are computable by Turing machines. The “busy beaver function” is not computable

27 27 The two functions defined below, called Busy Beaver functions, were introduced in 1962 by Tibor Rado as simple examples ofTibor Rado 1963noncomputable functions: Σ(n): the largest number of 1's printable by an n-state machine before halting, and S(n): the largest number of steps taken by an n-state machine before halting.

28 28 These functions are well defined since there exist only a finite number of n-state machines(we implicitly assume a fixed set of symbols). However they are noncomputable, because they grow faster than any computable function. Even with only a few states, a Turing machine can do a lot and still be halting. noncomputablecomputable function

29 29  All primitive recursive functions are Turing computable. Primitive recursive functions take natural numbers or tuples of natural numbers as arguments and produce a natural number natural numberstuples

30 30  Some computable functions are not primitive recursive (Ackermann’s function)

31 31 His Death and After  He committed suicide on June 8, 1954, poisoned by cyanide.  Only in 1998, did the British government officially recognize his birthplace and unveil the official Blue Plaque there.

32 32 Context-Free Grammars example {A0 A 1 } {AB} {B#} Substitution rules or productions

33 33 Quantifiers … an important (vital) mathematical notion A E means “for all” means “there exists” Let statement S be: a, b, c, d such that  (a,b,c,d) = “true” The opposite of S (not S) is: a, b, c, d such that  (a,b,c,d) = “false” A A EE A A EE

34 34 Turing Machines A Turing Machine is as a theoretical model used for determining what is computable, and how quickly

35 35

36 36 States and a tape A R Input & Scratch Work

37 37 Turing Machines … continued A Turing machine’s tape is considered to have a left end and continue infinitely to the right The actions of a Turing machine are determined by what state the machine is in, and what symbol it reads off the tape. Depending on these two factors, the machine may move along the tape, write to the tape, and/or enter a different state.

38 38 Even more about Turing machines When a Turing machine begins computation, its tape is blank except for an input string on one end. The Turing machine computes based on the input. It may decide to accept or reject the input string, or it may compute forever.

39 39 Accepting states One of a Turing machine’s states is the accept state. If the machine ever reaches this state, it stops computation and its input string is considered to be in the language recognized by that machine.

40 40 Rejection A Turing machine also may have a rejecting state. If a Turing machine ever enters this state, it ceases computation and its input string is considered not to be in the language recognized by that Turing machine.

41 41 Undecidability Some strings may cause a Turing machine to compute forever. These strings are said to be undecidable by that machine and are not considered to be in the language recognized by the Turing machine.

42 42 Turing Machines -- definition A Turing machine is a 7-tuple: (Q,  q 0, q accept, q reject ) Q:set of states  : input alphabet  : tape alphabet, including  and a blank symbol U  : Q x   Q x  x {L,R} q 0 :start state q accept : accept state q reject : reject state

43 43 T.M. M accepts w iff M enters the accept state while computing on w We will also use “M(w) = 1”

44 44 Decidability A Language L is decidable iff there is a Turing Machine M such that M accepts every string in L and rejects every string in L A recursive language is a decidable language

45 45 Recognizability A Language L is recognizable iff there is a Turing Machine M such that M accepts every string in L and either rejects or fails to halt on every string in L A recursively enumerable language is a recognizable language

46 46 Church/Turing Thesis Anything that an algorithm can compute can be computed by a Turing machine and vica-a-versa.

47 47 Non-Deterministic Turing Machines -- definition A Non-deterministic Turing machine is a 7-tuple: (Q,  q 0, q accept, q reject ) Q:set of states  : input alphabet  : tape alphabet, including  and a blank symbol U  : Q x  P (Q x  x {L,R}) q 0 :start state q accept : accept state q reject : reject state

48 48 What it means for a non-deterministic T.M. N to accept a string w N accepts w iff there exists a finite sequence of configurations C 1 … C k such that: C 1 is N in the start state, the input at the leftmost end of the tape, and the tape head at the leftmost end of the tape For all j, 0<j<k, there if C j = (q, TC, HP), then C j+1 = (q’, TC’, HP’) where there is (q’, TC’(HP), X) in  (q,TC(HP)) and if X=R, HP’ = HP+1 and if X = L, HP’ = max(0, HP-1). C k = (q accept, TC, HP)

49 49 Diagonalization Arguments e.g. the cardinality of R[0,1] is more than the cardinality of Z + Proof by Diagonalization (special case of proof by contradiction)

50 50 Theorem: For every Non-Deterministic Turing Machine M N, recognizing language L(M N ), there is a Deterministic Turing Machine M D such that M D recognizes L(M N )


Download ppt "1 Alan Turing. 2 The Vision  Alan Turing, regarded by some as the father of computer science, was among the first to envision the power of a computer."

Similar presentations


Ads by Google