Download presentation

Presentation is loading. Please wait.

Published byMiranda Page Modified about 1 year ago

1
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale of computers, math, problem solving, life, love and tragic death

2
Don’t panic! We’re generous with extra credit The class is absolutely curved… usually heavily Curve assessed before extra credit I am open to requests for changing the grading scheme provided: The new scheme is proposed by a student and accompanied by a reasonable fairness argument (Have fun with this! The exercise could be useful in asking for a raise in the future.) The originally posted scheme remains a lower bound on each student’s grade The scheme is approved by class vote. Midterm Grading

3
Closure Properties of Decidable Languages

4
Theorem: The decidable langs are closed under concatenation. Using a 3-tape machine: Tape 1: save input remember factor attempts Tape 2: tape for Machine 1 Tape 3: tape for Machine 2 Closure Properties of Decidable Languages abba$0 indexinput a abba 1 bba

5
Theorem: The decidable langs are closed under concatenation. Using non-determinism: Tape 1: input Tape 2: tape for Machine 1 Tape 3: tape for Machine 2 Copy some characters from the first tape to tape 2 Nondeterminstically decide when to copy the rest onto tape 3 Closure Properties of Decidable Languages abba ab ba

6
Theorem: The decidable langs are closed under Kleene star. Similar to concatenation, but now we also try all possible numbers of concatenations. Tape 1: abba$0$ index input Number of concatenations

7
Closure Properties of Decidable Languages Theorem: The decidable langs are closed under Kleene star. Similar to concatenation, but now we also try all possible numbers of concatenations. Alternative method using non-determinism: Non-deterministically insert $’s into the input. The machine must accept each of these substrings. a$bb$a

8
Bogus Sentences “In a very real sense, these problems are beyond the theoretical limits of computation.” [referring to problems unsolvable by Turing Machines] Why it’s not bogus: Turing machines have become the definition of computation. “Students commonly ask this question, especially when preparing solutions to exercises and problems…” [the question being about proper level of detail] Why it’s not bogus: My inbox last week disagrees

9
My Bogus Sentence “A turing machine can do everything a real computer can do.” Correctly guessed by Tory Steining. Why it’s bogus: Things “real” computers can do: Stop a doorLodge fish Generate Heat Snuggle

10
We have shown now: Regular TM 2-tape, 2-head TM “Can be simulated by” 3-tape, 3-head TM 2-dimensional TM Nondeterministic TM 2-PDA

11
Can a TM simulate a TM? Can one TM simulate every TM? Yes, obviously.

12
An every Turing Machine Input: Output: result of running M on w Universal Turing Machine M w Output Tape for running TM- M starting on tape w How do we know these exist?

13
Examples of Universal Turing Machines

14
See: Lego Turing Machines

15
Tinker Toy Computers Plays tic-tac-toe!

16
Hydraulic Computers Wire Resistor Transistor Capacitor Diode Simple circuit Theorem: fluid-based “circuits” are Turing-complete / universal!

17
Universal Turing Machines People have designed Universal Turing Machines with – 4 symbols, 7 states (Marvin Minsky) – 4 symbols, 5 states – 2 symbols, 22 states – 18 symbols, 2 states – 2 states, 5 symbols (Stephen Wolfram) November 2007: 2 state, 3 symbols

18
2-state, 3-symbol Universal TM Sequence of configurations

19
Of course, simplicity is in the eye of the beholder. The 2,3 Turing machine described in the dense new 40-page proof “chews up a lot of tape” to perform even a simple job, Smith says. Programming it to calculate 2 + 2, he notes, would take up more memory than any known computer contains. And image processing? “It probably wouldn't finish before the end of the universe,” he says. Alex Smith, University of Birmingham

20
Acceptance Problem Input: A Turing Machine M and an input w. Output: Yes/no indicating if M eventually enters q Accept on input w. How can we state this as a language problem?

21
Acceptance Language A TM = { | M is a TM description and M accepts input w } If we can decide if a string is in A TM, then we can solve the Acceptance Problem (as defined on the previous slide). Is A TM Turing-recognizable?

22
Turing-Recognizable A language L is “Turing-recognizable” if there exists a TM M such that for all strings w : – If w L eventually M enters q accept – If w L either M enters q reject or M never terminates

23
Recognizing A TM Run a UTM on to simulate running M on w. If the UTM accepts, is in A TM. Universal Turing Machine M w Output Tape for running TM- M starting on tape w

24
Recognizable Languages Recognizability of A TM Decidable Languages Regular Languages CFLs finite Languages Deterministic CFLs A TM Is it inside the Decidable circle?

25
Undecidability of A TM Proof-by-contradiction. We will show how to construct a TM for which it is impossible to decide A TM. Define D ( ) = Construct a TM that: Outputs the opposite of the result of simulating H on input > Assume there exists some TM H that decides A TM. If M accepts its own description, D( ) rejects. If M rejects its own description, D( ) accepts.

26
Reaching a Contradiction What happens if we run D on its own description, ? Define D ( ) = Construct a TM that: Outputs the opposite of the result of simulating H on input > Assume there exists some TM H that decides A TM. If M accepts its own description, D( ) rejects. If M rejects its own description, D( ) accepts. If D accepts its own description, D( ) rejects. If D rejects its own description, D( ) accepts. substituting D for M…

27
Reaching a Contradiction Define D ( ) = Construct a TM that: Outputs the opposite of the result of simulating H on input > Assume there exists some TM H that decides A TM. If D accepts : H(D, ) accepts and D( ) rejects If D rejects, H(D, ) rejects and D( ) accepts Whatever D does, it must do the opposite, so there is a contraction!

28
Proving Undecidability Define D ( ) = Construct a TM that: Outputs the opposite of the result of simulating H on input > Assume there exists some TM H that decides A TM. Whatever D does, it must do the opposite, so there is a contraction! So, D cannot exist. But, if H exists, we know how to make D. So, H cannot exist. Thus, there is no TM that decides A TM.

Similar presentations

© 2016 SlidePlayer.com Inc.

All rights reserved.

Ads by Google