SlideShare a Scribd company logo
1 of 26
David Evans
http://www.cs.virginia.edu/evans
cs302: Theory of Computation
University of Virginia
Computer Science
Lecture 16:
Universality and
Undecidability
PS4 is due now
Some people have still not
picked up Exam 1! After next
week Wednesday, I will start
charging “storage fees” for
them.
2
Lecture 16: Undecidability and Universality
Menu
• Simulating Turing Machines
• Universal Turing Machines
• Undecidability
3
Lecture 16: Undecidability and Universality
Proof-by-Simulation
= Proof-by-Construction
To show an A (some class of machines) is as powerful as
a B (some class of machines) we need to show that
for any B, there is some equivalent A.
Proof-by-construction:
Given any b  B, construct an a  A that
recognizes the same language as b.
Proof-by-simulation:
Show that there is some A that can
simulate any B.
Either of these shows:
languages that can be recognized by a B  languages that can be recognized by an A
4
Lecture 16: Undecidability and Universality
TM Simulations
Regular TM
2-tape, 2-head TM
3-tape, 3-head TM
“Can be
simulated
by”
If there is a path from
M to Regular TM
and a path from
Regular TM to M
then M is equivalent
to a Regular TM
5
Lecture 16: Undecidability and Universality
TM Simulations
Regular TM
2-tape, 2-head TM
3-tape, 3-head TM
2-dimensional TM
Nondeterministic TM
2-DPDA+
PS4:3
6
Lecture 16: Undecidability and Universality
Can a TM simulate a TM?
Can one TM simulate every TM?
Yes, obviously.
7
Lecture 16: Undecidability and Universality
An Any TM Simulator
Input: < Description of some TM M, w >
Output: result of running M on w
Universal
Turing
Machine
M
w
Output
Tape
for running
TM-M
starting on
tape w
8
Lecture 16: Undecidability and Universality
Manchester Illuminated Universal Turing Machine, #9
from http://www.verostko.com/manchester/manchester.html
9
Lecture 16: Undecidability and Universality
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
10
Lecture 16: Undecidability and Universality
2-state, 3-symbol Universal TM
Sequence
of
configurations
11
Lecture 16: Undecidability and Universality
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
12
Lecture 16: Undecidability and Universality
Rough Sketch of Proof
System 0 (the claimed UTM)
can simulate System 1
which can simulate System 2
which can simulate System 3
which can simulate System 4
which can simulate System 5
which can simulate any 2-color
cyclic tag system
which can simulate any TM.
See http://www.wolframscience.com/prizes/tm23/TM23Proof.pdf
for the 40-page version with all the details…
None of these
steps involve
universal
computation
themselves
13
Lecture 16: Undecidability and Universality
Enumerating Turing Machines
• Now that we’ve decided how to describe
Turing Machines, we can number them
• TM-5023582376 = balancing parens
• TM-57239683 = even number of 1s
• TM-3523796834721038296738259873 = Universal TM
• TM-3672349872381692309875823987609823712347823 = WindowsXP
Not the real numbers
– they would be
much much much
much much bigger!
14
Lecture 16: Undecidability and Universality
Acceptance Problem
Input: A Turing Machine M and an input w.
Output: Yes/no indicating if M eventually enters
qAccept on input w.
How can we state this as a language problem?
15
Lecture 16: Undecidability and Universality
Acceptance Language
ATM = { <M, w> | M is a TM description
and M accepts input w }
If we can decide if a string is in ATM, then we can
solve the Acceptance Problem (as defined on the previous slide).
Is ATM Turing-recognizable?
16
Lecture 16: Undecidability and Universality
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 qaccept
– If w  L either M enters qreject
or M never terminates
… if there exists a TM M such that for all strings w:
– If w  L eventually M enters qaccept or M never terminates
– If w  L either M enters qreject or M never terminates
In a previous lecture, I incorrectly defined it as:
Why can’t this be the right definition?
17
Lecture 16: Undecidability and Universality
Recognizing ATM
Run a UTM on <M, w> to simulate running M
on w. If the UTM accepts, <M, w> is in ATM.
Universal
Turing
Machine
M
w
Output
Tape
for running
TM-M
starting on
tape w
18
Lecture 16: Undecidability and Universality
Recognizability of ATM
Decidable
Recognizable
ATM
Is it inside the Decidable circle?
19
Lecture 16: Undecidability and Universality
Undecidability of ATM
• Proof-by-contradiction. We will show how to
construct a TM for which it is impossible to
decide ATM.
Define D (<M>) = Construct a TM that:
Outputs the opposite of the result of simulating
H on input <M, <M>>
Assume there exists some TM H that decides ATM.
If M accepts its own description <M>, D(<M>) rejects.
If M rejects its own description <M>, D(<M>) accepts.
20
Lecture 16: Undecidability and Universality
Reaching a Contradiction
What happens if we run D on its own description, <D>?
Define D (<M>) = Construct a TM that:
Outputs the opposite of the result of simulating
H on input <M, <M>>
Assume there exists some TM H that decides ATM.
If M accepts its own description <M>, D(<M>) rejects.
If M rejects its own description <M>, D(<M>) accepts.
If D accepts its own description <D>, D(<D>) rejects.
If D rejects its own description <D>, D(<D>) accepts.
substituting
D for M…
21
Lecture 16: Undecidability and Universality
Reaching a Contradiction
Define D (<M>) = Construct a TM that:
Outputs the opposite of the result of simulating
H on input <M, <M>>
Assume there exists some TM H that decides ATM.
If D accepts <D>:
H(D, <D>) accepts and D(<D>) rejects
If D rejects <D>,
H(D, <D>) rejects and D(<D>) accepts
Whatever D does, it must do the opposite, so there is a contraction!
22
Lecture 16: Undecidability and Universality
Proving Undecidability
Define D (<M>) = Construct a TM that:
Outputs the opposite of the result of simulating
H on input <M, <M>>
Assume there exists some TM H that decides ATM.
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 ATM.
23
Lecture 16: Undecidability and Universality
Recognizability of ATM
Decidable
Recognizable
ATM
Are there any languages outside Turing-Recognizable?
24
Lecture 16: Undecidability and Universality
Recall: 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 qaccept
– If w  L either M enters qreject
or M never terminates
If M is Turing-recognizable and the complement of M is Turing-
recognizable, what is M?
25
Lecture 16: Undecidability and Universality
An Unrecognizable Language
Decidable
Recognizable
ATM
ATM
26
Lecture 16: Undecidability and Universality
Charge
• Next week:
– How to you prove a problem is undecidable
– How long can a TM that eventually halts run?
• PS5 will be posted by Saturday, and due
April 1 (this is a change from the original
syllabus when it was due March 27)
• Exam 2 will be April 8 as originally scheduled

More Related Content

Similar to class16.ppt

How Hard Can a Problem Be ?
How Hard Can a Problem Be ?How Hard Can a Problem Be ?
How Hard Can a Problem Be ?Ahmed Saeed
 
Winter 12 Lecture Mapping Reducibility.pptx
Winter 12 Lecture Mapping Reducibility.pptxWinter 12 Lecture Mapping Reducibility.pptx
Winter 12 Lecture Mapping Reducibility.pptxHarisPrince
 
Turing Goes to Church
Turing Goes to ChurchTuring Goes to Church
Turing Goes to ChurchSteve Poling
 
Class 36: Halting Problem
Class 36: Halting ProblemClass 36: Halting Problem
Class 36: Halting ProblemDavid Evans
 
churchturingthesis-160906170827.pptx
churchturingthesis-160906170827.pptxchurchturingthesis-160906170827.pptx
churchturingthesis-160906170827.pptxmukul narayana
 
The complexity of promise problems with applications to public-key cryptography
The complexity of promise problems with applications to public-key cryptographyThe complexity of promise problems with applications to public-key cryptography
The complexity of promise problems with applications to public-key cryptographyXequeMateShannon
 
Turing machine seminar report
Turing machine seminar reportTuring machine seminar report
Turing machine seminar reportYashwant Dagar
 
A Numerical Method for the Evaluation of Kolmogorov Complexity, An alternativ...
A Numerical Method for the Evaluation of Kolmogorov Complexity, An alternativ...A Numerical Method for the Evaluation of Kolmogorov Complexity, An alternativ...
A Numerical Method for the Evaluation of Kolmogorov Complexity, An alternativ...Hector Zenil
 
Winter 11 Lecture Reducibility.pptx
Winter 11 Lecture Reducibility.pptxWinter 11 Lecture Reducibility.pptx
Winter 11 Lecture Reducibility.pptxHarisPrince
 
Computational Complexity: Introduction-Turing Machines-Undecidability
Computational Complexity: Introduction-Turing Machines-UndecidabilityComputational Complexity: Introduction-Turing Machines-Undecidability
Computational Complexity: Introduction-Turing Machines-UndecidabilityAntonis Antonopoulos
 
Church Turing Thesis
Church Turing ThesisChurch Turing Thesis
Church Turing ThesisHemant Sharma
 

Similar to class16.ppt (20)

NP completeness
NP completenessNP completeness
NP completeness
 
How Hard Can a Problem Be ?
How Hard Can a Problem Be ?How Hard Can a Problem Be ?
How Hard Can a Problem Be ?
 
Winter 12 Lecture Mapping Reducibility.pptx
Winter 12 Lecture Mapping Reducibility.pptxWinter 12 Lecture Mapping Reducibility.pptx
Winter 12 Lecture Mapping Reducibility.pptx
 
Turing Goes to Church
Turing Goes to ChurchTuring Goes to Church
Turing Goes to Church
 
chapter 2.pptx
chapter 2.pptxchapter 2.pptx
chapter 2.pptx
 
CS.15.Turing.pdf
CS.15.Turing.pdfCS.15.Turing.pdf
CS.15.Turing.pdf
 
Turing machine
Turing machineTuring machine
Turing machine
 
Lecture 2 Message Authentication
Lecture 2   Message AuthenticationLecture 2   Message Authentication
Lecture 2 Message Authentication
 
Class 36: Halting Problem
Class 36: Halting ProblemClass 36: Halting Problem
Class 36: Halting Problem
 
Algoritmic Information Theory
Algoritmic Information TheoryAlgoritmic Information Theory
Algoritmic Information Theory
 
churchturingthesis-160906170827.pptx
churchturingthesis-160906170827.pptxchurchturingthesis-160906170827.pptx
churchturingthesis-160906170827.pptx
 
The complexity of promise problems with applications to public-key cryptography
The complexity of promise problems with applications to public-key cryptographyThe complexity of promise problems with applications to public-key cryptography
The complexity of promise problems with applications to public-key cryptography
 
Turing machine seminar report
Turing machine seminar reportTuring machine seminar report
Turing machine seminar report
 
Report mi scontinue
Report mi scontinueReport mi scontinue
Report mi scontinue
 
A Numerical Method for the Evaluation of Kolmogorov Complexity, An alternativ...
A Numerical Method for the Evaluation of Kolmogorov Complexity, An alternativ...A Numerical Method for the Evaluation of Kolmogorov Complexity, An alternativ...
A Numerical Method for the Evaluation of Kolmogorov Complexity, An alternativ...
 
Winter 11 Lecture Reducibility.pptx
Winter 11 Lecture Reducibility.pptxWinter 11 Lecture Reducibility.pptx
Winter 11 Lecture Reducibility.pptx
 
TOC 10 | Turing Machine
TOC 10 | Turing MachineTOC 10 | Turing Machine
TOC 10 | Turing Machine
 
Computational Complexity: Introduction-Turing Machines-Undecidability
Computational Complexity: Introduction-Turing Machines-UndecidabilityComputational Complexity: Introduction-Turing Machines-Undecidability
Computational Complexity: Introduction-Turing Machines-Undecidability
 
Church Turing Thesis
Church Turing ThesisChurch Turing Thesis
Church Turing Thesis
 
QB104545.pdf
QB104545.pdfQB104545.pdf
QB104545.pdf
 

Recently uploaded

Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction managementMariconPadriquez1
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitterShivangiSharma879191
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
Comparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization TechniquesComparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization Techniquesugginaramesh
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 

Recently uploaded (20)

Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction management
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
Comparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization TechniquesComparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization Techniques
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 

class16.ppt

  • 1. David Evans http://www.cs.virginia.edu/evans cs302: Theory of Computation University of Virginia Computer Science Lecture 16: Universality and Undecidability PS4 is due now Some people have still not picked up Exam 1! After next week Wednesday, I will start charging “storage fees” for them.
  • 2. 2 Lecture 16: Undecidability and Universality Menu • Simulating Turing Machines • Universal Turing Machines • Undecidability
  • 3. 3 Lecture 16: Undecidability and Universality Proof-by-Simulation = Proof-by-Construction To show an A (some class of machines) is as powerful as a B (some class of machines) we need to show that for any B, there is some equivalent A. Proof-by-construction: Given any b  B, construct an a  A that recognizes the same language as b. Proof-by-simulation: Show that there is some A that can simulate any B. Either of these shows: languages that can be recognized by a B  languages that can be recognized by an A
  • 4. 4 Lecture 16: Undecidability and Universality TM Simulations Regular TM 2-tape, 2-head TM 3-tape, 3-head TM “Can be simulated by” If there is a path from M to Regular TM and a path from Regular TM to M then M is equivalent to a Regular TM
  • 5. 5 Lecture 16: Undecidability and Universality TM Simulations Regular TM 2-tape, 2-head TM 3-tape, 3-head TM 2-dimensional TM Nondeterministic TM 2-DPDA+ PS4:3
  • 6. 6 Lecture 16: Undecidability and Universality Can a TM simulate a TM? Can one TM simulate every TM? Yes, obviously.
  • 7. 7 Lecture 16: Undecidability and Universality An Any TM Simulator Input: < Description of some TM M, w > Output: result of running M on w Universal Turing Machine M w Output Tape for running TM-M starting on tape w
  • 8. 8 Lecture 16: Undecidability and Universality Manchester Illuminated Universal Turing Machine, #9 from http://www.verostko.com/manchester/manchester.html
  • 9. 9 Lecture 16: Undecidability and Universality 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
  • 10. 10 Lecture 16: Undecidability and Universality 2-state, 3-symbol Universal TM Sequence of configurations
  • 11. 11 Lecture 16: Undecidability and Universality 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
  • 12. 12 Lecture 16: Undecidability and Universality Rough Sketch of Proof System 0 (the claimed UTM) can simulate System 1 which can simulate System 2 which can simulate System 3 which can simulate System 4 which can simulate System 5 which can simulate any 2-color cyclic tag system which can simulate any TM. See http://www.wolframscience.com/prizes/tm23/TM23Proof.pdf for the 40-page version with all the details… None of these steps involve universal computation themselves
  • 13. 13 Lecture 16: Undecidability and Universality Enumerating Turing Machines • Now that we’ve decided how to describe Turing Machines, we can number them • TM-5023582376 = balancing parens • TM-57239683 = even number of 1s • TM-3523796834721038296738259873 = Universal TM • TM-3672349872381692309875823987609823712347823 = WindowsXP Not the real numbers – they would be much much much much much bigger!
  • 14. 14 Lecture 16: Undecidability and Universality Acceptance Problem Input: A Turing Machine M and an input w. Output: Yes/no indicating if M eventually enters qAccept on input w. How can we state this as a language problem?
  • 15. 15 Lecture 16: Undecidability and Universality Acceptance Language ATM = { <M, w> | M is a TM description and M accepts input w } If we can decide if a string is in ATM, then we can solve the Acceptance Problem (as defined on the previous slide). Is ATM Turing-recognizable?
  • 16. 16 Lecture 16: Undecidability and Universality 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 qaccept – If w  L either M enters qreject or M never terminates … if there exists a TM M such that for all strings w: – If w  L eventually M enters qaccept or M never terminates – If w  L either M enters qreject or M never terminates In a previous lecture, I incorrectly defined it as: Why can’t this be the right definition?
  • 17. 17 Lecture 16: Undecidability and Universality Recognizing ATM Run a UTM on <M, w> to simulate running M on w. If the UTM accepts, <M, w> is in ATM. Universal Turing Machine M w Output Tape for running TM-M starting on tape w
  • 18. 18 Lecture 16: Undecidability and Universality Recognizability of ATM Decidable Recognizable ATM Is it inside the Decidable circle?
  • 19. 19 Lecture 16: Undecidability and Universality Undecidability of ATM • Proof-by-contradiction. We will show how to construct a TM for which it is impossible to decide ATM. Define D (<M>) = Construct a TM that: Outputs the opposite of the result of simulating H on input <M, <M>> Assume there exists some TM H that decides ATM. If M accepts its own description <M>, D(<M>) rejects. If M rejects its own description <M>, D(<M>) accepts.
  • 20. 20 Lecture 16: Undecidability and Universality Reaching a Contradiction What happens if we run D on its own description, <D>? Define D (<M>) = Construct a TM that: Outputs the opposite of the result of simulating H on input <M, <M>> Assume there exists some TM H that decides ATM. If M accepts its own description <M>, D(<M>) rejects. If M rejects its own description <M>, D(<M>) accepts. If D accepts its own description <D>, D(<D>) rejects. If D rejects its own description <D>, D(<D>) accepts. substituting D for M…
  • 21. 21 Lecture 16: Undecidability and Universality Reaching a Contradiction Define D (<M>) = Construct a TM that: Outputs the opposite of the result of simulating H on input <M, <M>> Assume there exists some TM H that decides ATM. If D accepts <D>: H(D, <D>) accepts and D(<D>) rejects If D rejects <D>, H(D, <D>) rejects and D(<D>) accepts Whatever D does, it must do the opposite, so there is a contraction!
  • 22. 22 Lecture 16: Undecidability and Universality Proving Undecidability Define D (<M>) = Construct a TM that: Outputs the opposite of the result of simulating H on input <M, <M>> Assume there exists some TM H that decides ATM. 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 ATM.
  • 23. 23 Lecture 16: Undecidability and Universality Recognizability of ATM Decidable Recognizable ATM Are there any languages outside Turing-Recognizable?
  • 24. 24 Lecture 16: Undecidability and Universality Recall: 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 qaccept – If w  L either M enters qreject or M never terminates If M is Turing-recognizable and the complement of M is Turing- recognizable, what is M?
  • 25. 25 Lecture 16: Undecidability and Universality An Unrecognizable Language Decidable Recognizable ATM ATM
  • 26. 26 Lecture 16: Undecidability and Universality Charge • Next week: – How to you prove a problem is undecidable – How long can a TM that eventually halts run? • PS5 will be posted by Saturday, and due April 1 (this is a change from the original syllabus when it was due March 27) • Exam 2 will be April 8 as originally scheduled