SlideShare a Scribd company logo
12.3 Universality
Recall the Turing Machine model from Chapter 6: a Turing Machine consists of
an infinite tape divided into discrete square into which symbols from a fixed alphabet
can be written, and a tape head that moves along the tape.
On each step, the tape head can read the symbol in the current square, write a symbol in
the current square, and move left or right one square or halt.
The machine can keep track of a finite number of possible states, and determines which
action to take based on a set of transition rules that specify the output symbol and head
action for a given current state and read symbol.
Turing argued that this simple model corresponds to our intuition about what can be
done using mechanical computation. Recall this was 1936, so the model for mechanical
computation was not what a mechanical computer can do, but what a human computer
can do.
Turing argued that his model corresponded to what a human computer could do
by following a systematic procedure: the infinite tape was as powerful as a two-
dimensional sheet of paper or any other recording medium, the set of symbols
must be finite otherwise it would not be possible to correctly distinguish all symbols,
and the number of machine states must be finite because there is a limited amount a
human can keep in mind at one time.
We can enumerate all possible Turing Machines. One way to see this is to devise
a notation for writing down any Turing Machine.
A Turing Machine is completely described by its alphabet, states and transition rules.
We could write down any Turing Machine by numbering each state and listing
each transition rule as a tuple of the current state, alphabet symbol, next state,
output symbol, and tape direction.
We can map each state and alphabet symbol to a number, and use this encoding to write
down a unique number for every possible Turing Machine. Hence, we can enumerate all
possible Turing Machines by just enumerating the positive integers.
Most positive integers do not correspond to valid Turing Machines, but if we go through
all the numbers we will eventually reach every possible Turing Machine.
This is step towards proving that some problems cannot be solved by any algorithm. The
number of Turing Machines is less than the number of real numbers.
Both numbers are infinite, but as explained in Section 1.2.2, Cantor's
diagonalization proof showed that the real numbers are not countable.
Any attempt to map the real numbers to the integers must fail to include all the
real numbers.
This means there are real numbers that cannot be produced by any Turing
Machine: there are fewer Turing Machines than there are real numbers, so there must
be some real numbers that cannot be produced by any Turing Machine.
The next step is to define the machine depicted in Figure 12.2. A Universal
Turing Machine is a machine that takes as input a number that identifies a Turing
Machine and simulates the specified Turing Machine running on initially empty input
tape.
The Universal Turing Machine can simulate any Turing Machine. In his proof, Turing
describes the transition rules for such a machine.
It simulates the Turing Machine encoded by the input number. One can imagine doing
this by using the tape to keep track of the state of the simulated machine.
For each step, the universal machine searches the description of the input machine to
find the appropriate rule. This is the rule for the current state of the simulated machine
on the current input symbol of the simulated machine.
The universal machine keeps track of the machine and tape state of the
simulated machine, and simulates each step. Thus, there is a single Turing
Machine that can simulate every Turing Machine.
Fig
ure 12.2: Universal Turing Machine..
Since a Universal Turing Machine can simulate every Turing Machine, and a
Turing Machine can perform any computation according to our intuitive
notion of computation, this means a Universal Turing Machine can perform all
computations.
Using the universal machine and a diagonalization argument similar to the one above
for the real numbers, Turing reached a similar contradiction for a problem analogous to
the Halting Problem for Python programs but for Turing Machines instead.
If we can simulate a Universal Turing Machine in a programming language, that
language is a universal programming language. There is some program that can
be written in that language to perform every possible computation.
To show that a programming language is universal, it is sufficient to show that it can
simulate any Turing Machine, since a Turing Machine can perform every possible
computation.
To simulate a Universal Turing Machine, we need some way to keep track of the state of
the tape (for example, the list datatypes in Scheme or Python would be adequate), a way
to keep track of the internal machine state (a number can do this), and a way to execute
the transition rules (we could define a procedure that does this using an if expression to
make decisions about which transition rule to follow for each step), and a way to keep
going (we can do this in Scheme with recursive applications).
Thus, Scheme is a universal programming language: one can write a Scheme program
to simulate a Universal Turing Machine, and thus, perform any mechanical
computation.
To show that a programming language is universal, it is sufficient to show that it can
simulate any Turing Machine, since a Turing Machine can perform every possible
computation.
To simulate a Universal Turing Machine, we need some way to keep track of the state of
the tape (for example, the list datatypes in Scheme or Python would be adequate), a way
to keep track of the internal machine state (a number can do this), and a way to execute
the transition rules (we could define a procedure that does this using an if expression to
make decisions about which transition rule to follow for each step), and a way to keep
going (we can do this in Scheme with recursive applications).
Thus, Scheme is a universal programming language: one can write a Scheme program
to simulate a Universal Turing Machine, and thus, perform any mechanical
computation.

More Related Content

What's hot

Turing Machine
Turing MachineTuring Machine
Turing Machine
Rajendran
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
AyAn KhAn
 
Working principle of Turing machine
Working principle of Turing machineWorking principle of Turing machine
Working principle of Turing machine
Karan Thakkar
 
Turing machine implementation
Turing machine implementationTuring machine implementation
Turing machine implementation
SinaRostami7
 
Church Turing Thesis
Church Turing ThesisChurch Turing Thesis
Church Turing Thesis
Hemant Sharma
 
Turing machine
Turing machineTuring machine
Turing machine
HimanshuSirohi6
 
Multi Head, Multi Tape Turing Machine
Multi Head, Multi Tape Turing MachineMulti Head, Multi Tape Turing Machine
Multi Head, Multi Tape Turing Machine
Radhakrishnan Chinnusamy
 
Turing machine
Turing machineTuring machine
Turing machine
Aafaqueahmad Khan
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
Rahul Narang
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
AniketKandara1
 
Turing machine
Turing machineTuring machine
Turing machine
Ashik Khan
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
Rajendran
 
Lec12-CS110 Computational Engineering
Lec12-CS110 Computational EngineeringLec12-CS110 Computational Engineering
Lec12-CS110 Computational Engineering
Sri Harsha Pamu
 
Volume 2-issue-6-2205-2207
Volume 2-issue-6-2205-2207Volume 2-issue-6-2205-2207
Volume 2-issue-6-2205-2207Editor IJARCET
 
Pattern Matching using Computational and Automata Theory
Pattern Matching using Computational and Automata TheoryPattern Matching using Computational and Automata Theory
Pattern Matching using Computational and Automata Theory
IRJET Journal
 
Distributed Computing Set 3 - Topics of non-Byzantine Consensus
Distributed Computing Set 3 - Topics of non-Byzantine ConsensusDistributed Computing Set 3 - Topics of non-Byzantine Consensus
Distributed Computing Set 3 - Topics of non-Byzantine Consensus
Osama Askoura
 
Distributed Computing On Topics of: Leader election + Byzantine algorithms)
Distributed Computing On Topics of: Leader election + Byzantine algorithms)Distributed Computing On Topics of: Leader election + Byzantine algorithms)
Distributed Computing On Topics of: Leader election + Byzantine algorithms)
Osama Askoura
 

What's hot (18)

Turing Machine
Turing MachineTuring Machine
Turing Machine
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
 
Turing machine by_deep
Turing machine by_deepTuring machine by_deep
Turing machine by_deep
 
Working principle of Turing machine
Working principle of Turing machineWorking principle of Turing machine
Working principle of Turing machine
 
Turing machine implementation
Turing machine implementationTuring machine implementation
Turing machine implementation
 
Church Turing Thesis
Church Turing ThesisChurch Turing Thesis
Church Turing Thesis
 
Turing machine
Turing machineTuring machine
Turing machine
 
Multi Head, Multi Tape Turing Machine
Multi Head, Multi Tape Turing MachineMulti Head, Multi Tape Turing Machine
Multi Head, Multi Tape Turing Machine
 
Turing machine
Turing machineTuring machine
Turing machine
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
 
Turing machine
Turing machineTuring machine
Turing machine
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
 
Lec12-CS110 Computational Engineering
Lec12-CS110 Computational EngineeringLec12-CS110 Computational Engineering
Lec12-CS110 Computational Engineering
 
Volume 2-issue-6-2205-2207
Volume 2-issue-6-2205-2207Volume 2-issue-6-2205-2207
Volume 2-issue-6-2205-2207
 
Pattern Matching using Computational and Automata Theory
Pattern Matching using Computational and Automata TheoryPattern Matching using Computational and Automata Theory
Pattern Matching using Computational and Automata Theory
 
Distributed Computing Set 3 - Topics of non-Byzantine Consensus
Distributed Computing Set 3 - Topics of non-Byzantine ConsensusDistributed Computing Set 3 - Topics of non-Byzantine Consensus
Distributed Computing Set 3 - Topics of non-Byzantine Consensus
 
Distributed Computing On Topics of: Leader election + Byzantine algorithms)
Distributed Computing On Topics of: Leader election + Byzantine algorithms)Distributed Computing On Topics of: Leader election + Byzantine algorithms)
Distributed Computing On Topics of: Leader election + Byzantine algorithms)
 

Viewers also liked

Creative education summit
Creative education summitCreative education summit
Creative education summit
Jack740
 
EPA's Environmental Justice Strategic Plan 2016-2020
EPA's Environmental Justice Strategic Plan 2016-2020EPA's Environmental Justice Strategic Plan 2016-2020
EPA's Environmental Justice Strategic Plan 2016-2020
Marcellus Drilling News
 
Eval q1
Eval q1 Eval q1
Eval q1
aaronrusk27
 
Actividad virtual 2
Actividad virtual 2Actividad virtual 2
Actividad virtual 2
carmen alicia Gamarra
 
Transform Your Business with Big Data and Hortonworks
Transform Your Business with Big Data and Hortonworks Transform Your Business with Big Data and Hortonworks
Transform Your Business with Big Data and Hortonworks
Pactera_US
 
Paisjet dalese te kompjuterit
Paisjet dalese te kompjuteritPaisjet dalese te kompjuterit
Paisjet dalese te kompjuterit
Bjorna_Danja Petriti
 
Birdwatching: an introduction
Birdwatching: an introduction Birdwatching: an introduction
Birdwatching: an introduction
Ashish Kothari
 
#Glocal16 Che aria tira sui dati ambientali in Italia
#Glocal16 Che aria tira sui dati ambientali in Italia #Glocal16 Che aria tira sui dati ambientali in Italia
#Glocal16 Che aria tira sui dati ambientali in Italia
Rosy Battaglia
 
Evaluation Activity 6
Evaluation Activity  6Evaluation Activity  6
Evaluation Activity 6
SHEKARIE
 
[Pem zhipeng Xie] reading notes《自控力》读书笔记
[Pem zhipeng Xie] reading notes《自控力》读书笔记[Pem zhipeng Xie] reading notes《自控力》读书笔记
[Pem zhipeng Xie] reading notes《自控力》读书笔记
Pem Zhipeng Xie
 
Asus eee-pc-1101 ha-netbook-manual
Asus eee-pc-1101 ha-netbook-manualAsus eee-pc-1101 ha-netbook-manual
Asus eee-pc-1101 ha-netbook-manual
Marcio J. Silva
 
How Executives Work with Private Equity
How Executives Work  with Private EquityHow Executives Work  with Private Equity
How Executives Work with Private EquityJohn A. Bova
 
Bases de datos scopus
Bases de datos scopusBases de datos scopus
Bases de datos scopus
Marina Ballesteros Mora
 
Pactera Big Data Solutions for Retail
Pactera Big Data Solutions for Retail Pactera Big Data Solutions for Retail
Pactera Big Data Solutions for Retail Pactera_US
 
Big Data with KNIME is as easy as 1, 2, 3, ...4!
Big Data with KNIME is as easy as 1, 2, 3, ...4!Big Data with KNIME is as easy as 1, 2, 3, ...4!
Big Data with KNIME is as easy as 1, 2, 3, ...4!
KNIMESlides
 
Ap ps tecnologicas
Ap ps tecnologicasAp ps tecnologicas
Ap ps tecnologicas
cielo vega bellido
 
Having Fun Building Web Applications (Day 1 Slides)
Having Fun Building Web Applications (Day 1 Slides)Having Fun Building Web Applications (Day 1 Slides)
Having Fun Building Web Applications (Day 1 Slides)
Clarence Ngoh
 

Viewers also liked (18)

Creative education summit
Creative education summitCreative education summit
Creative education summit
 
EPA's Environmental Justice Strategic Plan 2016-2020
EPA's Environmental Justice Strategic Plan 2016-2020EPA's Environmental Justice Strategic Plan 2016-2020
EPA's Environmental Justice Strategic Plan 2016-2020
 
Eval q1
Eval q1 Eval q1
Eval q1
 
Actividad virtual 2
Actividad virtual 2Actividad virtual 2
Actividad virtual 2
 
Transform Your Business with Big Data and Hortonworks
Transform Your Business with Big Data and Hortonworks Transform Your Business with Big Data and Hortonworks
Transform Your Business with Big Data and Hortonworks
 
Paisjet dalese te kompjuterit
Paisjet dalese te kompjuteritPaisjet dalese te kompjuterit
Paisjet dalese te kompjuterit
 
Birdwatching: an introduction
Birdwatching: an introduction Birdwatching: an introduction
Birdwatching: an introduction
 
#Glocal16 Che aria tira sui dati ambientali in Italia
#Glocal16 Che aria tira sui dati ambientali in Italia #Glocal16 Che aria tira sui dati ambientali in Italia
#Glocal16 Che aria tira sui dati ambientali in Italia
 
Evaluation Activity 6
Evaluation Activity  6Evaluation Activity  6
Evaluation Activity 6
 
Ghhh
GhhhGhhh
Ghhh
 
[Pem zhipeng Xie] reading notes《自控力》读书笔记
[Pem zhipeng Xie] reading notes《自控力》读书笔记[Pem zhipeng Xie] reading notes《自控力》读书笔记
[Pem zhipeng Xie] reading notes《自控力》读书笔记
 
Asus eee-pc-1101 ha-netbook-manual
Asus eee-pc-1101 ha-netbook-manualAsus eee-pc-1101 ha-netbook-manual
Asus eee-pc-1101 ha-netbook-manual
 
How Executives Work with Private Equity
How Executives Work  with Private EquityHow Executives Work  with Private Equity
How Executives Work with Private Equity
 
Bases de datos scopus
Bases de datos scopusBases de datos scopus
Bases de datos scopus
 
Pactera Big Data Solutions for Retail
Pactera Big Data Solutions for Retail Pactera Big Data Solutions for Retail
Pactera Big Data Solutions for Retail
 
Big Data with KNIME is as easy as 1, 2, 3, ...4!
Big Data with KNIME is as easy as 1, 2, 3, ...4!Big Data with KNIME is as easy as 1, 2, 3, ...4!
Big Data with KNIME is as easy as 1, 2, 3, ...4!
 
Ap ps tecnologicas
Ap ps tecnologicasAp ps tecnologicas
Ap ps tecnologicas
 
Having Fun Building Web Applications (Day 1 Slides)
Having Fun Building Web Applications (Day 1 Slides)Having Fun Building Web Applications (Day 1 Slides)
Having Fun Building Web Applications (Day 1 Slides)
 

Similar to universality

G044053060
G044053060G044053060
G044053060
inventy
 
Turing machine
Turing machineTuring machine
Turing machine
MuhammadSamranTanvee
 
modeling computing
modeling computingmodeling computing
modeling computing
Rajendran
 
analyzing procedures
analyzing proceduresanalyzing procedures
analyzing procedures
Rajendran
 
Free Ebooks Download ! Edhole
Free Ebooks Download ! EdholeFree Ebooks Download ! Edhole
Free Ebooks Download ! Edhole
Edhole.com
 
Analyzing algorithms
Analyzing algorithmsAnalyzing algorithms
Analyzing algorithms
Onkar Nath Sharma
 
compatibility and complexity in the IS.ppt
compatibility and complexity in the IS.pptcompatibility and complexity in the IS.ppt
compatibility and complexity in the IS.ppt
MuhammadAbdullah311866
 
Computation theory Assignment Help
Computation theory Assignment HelpComputation theory Assignment Help
Computation theory Assignment Help
Global Web Tutors
 
Bh2420282109
Bh2420282109Bh2420282109
Bh2420282109IJMER
 
Model of Computation-Turing Machine
Model of Computation-Turing MachineModel of Computation-Turing Machine
Model of Computation-Turing Machine
IOSR Journals
 
Algorithm Analysis.pdf
Algorithm Analysis.pdfAlgorithm Analysis.pdf
Algorithm Analysis.pdf
MemMem25
 
International Journal of Engineering and Science Invention (IJESI)
International Journal of Engineering and Science Invention (IJESI)International Journal of Engineering and Science Invention (IJESI)
International Journal of Engineering and Science Invention (IJESI)
inventionjournals
 
CS.15.Turing.pdf
CS.15.Turing.pdfCS.15.Turing.pdf
CS.15.Turing.pdf
YasirAli74993
 
O0262090097
O0262090097O0262090097
O0262090097
inventionjournals
 
O0262090097
O0262090097O0262090097
O0262090097
inventionjournals
 
Introduction to algorithms
Introduction to algorithmsIntroduction to algorithms
Introduction to algorithms
Madishetty Prathibha
 
Winter 8 TM.pptx
Winter 8 TM.pptxWinter 8 TM.pptx
Winter 8 TM.pptx
HarisPrince
 
C++ Standard Template Library
C++ Standard Template LibraryC++ Standard Template Library
C++ Standard Template Library
Ilio Catallo
 

Similar to universality (20)

G044053060
G044053060G044053060
G044053060
 
Turing machine
Turing machineTuring machine
Turing machine
 
modeling computing
modeling computingmodeling computing
modeling computing
 
analyzing procedures
analyzing proceduresanalyzing procedures
analyzing procedures
 
Report mi scontinue
Report mi scontinueReport mi scontinue
Report mi scontinue
 
Free Ebooks Download ! Edhole
Free Ebooks Download ! EdholeFree Ebooks Download ! Edhole
Free Ebooks Download ! Edhole
 
Analyzing algorithms
Analyzing algorithmsAnalyzing algorithms
Analyzing algorithms
 
compatibility and complexity in the IS.ppt
compatibility and complexity in the IS.pptcompatibility and complexity in the IS.ppt
compatibility and complexity in the IS.ppt
 
Computation theory Assignment Help
Computation theory Assignment HelpComputation theory Assignment Help
Computation theory Assignment Help
 
Bh2420282109
Bh2420282109Bh2420282109
Bh2420282109
 
Model of Computation-Turing Machine
Model of Computation-Turing MachineModel of Computation-Turing Machine
Model of Computation-Turing Machine
 
Algorithm Analysis.pdf
Algorithm Analysis.pdfAlgorithm Analysis.pdf
Algorithm Analysis.pdf
 
Cs2251 daa
Cs2251 daaCs2251 daa
Cs2251 daa
 
International Journal of Engineering and Science Invention (IJESI)
International Journal of Engineering and Science Invention (IJESI)International Journal of Engineering and Science Invention (IJESI)
International Journal of Engineering and Science Invention (IJESI)
 
CS.15.Turing.pdf
CS.15.Turing.pdfCS.15.Turing.pdf
CS.15.Turing.pdf
 
O0262090097
O0262090097O0262090097
O0262090097
 
O0262090097
O0262090097O0262090097
O0262090097
 
Introduction to algorithms
Introduction to algorithmsIntroduction to algorithms
Introduction to algorithms
 
Winter 8 TM.pptx
Winter 8 TM.pptxWinter 8 TM.pptx
Winter 8 TM.pptx
 
C++ Standard Template Library
C++ Standard Template LibraryC++ Standard Template Library
C++ Standard Template Library
 

More from Rajendran

Element distinctness lower bounds
Element distinctness lower boundsElement distinctness lower bounds
Element distinctness lower bounds
Rajendran
 
Scheduling with Startup and Holding Costs
Scheduling with Startup and Holding CostsScheduling with Startup and Holding Costs
Scheduling with Startup and Holding Costs
Rajendran
 
Divide and conquer surfing lower bounds
Divide and conquer  surfing lower boundsDivide and conquer  surfing lower bounds
Divide and conquer surfing lower bounds
Rajendran
 
Red black tree
Red black treeRed black tree
Red black tree
Rajendran
 
Hash table
Hash tableHash table
Hash table
Rajendran
 
Medians and order statistics
Medians and order statisticsMedians and order statistics
Medians and order statistics
Rajendran
 
Proof master theorem
Proof master theoremProof master theorem
Proof master theorem
Rajendran
 
Recursion tree method
Recursion tree methodRecursion tree method
Recursion tree method
Rajendran
 
Recurrence theorem
Recurrence theoremRecurrence theorem
Recurrence theorem
Rajendran
 
Master method
Master method Master method
Master method
Rajendran
 
Master method theorem
Master method theoremMaster method theorem
Master method theorem
Rajendran
 
Hash tables
Hash tablesHash tables
Hash tables
Rajendran
 
Lower bound
Lower boundLower bound
Lower bound
Rajendran
 
Master method theorem
Master method theoremMaster method theorem
Master method theorem
Rajendran
 
Greedy algorithms
Greedy algorithmsGreedy algorithms
Greedy algorithms
Rajendran
 
Longest common subsequences in Algorithm Analysis
Longest common subsequences in Algorithm AnalysisLongest common subsequences in Algorithm Analysis
Longest common subsequences in Algorithm Analysis
Rajendran
 
Dynamic programming in Algorithm Analysis
Dynamic programming in Algorithm AnalysisDynamic programming in Algorithm Analysis
Dynamic programming in Algorithm Analysis
Rajendran
 
Average case Analysis of Quicksort
Average case Analysis of QuicksortAverage case Analysis of Quicksort
Average case Analysis of Quicksort
Rajendran
 
Np completeness
Np completenessNp completeness
Np completeness
Rajendran
 
computer languages
computer languagescomputer languages
computer languages
Rajendran
 

More from Rajendran (20)

Element distinctness lower bounds
Element distinctness lower boundsElement distinctness lower bounds
Element distinctness lower bounds
 
Scheduling with Startup and Holding Costs
Scheduling with Startup and Holding CostsScheduling with Startup and Holding Costs
Scheduling with Startup and Holding Costs
 
Divide and conquer surfing lower bounds
Divide and conquer  surfing lower boundsDivide and conquer  surfing lower bounds
Divide and conquer surfing lower bounds
 
Red black tree
Red black treeRed black tree
Red black tree
 
Hash table
Hash tableHash table
Hash table
 
Medians and order statistics
Medians and order statisticsMedians and order statistics
Medians and order statistics
 
Proof master theorem
Proof master theoremProof master theorem
Proof master theorem
 
Recursion tree method
Recursion tree methodRecursion tree method
Recursion tree method
 
Recurrence theorem
Recurrence theoremRecurrence theorem
Recurrence theorem
 
Master method
Master method Master method
Master method
 
Master method theorem
Master method theoremMaster method theorem
Master method theorem
 
Hash tables
Hash tablesHash tables
Hash tables
 
Lower bound
Lower boundLower bound
Lower bound
 
Master method theorem
Master method theoremMaster method theorem
Master method theorem
 
Greedy algorithms
Greedy algorithmsGreedy algorithms
Greedy algorithms
 
Longest common subsequences in Algorithm Analysis
Longest common subsequences in Algorithm AnalysisLongest common subsequences in Algorithm Analysis
Longest common subsequences in Algorithm Analysis
 
Dynamic programming in Algorithm Analysis
Dynamic programming in Algorithm AnalysisDynamic programming in Algorithm Analysis
Dynamic programming in Algorithm Analysis
 
Average case Analysis of Quicksort
Average case Analysis of QuicksortAverage case Analysis of Quicksort
Average case Analysis of Quicksort
 
Np completeness
Np completenessNp completeness
Np completeness
 
computer languages
computer languagescomputer languages
computer languages
 

Recently uploaded

Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
DhatriParmar
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
kimdan468
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
Kartik Tiwari
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
Mohammed Sikander
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
gb193092
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 

Recently uploaded (20)

Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 

universality

  • 1. 12.3 Universality Recall the Turing Machine model from Chapter 6: a Turing Machine consists of an infinite tape divided into discrete square into which symbols from a fixed alphabet can be written, and a tape head that moves along the tape. On each step, the tape head can read the symbol in the current square, write a symbol in the current square, and move left or right one square or halt. The machine can keep track of a finite number of possible states, and determines which action to take based on a set of transition rules that specify the output symbol and head action for a given current state and read symbol. Turing argued that this simple model corresponds to our intuition about what can be done using mechanical computation. Recall this was 1936, so the model for mechanical computation was not what a mechanical computer can do, but what a human computer can do. Turing argued that his model corresponded to what a human computer could do by following a systematic procedure: the infinite tape was as powerful as a two- dimensional sheet of paper or any other recording medium, the set of symbols must be finite otherwise it would not be possible to correctly distinguish all symbols, and the number of machine states must be finite because there is a limited amount a human can keep in mind at one time.
  • 2. We can enumerate all possible Turing Machines. One way to see this is to devise a notation for writing down any Turing Machine. A Turing Machine is completely described by its alphabet, states and transition rules. We could write down any Turing Machine by numbering each state and listing each transition rule as a tuple of the current state, alphabet symbol, next state, output symbol, and tape direction. We can map each state and alphabet symbol to a number, and use this encoding to write down a unique number for every possible Turing Machine. Hence, we can enumerate all possible Turing Machines by just enumerating the positive integers. Most positive integers do not correspond to valid Turing Machines, but if we go through all the numbers we will eventually reach every possible Turing Machine. This is step towards proving that some problems cannot be solved by any algorithm. The number of Turing Machines is less than the number of real numbers. Both numbers are infinite, but as explained in Section 1.2.2, Cantor's diagonalization proof showed that the real numbers are not countable.
  • 3. Any attempt to map the real numbers to the integers must fail to include all the real numbers. This means there are real numbers that cannot be produced by any Turing Machine: there are fewer Turing Machines than there are real numbers, so there must be some real numbers that cannot be produced by any Turing Machine. The next step is to define the machine depicted in Figure 12.2. A Universal Turing Machine is a machine that takes as input a number that identifies a Turing Machine and simulates the specified Turing Machine running on initially empty input tape. The Universal Turing Machine can simulate any Turing Machine. In his proof, Turing describes the transition rules for such a machine. It simulates the Turing Machine encoded by the input number. One can imagine doing this by using the tape to keep track of the state of the simulated machine. For each step, the universal machine searches the description of the input machine to find the appropriate rule. This is the rule for the current state of the simulated machine on the current input symbol of the simulated machine.
  • 4. The universal machine keeps track of the machine and tape state of the simulated machine, and simulates each step. Thus, there is a single Turing Machine that can simulate every Turing Machine. Fig ure 12.2: Universal Turing Machine.. Since a Universal Turing Machine can simulate every Turing Machine, and a Turing Machine can perform any computation according to our intuitive notion of computation, this means a Universal Turing Machine can perform all computations. Using the universal machine and a diagonalization argument similar to the one above for the real numbers, Turing reached a similar contradiction for a problem analogous to the Halting Problem for Python programs but for Turing Machines instead. If we can simulate a Universal Turing Machine in a programming language, that language is a universal programming language. There is some program that can be written in that language to perform every possible computation.
  • 5. To show that a programming language is universal, it is sufficient to show that it can simulate any Turing Machine, since a Turing Machine can perform every possible computation. To simulate a Universal Turing Machine, we need some way to keep track of the state of the tape (for example, the list datatypes in Scheme or Python would be adequate), a way to keep track of the internal machine state (a number can do this), and a way to execute the transition rules (we could define a procedure that does this using an if expression to make decisions about which transition rule to follow for each step), and a way to keep going (we can do this in Scheme with recursive applications). Thus, Scheme is a universal programming language: one can write a Scheme program to simulate a Universal Turing Machine, and thus, perform any mechanical computation.
  • 6. To show that a programming language is universal, it is sufficient to show that it can simulate any Turing Machine, since a Turing Machine can perform every possible computation. To simulate a Universal Turing Machine, we need some way to keep track of the state of the tape (for example, the list datatypes in Scheme or Python would be adequate), a way to keep track of the internal machine state (a number can do this), and a way to execute the transition rules (we could define a procedure that does this using an if expression to make decisions about which transition rule to follow for each step), and a way to keep going (we can do this in Scheme with recursive applications). Thus, Scheme is a universal programming language: one can write a Scheme program to simulate a Universal Turing Machine, and thus, perform any mechanical computation.