SlideShare a Scribd company logo
Costas Busch - LSU 1
A Universal Turing Machine
Costas Busch - LSU 2
Turing Machines are “hardwired”
they execute
only one program
A limitation of Turing Machines:
Real Computers are re-programmable
Costas Busch - LSU 3
Solution: Universal Turing Machine
• Reprogrammable machine
• Simulates any other Turing Machine
Attributes:
Costas Busch - LSU 4
Universal Turing Machine
simulates any Turing Machine M
Input of Universal Turing Machine:
Description of transitions of M
Input string of M
Costas Busch - LSU 5
Universal
Turing
Machine
M
Description of
Tape Contents of
M
State of M
Three tapes
Tape 2
Tape 3
Tape 1
Costas Busch - LSU 6
We describe Turing machine
as a string of symbols:
We encode as a string of symbols
M
M
Description of M
Tape 1
Costas Busch - LSU 7
Alphabet Encoding
Symbols: a b c d 
Encoding: 1 11 111 1111
Costas Busch - LSU 8
State Encoding
States: 1q 2q 3q 4q 
Encoding: 1 11 111 1111
Head Move Encoding
Move:
Encoding:
L R
1 11
Costas Busch - LSU 9
Transition Encoding
Transition: ),,(),( 21 Lbqaq 
Encoding: 10110110101
separator
Costas Busch - LSU 10
Turing Machine Encoding
Transitions:
),,(),( 21 Lbqaq 
Encoding:
10110110101
),,(),( 32 Rcqbq 
110111011110101100
separator
Costas Busch - LSU 11
Tape 1 contents of Universal Turing Machine:
binary encoding
of the simulated machine M
1100011101111010100110110110101
Tape 1
Costas Busch - LSU 12
A Turing Machine is described
with a binary string of 0’s and 1’s
The set of Turing machines
forms a language:
each string of this language is
the binary encoding of a Turing Machine
Therefore:
Costas Busch - LSU 13
Language of Turing Machines
L = { 010100101,
00100100101111,
111010011110010101,
…… }
(Turing Machine 1)
(Turing Machine 2)
……
Costas Busch - LSU 14
Countable Sets
Costas Busch - LSU 15
Infinite sets are either: Countable
or
Uncountable
Costas Busch - LSU 16
Countable set:
There is a one to one correspondence (injection)
of
elements of the set
to
Positive integers (1,2,3,…)
Every element of the set is mapped to a positive number
such that no two elements are mapped to same number
Costas Busch - LSU 17
Example:
Even integers:
(positive)
,6,4,2,0
The set of even integers
is countable
Positive integers:
Correspondence:
,4,3,2,1
n2 corresponds to 1n
Costas Busch - LSU 18
Example:The set of rational numbers
is countable
Rational numbers: ,
8
7
,
4
3
,
2
1
Costas Busch - LSU 19
Naïve Approach
Rational numbers: ,
3
1
,
2
1
,
1
1
Positive integers:
Correspondence:
,3,2,1
Doesn’t work:
we will never count
numbers with nominator 2:
,
3
2
,
2
2
,
1
2
Nominator 1
Costas Busch - LSU 20
Better Approach
1
1
2
1
3
1
4
1
1
2
2
2
3
2
1
3
2
3
1
4




Costas Busch - LSU 21
1
1
2
1
3
1
4
1
1
2
2
2
3
2
1
3
2
3
1
4




Costas Busch - LSU 22
1
1
2
1
3
1
4
1
1
2
2
2
3
2
1
3
2
3
1
4




Costas Busch - LSU 23
1
1
2
1
3
1
4
1
1
2
2
2
3
2
1
3
2
3
1
4




Costas Busch - LSU 24
1
1
2
1
3
1
4
1
1
2
2
2
3
2
1
3
2
3
1
4




Costas Busch - LSU 25
1
1
2
1
3
1
4
1
1
2
2
2
3
2
1
3
2
3
1
4




Costas Busch - LSU 26
Rational Numbers: ,
2
2
,
3
1
,
1
2
,
2
1
,
1
1
Correspondence:
Positive Integers: ,5,4,3,2,1
Costas Busch - LSU 27
We proved:
the set of rational numbers is countable
by describing an enumeration procedure
(enumerator)
for the correspondence to natural numbers
Costas Busch - LSU 28
Definition
An enumerator for is a Turing Machine
that generates (prints on tape)
all the strings of one by one
Let be a set of strings (Language)S
S
S
and
each string is generated in finite time
Costas Busch - LSU 29
Enumerator
Machine for
,,, 321 sss
Ssss ,,, 321
Finite time: ,,, 321 ttt
strings
S
output
(on tape)
Costas Busch - LSU 30
Enumerator Machine
Configuration
Time 0  
0q
Time
sq
1x 1s#1t
prints 1s
Costas Busch - LSU 31
Time
sq
3x 3s#3t
Time
sq
2x 2s#2t
prints 2s
prints 3s
Costas Busch - LSU 32
If for a set there is an enumerator,
then the set is countable
Observation:
The enumerator describes the
correspondence of to natural numbers
S
S
Costas Busch - LSU 33
Example: The set of strings
is countable

 },,{ cbaS
We will describe an enumerator for
Approach:
S
Costas Busch - LSU 34
Naive enumerator:
Produce the strings in lexicographic order:
a
aa
aaa
......
Doesn’t work:
strings starting with
will never be produced
b
aaaa
1s
2s

Costas Busch - LSU 35
Better procedure:
1. Produce all strings of length 1
2. Produce all strings of length 2
3. Produce all strings of length 3
4. Produce all strings of length 4
Proper Order
(Canonical Order)
……
Costas Busch - LSU 36
Produce strings in
Proper Order:
aa
ab
ac
ba
bb
bc
ca
cb
cc
aaa
aab
aac
......
length 2
length 3
length 1
a
b
c
1s
2s

Costas Busch - LSU 37
Theorem: The set of all Turing Machines
is countable
Proof:
Find an enumeration procedure
for the set of Turing Machine strings
Any Turing Machine can be encoded
with a binary string of 0’s and 1’s
Costas Busch - LSU 38
1. Generate the next binary string
of 0’s and 1’s in proper order
2. Check if the string describes a
Turing Machine
if YES: print string on output tape
if NO: ignore string
Enumerator:
Repeat
Costas Busch - LSU 39
0
1
00
01

10110110101 10110110101
00110110101

101101001010101101

Binary strings Turing Machines
1s
2s 101101001010101101
End of Proof
ignore
ignore
ignore
Costas Busch - LSU 40
Uncountable Sets
Costas Busch - LSU 41
We will prove that there is a language
which is not accepted by any Turing machine
L
Technique:
Turing machines are countable
Languages are uncountable
(there are more languages than Turing Machines)
Costas Busch - LSU 42
Theorem:
If is an infinite countable set, then
the powerset of is uncountable.
S
2 S
S
The powerset contains all possible subsets of
Example:
S
2 S
}},{},{},{,{2},{ bababaS S

Costas Busch - LSU 43
Proof:
Since is countable, we can list its
elements in some order
S
},,,{ 321 sssS 
Elements of S
Costas Busch - LSU 44
Elements of the powerset have the form:
},{ 31 ss
},,,{ 10975 ssss
……

S
2
They are subsets of S
Costas Busch - LSU 45
We encode each subset of
with a binary string of 0’s and 1’s
1s 2s 3s 4s 
1 0 0 0}{ 1s
Subset of
Binary encoding
0 1 1 0},{ 32 ss
1 0 1 1},,{ 431 sss



S
S
Costas Busch - LSU 46
Every infinite binary string corresponds
to a subset of :
10 Example: 0111 0
Corresponds to:
S
ssss 2},,,,{ 6541 
S
Costas Busch - LSU 47
Let’s assume (for contradiction)
that the powerset is countable
Then: we can list the elements of the
powerset in some order
},,,{2 321 tttS

S
2
Subsets of S
Costas Busch - LSU 48
1 0 0 0 0
1 1 0 0 0
1 1 0 1 0
1 1 0 0 1
Powerset
element
Binary encoding example
1t
2t
3t
4t




 
Costas Busch - LSU 49
1 0 0 0 0
1 1 0 0 0
1 1 0 1 0
1 1 0 0 1
1t
2t
3t
4t




Binary string: 0011
(birary complement of diagonal)
the binary string whose bits
are the complement of the diagonal
t
t
Costas Busch - LSU 50
0011tThe binary string
corresponds
to a subset of :
S
sst 2},,{ 43  S
Costas Busch - LSU 51
1 0 0 0 0
1 1 0 0 0
1 1 0 1 0
1 1 0 0 1
1t
2t
3t
4t




Question:
0011
the binary string whose bits
are the complement of the diagonal
t
?1tt  NO: differ in 1st bit
t
Costas Busch - LSU 52
1 0 0 0 0
1 1 0 0 0
1 1 0 1 0
1 1 0 0 1
1t
2t
3t
4t




Question:
0011
the binary string whose bits
are the complement of the diagonal
t
?2tt  NO: differ in 2nd bit
t
Costas Busch - LSU 53
1 0 0 0 0
1 1 0 0 0
1 1 0 1 0
1 1 0 0 1
1t
2t
3t
4t




Question:
0011
the binary string whose bits
are the complement of the diagonal
t
?3tt  NO: differ in 3rd bit
t
Costas Busch - LSU 54
Thus: for every i
However,
since they differ in the th bit
Contradiction!!!
itt 
i
S
ttt 2 for some i
i
S
2Therefore the powerset is uncountable
End of proof
Costas Busch - LSU 55
An Application: Languages
The set of all strings:
},,,,,,,,,{},{ *
aabaaabbbaabaababaS 
infinite and countable
Consider Alphabet : },{ baA 
because we can enumerate
the strings in proper order
Costas Busch - LSU 56
The set of all strings:
},,,,,,,,,{},{ *
aabaaabbbaabaababaS 
infinite and countable
Any language is a subset of :
},,{ aababaaL 
S
Consider Alphabet : },{ baA 
Costas Busch - LSU 57
Consider Alphabet : },{ baA 
The set of all Strings:
},,,,,,,,,{},{ **
aabaaabbbaabaababaAS 
infinite and countable
The powerset of contains all languages:
}},,,{},...,,{},,{},{},{,{2 aababaabaabaaS

uncountable
S
Costas Busch - LSU 58
Turing machines: 1M 2M 3M 
Languages accepted
By Turing Machines: 1L 2L 3L 
accepts
Denote: },,,{ 321 LLLX 
countable
Note:
S
X 2
countable
countable
 *
},{ baS 
Consider Alphabet : },{ baA 
Costas Busch - LSU 59
X countable
S
2 uncountable
Languages accepted
by Turing machines:
All possible languages:
Therefore:
S
X 2
 SS
XX 2getwe,2since 
Costas Busch - LSU 60
There is a language not accepted
by any Turing Machine:
Conclusion:
L
S
X 2 XLL S
 and2
Costas Busch - LSU 61
Turing-Acceptable
Languages
Non Turing-Acceptable Languages
L
Costas Busch - LSU 62
Note that: },,,{ 321 LLLX 
is a multi-set (elements may repeat)
since a language may be accepted
by more than one Turing machine
However, if we remove the repeated elements,
the resulting set is again countable since every element
still corresponds to a positive integer

More Related Content

What's hot

Lecture: Regular Expressions and Regular Languages
Lecture: Regular Expressions and Regular LanguagesLecture: Regular Expressions and Regular Languages
Lecture: Regular Expressions and Regular Languages
Marina Santini
 
Automata Theory - Turing machine
Automata Theory - Turing machineAutomata Theory - Turing machine
Automata Theory - Turing machine
Akila Krishnamoorthy
 
LINEAR BOUNDED AUTOMATA (LBA).pptx
LINEAR BOUNDED AUTOMATA (LBA).pptxLINEAR BOUNDED AUTOMATA (LBA).pptx
LINEAR BOUNDED AUTOMATA (LBA).pptx
AkhilJoseph63
 
Recognition-of-tokens
Recognition-of-tokensRecognition-of-tokens
Recognition-of-tokens
Dattatray Gandhmal
 
Chomsky Hierarchy.ppt
Chomsky Hierarchy.pptChomsky Hierarchy.ppt
Chomsky Hierarchy.ppt
AayushSingh233965
 
Finite Automata
Finite AutomataFinite Automata
Finite Automata
Mukesh Tekwani
 
NLP_KASHK:Finite-State Morphological Parsing
NLP_KASHK:Finite-State Morphological ParsingNLP_KASHK:Finite-State Morphological Parsing
NLP_KASHK:Finite-State Morphological Parsing
Hemantha Kulathilake
 
Automata theory -RE to NFA-ε
Automata theory -RE to  NFA-εAutomata theory -RE to  NFA-ε
Automata theory -RE to NFA-ε
Akila Krishnamoorthy
 
Lexical Analysis - Compiler Design
Lexical Analysis - Compiler DesignLexical Analysis - Compiler Design
Lexical Analysis - Compiler Design
Akhil Kaushik
 
Variants of Turing Machine
Variants of Turing MachineVariants of Turing Machine
Variants of Turing Machine
Rajendran
 
Lexical analysis - Compiler Design
Lexical analysis - Compiler DesignLexical analysis - Compiler Design
Lexical analysis - Compiler Design
Muhammed Afsal Villan
 
Deterministic Finite Automata
Deterministic Finite AutomataDeterministic Finite Automata
Deterministic Finite Automata
Shiraz316
 
Lecture 3,4
Lecture 3,4Lecture 3,4
Lecture 3,4
shah zeb
 
Bootstrapping in Compiler
Bootstrapping in CompilerBootstrapping in Compiler
Bootstrapping in Compiler
Akhil Kaushik
 
Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...
Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...
Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...
Farwa Ansari
 
Bottom - Up Parsing
Bottom - Up ParsingBottom - Up Parsing
Bottom - Up Parsing
kunj desai
 
bubble sorting of an array in 8086 assembly language
bubble sorting of an array in 8086 assembly languagebubble sorting of an array in 8086 assembly language
bubble sorting of an array in 8086 assembly language
Bilal Amjad
 
System Programing Unit 1
System Programing Unit 1System Programing Unit 1
System Programing Unit 1Manoj Patil
 
Turing machines
Turing machinesTuring machines
Turing machines
surekamurali
 

What's hot (20)

Lecture: Regular Expressions and Regular Languages
Lecture: Regular Expressions and Regular LanguagesLecture: Regular Expressions and Regular Languages
Lecture: Regular Expressions and Regular Languages
 
Automata Theory - Turing machine
Automata Theory - Turing machineAutomata Theory - Turing machine
Automata Theory - Turing machine
 
LINEAR BOUNDED AUTOMATA (LBA).pptx
LINEAR BOUNDED AUTOMATA (LBA).pptxLINEAR BOUNDED AUTOMATA (LBA).pptx
LINEAR BOUNDED AUTOMATA (LBA).pptx
 
Recognition-of-tokens
Recognition-of-tokensRecognition-of-tokens
Recognition-of-tokens
 
Chomsky Hierarchy.ppt
Chomsky Hierarchy.pptChomsky Hierarchy.ppt
Chomsky Hierarchy.ppt
 
Finite Automata
Finite AutomataFinite Automata
Finite Automata
 
NLP_KASHK:Finite-State Morphological Parsing
NLP_KASHK:Finite-State Morphological ParsingNLP_KASHK:Finite-State Morphological Parsing
NLP_KASHK:Finite-State Morphological Parsing
 
Automata theory -RE to NFA-ε
Automata theory -RE to  NFA-εAutomata theory -RE to  NFA-ε
Automata theory -RE to NFA-ε
 
Turing machine by_deep
Turing machine by_deepTuring machine by_deep
Turing machine by_deep
 
Lexical Analysis - Compiler Design
Lexical Analysis - Compiler DesignLexical Analysis - Compiler Design
Lexical Analysis - Compiler Design
 
Variants of Turing Machine
Variants of Turing MachineVariants of Turing Machine
Variants of Turing Machine
 
Lexical analysis - Compiler Design
Lexical analysis - Compiler DesignLexical analysis - Compiler Design
Lexical analysis - Compiler Design
 
Deterministic Finite Automata
Deterministic Finite AutomataDeterministic Finite Automata
Deterministic Finite Automata
 
Lecture 3,4
Lecture 3,4Lecture 3,4
Lecture 3,4
 
Bootstrapping in Compiler
Bootstrapping in CompilerBootstrapping in Compiler
Bootstrapping in Compiler
 
Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...
Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...
Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...
 
Bottom - Up Parsing
Bottom - Up ParsingBottom - Up Parsing
Bottom - Up Parsing
 
bubble sorting of an array in 8086 assembly language
bubble sorting of an array in 8086 assembly languagebubble sorting of an array in 8086 assembly language
bubble sorting of an array in 8086 assembly language
 
System Programing Unit 1
System Programing Unit 1System Programing Unit 1
System Programing Unit 1
 
Turing machines
Turing machinesTuring machines
Turing machines
 

Viewers also liked

Turing machines 1
Turing machines 1Turing machines 1
Turing machines 1grahamwell
 
Commuter Presentation Summer 2015
Commuter Presentation Summer 2015Commuter Presentation Summer 2015
Commuter Presentation Summer 2015Justin Daws
 
Using paddy husk as the replacement of gas & fuel for drying grains
Using paddy husk as the replacement of gas & fuel for drying grainsUsing paddy husk as the replacement of gas & fuel for drying grains
Using paddy husk as the replacement of gas & fuel for drying grains
Milling and Grain magazine
 
Church Turing Thesis
Church Turing ThesisChurch Turing Thesis
Church Turing Thesis
Hemant Sharma
 
Restriction enzyme digestion
Restriction enzyme digestion Restriction enzyme digestion
Restriction enzyme digestion
raj80911
 
Restriction enzyme
Restriction enzymeRestriction enzyme
Restriction enzyme
Muhammad Luthfan
 
NFA or Non deterministic finite automata
NFA or Non deterministic finite automataNFA or Non deterministic finite automata
NFA or Non deterministic finite automata
deepinderbedi
 
Presenatation On Restriction Enzyme
Presenatation On Restriction EnzymePresenatation On Restriction Enzyme
Presenatation On Restriction EnzymeZahoor Ahmed
 
Genetic Engineering and Biotechnology
Genetic Engineering and BiotechnologyGenetic Engineering and Biotechnology
Genetic Engineering and Biotechnology
Stephen Taylor
 
Turing machine seminar report
Turing machine seminar reportTuring machine seminar report
Turing machine seminar report
Yashwant Dagar
 
Turing machine
Turing machineTuring machine
Turing machine
Neelamani Samal
 

Viewers also liked (15)

Turing machines
Turing machinesTuring machines
Turing machines
 
Turing machines 1
Turing machines 1Turing machines 1
Turing machines 1
 
Commuter Presentation Summer 2015
Commuter Presentation Summer 2015Commuter Presentation Summer 2015
Commuter Presentation Summer 2015
 
Moto pacion
Moto pacionMoto pacion
Moto pacion
 
Using paddy husk as the replacement of gas & fuel for drying grains
Using paddy husk as the replacement of gas & fuel for drying grainsUsing paddy husk as the replacement of gas & fuel for drying grains
Using paddy husk as the replacement of gas & fuel for drying grains
 
Church Turing Thesis
Church Turing ThesisChurch Turing Thesis
Church Turing Thesis
 
Restriction enzyme digestion
Restriction enzyme digestion Restriction enzyme digestion
Restriction enzyme digestion
 
Restriction enzyme
Restriction enzymeRestriction enzyme
Restriction enzyme
 
Deterministic Finite Automata
Deterministic Finite AutomataDeterministic Finite Automata
Deterministic Finite Automata
 
NFA or Non deterministic finite automata
NFA or Non deterministic finite automataNFA or Non deterministic finite automata
NFA or Non deterministic finite automata
 
Presenatation On Restriction Enzyme
Presenatation On Restriction EnzymePresenatation On Restriction Enzyme
Presenatation On Restriction Enzyme
 
Genetic Engineering and Biotechnology
Genetic Engineering and BiotechnologyGenetic Engineering and Biotechnology
Genetic Engineering and Biotechnology
 
Turing machine seminar report
Turing machine seminar reportTuring machine seminar report
Turing machine seminar report
 
Turing machine
Turing machineTuring machine
Turing machine
 
Slideshare ppt
Slideshare pptSlideshare ppt
Slideshare ppt
 

Similar to Universal turing coastus

Universal_Turing_Machine_Formal_Language.ppt
Universal_Turing_Machine_Formal_Language.pptUniversal_Turing_Machine_Formal_Language.ppt
Universal_Turing_Machine_Formal_Language.ppt
HimanshuSharma997566
 
actel fpga problems
actel fpga problemsactel fpga problems
actel fpga problemsAnish Gupta
 
Turing variations
Turing variationsTuring variations
Turing variations
Shiraz316
 
Turing machines
Turing machinesTuring machines
Turing machines
Shiraz316
 
Context free grammars
Context free grammarsContext free grammars
Context free grammars
Shiraz316
 
Properties of Regular Expressions
Properties of Regular ExpressionsProperties of Regular Expressions
Properties of Regular Expressions
Shiraz316
 
Sequence Types in Python Programming
Sequence Types in Python ProgrammingSequence Types in Python Programming
Sequence Types in Python Programming
Bobby Murugesan
 
Linear Block code.pdf
Linear Block code.pdfLinear Block code.pdf
Linear Block code.pdf
SuryaRamVM
 

Similar to Universal turing coastus (9)

Universal_Turing_Machine_Formal_Language.ppt
Universal_Turing_Machine_Formal_Language.pptUniversal_Turing_Machine_Formal_Language.ppt
Universal_Turing_Machine_Formal_Language.ppt
 
actel fpga problems
actel fpga problemsactel fpga problems
actel fpga problems
 
Turing variations
Turing variationsTuring variations
Turing variations
 
Turing machines
Turing machinesTuring machines
Turing machines
 
Context free grammars
Context free grammarsContext free grammars
Context free grammars
 
Properties of Regular Expressions
Properties of Regular ExpressionsProperties of Regular Expressions
Properties of Regular Expressions
 
internal assement 3
internal assement 3internal assement 3
internal assement 3
 
Sequence Types in Python Programming
Sequence Types in Python ProgrammingSequence Types in Python Programming
Sequence Types in Python Programming
 
Linear Block code.pdf
Linear Block code.pdfLinear Block code.pdf
Linear Block code.pdf
 

More from Shiraz316

FINGERNAIL DISORDER DETECTION FOR DISEASE ANALYSIS
FINGERNAIL DISORDER DETECTION FOR DISEASE ANALYSISFINGERNAIL DISORDER DETECTION FOR DISEASE ANALYSIS
FINGERNAIL DISORDER DETECTION FOR DISEASE ANALYSIS
Shiraz316
 
K neareast neighbor algorithm presentation
K neareast neighbor algorithm presentationK neareast neighbor algorithm presentation
K neareast neighbor algorithm presentation
Shiraz316
 
Khi 087 revised dt report
Khi 087 revised dt reportKhi 087 revised dt report
Khi 087 revised dt report
Shiraz316
 
Khi 117 revised dt report
Khi 117 revised dt reportKhi 117 revised dt report
Khi 117 revised dt report
Shiraz316
 
Khi 164 revised dt report
Khi 164 revised dt reportKhi 164 revised dt report
Khi 164 revised dt report
Shiraz316
 
Khi 054 revised dt report
Khi 054 revised dt reportKhi 054 revised dt report
Khi 054 revised dt report
Shiraz316
 
Khi 061 revised dt report
Khi 061 revised dt reportKhi 061 revised dt report
Khi 061 revised dt report
Shiraz316
 
Khi 022 revised dt report
Khi 022 revised dt reportKhi 022 revised dt report
Khi 022 revised dt report
Shiraz316
 
Khi 113 revised dt report
Khi 113 revised dt reportKhi 113 revised dt report
Khi 113 revised dt report
Shiraz316
 
Khi 156 revised dt report
Khi 156 revised dt reportKhi 156 revised dt report
Khi 156 revised dt report
Shiraz316
 
Khi 142 revised dt report
Khi 142 revised dt reportKhi 142 revised dt report
Khi 142 revised dt report
Shiraz316
 
Khi 316 revised dt report
Khi 316 revised dt reportKhi 316 revised dt report
Khi 316 revised dt report
Shiraz316
 
Khi 186 revised dt report
Khi 186 revised dt reportKhi 186 revised dt report
Khi 186 revised dt report
Shiraz316
 
Khi 052 revised dt report
Khi 052 revised dt reportKhi 052 revised dt report
Khi 052 revised dt report
Shiraz316
 
Khi 151 revised dt report
Khi 151 revised dt reportKhi 151 revised dt report
Khi 151 revised dt report
Shiraz316
 
Khi 150 revised dt report
Khi 150 revised dt reportKhi 150 revised dt report
Khi 150 revised dt report
Shiraz316
 
Khi 078 revised dt report
Khi 078 revised dt reportKhi 078 revised dt report
Khi 078 revised dt report
Shiraz316
 
LTE quick introduction session Training
LTE quick introduction session TrainingLTE quick introduction session Training
LTE quick introduction session Training
Shiraz316
 
LTE Sales Training for CPE Device
LTE Sales Training for CPE DeviceLTE Sales Training for CPE Device
LTE Sales Training for CPE Device
Shiraz316
 
Witribe Customer Premises Equipment Training for LTE
Witribe Customer Premises Equipment Training for LTEWitribe Customer Premises Equipment Training for LTE
Witribe Customer Premises Equipment Training for LTE
Shiraz316
 

More from Shiraz316 (20)

FINGERNAIL DISORDER DETECTION FOR DISEASE ANALYSIS
FINGERNAIL DISORDER DETECTION FOR DISEASE ANALYSISFINGERNAIL DISORDER DETECTION FOR DISEASE ANALYSIS
FINGERNAIL DISORDER DETECTION FOR DISEASE ANALYSIS
 
K neareast neighbor algorithm presentation
K neareast neighbor algorithm presentationK neareast neighbor algorithm presentation
K neareast neighbor algorithm presentation
 
Khi 087 revised dt report
Khi 087 revised dt reportKhi 087 revised dt report
Khi 087 revised dt report
 
Khi 117 revised dt report
Khi 117 revised dt reportKhi 117 revised dt report
Khi 117 revised dt report
 
Khi 164 revised dt report
Khi 164 revised dt reportKhi 164 revised dt report
Khi 164 revised dt report
 
Khi 054 revised dt report
Khi 054 revised dt reportKhi 054 revised dt report
Khi 054 revised dt report
 
Khi 061 revised dt report
Khi 061 revised dt reportKhi 061 revised dt report
Khi 061 revised dt report
 
Khi 022 revised dt report
Khi 022 revised dt reportKhi 022 revised dt report
Khi 022 revised dt report
 
Khi 113 revised dt report
Khi 113 revised dt reportKhi 113 revised dt report
Khi 113 revised dt report
 
Khi 156 revised dt report
Khi 156 revised dt reportKhi 156 revised dt report
Khi 156 revised dt report
 
Khi 142 revised dt report
Khi 142 revised dt reportKhi 142 revised dt report
Khi 142 revised dt report
 
Khi 316 revised dt report
Khi 316 revised dt reportKhi 316 revised dt report
Khi 316 revised dt report
 
Khi 186 revised dt report
Khi 186 revised dt reportKhi 186 revised dt report
Khi 186 revised dt report
 
Khi 052 revised dt report
Khi 052 revised dt reportKhi 052 revised dt report
Khi 052 revised dt report
 
Khi 151 revised dt report
Khi 151 revised dt reportKhi 151 revised dt report
Khi 151 revised dt report
 
Khi 150 revised dt report
Khi 150 revised dt reportKhi 150 revised dt report
Khi 150 revised dt report
 
Khi 078 revised dt report
Khi 078 revised dt reportKhi 078 revised dt report
Khi 078 revised dt report
 
LTE quick introduction session Training
LTE quick introduction session TrainingLTE quick introduction session Training
LTE quick introduction session Training
 
LTE Sales Training for CPE Device
LTE Sales Training for CPE DeviceLTE Sales Training for CPE Device
LTE Sales Training for CPE Device
 
Witribe Customer Premises Equipment Training for LTE
Witribe Customer Premises Equipment Training for LTEWitribe Customer Premises Equipment Training for LTE
Witribe Customer Premises Equipment Training for LTE
 

Recently uploaded

Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
SupreethSP4
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
BrazilAccount1
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 

Recently uploaded (20)

Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 

Universal turing coastus

  • 1. Costas Busch - LSU 1 A Universal Turing Machine
  • 2. Costas Busch - LSU 2 Turing Machines are “hardwired” they execute only one program A limitation of Turing Machines: Real Computers are re-programmable
  • 3. Costas Busch - LSU 3 Solution: Universal Turing Machine • Reprogrammable machine • Simulates any other Turing Machine Attributes:
  • 4. Costas Busch - LSU 4 Universal Turing Machine simulates any Turing Machine M Input of Universal Turing Machine: Description of transitions of M Input string of M
  • 5. Costas Busch - LSU 5 Universal Turing Machine M Description of Tape Contents of M State of M Three tapes Tape 2 Tape 3 Tape 1
  • 6. Costas Busch - LSU 6 We describe Turing machine as a string of symbols: We encode as a string of symbols M M Description of M Tape 1
  • 7. Costas Busch - LSU 7 Alphabet Encoding Symbols: a b c d  Encoding: 1 11 111 1111
  • 8. Costas Busch - LSU 8 State Encoding States: 1q 2q 3q 4q  Encoding: 1 11 111 1111 Head Move Encoding Move: Encoding: L R 1 11
  • 9. Costas Busch - LSU 9 Transition Encoding Transition: ),,(),( 21 Lbqaq  Encoding: 10110110101 separator
  • 10. Costas Busch - LSU 10 Turing Machine Encoding Transitions: ),,(),( 21 Lbqaq  Encoding: 10110110101 ),,(),( 32 Rcqbq  110111011110101100 separator
  • 11. Costas Busch - LSU 11 Tape 1 contents of Universal Turing Machine: binary encoding of the simulated machine M 1100011101111010100110110110101 Tape 1
  • 12. Costas Busch - LSU 12 A Turing Machine is described with a binary string of 0’s and 1’s The set of Turing machines forms a language: each string of this language is the binary encoding of a Turing Machine Therefore:
  • 13. Costas Busch - LSU 13 Language of Turing Machines L = { 010100101, 00100100101111, 111010011110010101, …… } (Turing Machine 1) (Turing Machine 2) ……
  • 14. Costas Busch - LSU 14 Countable Sets
  • 15. Costas Busch - LSU 15 Infinite sets are either: Countable or Uncountable
  • 16. Costas Busch - LSU 16 Countable set: There is a one to one correspondence (injection) of elements of the set to Positive integers (1,2,3,…) Every element of the set is mapped to a positive number such that no two elements are mapped to same number
  • 17. Costas Busch - LSU 17 Example: Even integers: (positive) ,6,4,2,0 The set of even integers is countable Positive integers: Correspondence: ,4,3,2,1 n2 corresponds to 1n
  • 18. Costas Busch - LSU 18 Example:The set of rational numbers is countable Rational numbers: , 8 7 , 4 3 , 2 1
  • 19. Costas Busch - LSU 19 Naïve Approach Rational numbers: , 3 1 , 2 1 , 1 1 Positive integers: Correspondence: ,3,2,1 Doesn’t work: we will never count numbers with nominator 2: , 3 2 , 2 2 , 1 2 Nominator 1
  • 20. Costas Busch - LSU 20 Better Approach 1 1 2 1 3 1 4 1 1 2 2 2 3 2 1 3 2 3 1 4    
  • 21. Costas Busch - LSU 21 1 1 2 1 3 1 4 1 1 2 2 2 3 2 1 3 2 3 1 4    
  • 22. Costas Busch - LSU 22 1 1 2 1 3 1 4 1 1 2 2 2 3 2 1 3 2 3 1 4    
  • 23. Costas Busch - LSU 23 1 1 2 1 3 1 4 1 1 2 2 2 3 2 1 3 2 3 1 4    
  • 24. Costas Busch - LSU 24 1 1 2 1 3 1 4 1 1 2 2 2 3 2 1 3 2 3 1 4    
  • 25. Costas Busch - LSU 25 1 1 2 1 3 1 4 1 1 2 2 2 3 2 1 3 2 3 1 4    
  • 26. Costas Busch - LSU 26 Rational Numbers: , 2 2 , 3 1 , 1 2 , 2 1 , 1 1 Correspondence: Positive Integers: ,5,4,3,2,1
  • 27. Costas Busch - LSU 27 We proved: the set of rational numbers is countable by describing an enumeration procedure (enumerator) for the correspondence to natural numbers
  • 28. Costas Busch - LSU 28 Definition An enumerator for is a Turing Machine that generates (prints on tape) all the strings of one by one Let be a set of strings (Language)S S S and each string is generated in finite time
  • 29. Costas Busch - LSU 29 Enumerator Machine for ,,, 321 sss Ssss ,,, 321 Finite time: ,,, 321 ttt strings S output (on tape)
  • 30. Costas Busch - LSU 30 Enumerator Machine Configuration Time 0   0q Time sq 1x 1s#1t prints 1s
  • 31. Costas Busch - LSU 31 Time sq 3x 3s#3t Time sq 2x 2s#2t prints 2s prints 3s
  • 32. Costas Busch - LSU 32 If for a set there is an enumerator, then the set is countable Observation: The enumerator describes the correspondence of to natural numbers S S
  • 33. Costas Busch - LSU 33 Example: The set of strings is countable   },,{ cbaS We will describe an enumerator for Approach: S
  • 34. Costas Busch - LSU 34 Naive enumerator: Produce the strings in lexicographic order: a aa aaa ...... Doesn’t work: strings starting with will never be produced b aaaa 1s 2s 
  • 35. Costas Busch - LSU 35 Better procedure: 1. Produce all strings of length 1 2. Produce all strings of length 2 3. Produce all strings of length 3 4. Produce all strings of length 4 Proper Order (Canonical Order) ……
  • 36. Costas Busch - LSU 36 Produce strings in Proper Order: aa ab ac ba bb bc ca cb cc aaa aab aac ...... length 2 length 3 length 1 a b c 1s 2s 
  • 37. Costas Busch - LSU 37 Theorem: The set of all Turing Machines is countable Proof: Find an enumeration procedure for the set of Turing Machine strings Any Turing Machine can be encoded with a binary string of 0’s and 1’s
  • 38. Costas Busch - LSU 38 1. Generate the next binary string of 0’s and 1’s in proper order 2. Check if the string describes a Turing Machine if YES: print string on output tape if NO: ignore string Enumerator: Repeat
  • 39. Costas Busch - LSU 39 0 1 00 01  10110110101 10110110101 00110110101  101101001010101101  Binary strings Turing Machines 1s 2s 101101001010101101 End of Proof ignore ignore ignore
  • 40. Costas Busch - LSU 40 Uncountable Sets
  • 41. Costas Busch - LSU 41 We will prove that there is a language which is not accepted by any Turing machine L Technique: Turing machines are countable Languages are uncountable (there are more languages than Turing Machines)
  • 42. Costas Busch - LSU 42 Theorem: If is an infinite countable set, then the powerset of is uncountable. S 2 S S The powerset contains all possible subsets of Example: S 2 S }},{},{},{,{2},{ bababaS S 
  • 43. Costas Busch - LSU 43 Proof: Since is countable, we can list its elements in some order S },,,{ 321 sssS  Elements of S
  • 44. Costas Busch - LSU 44 Elements of the powerset have the form: },{ 31 ss },,,{ 10975 ssss ……  S 2 They are subsets of S
  • 45. Costas Busch - LSU 45 We encode each subset of with a binary string of 0’s and 1’s 1s 2s 3s 4s  1 0 0 0}{ 1s Subset of Binary encoding 0 1 1 0},{ 32 ss 1 0 1 1},,{ 431 sss    S S
  • 46. Costas Busch - LSU 46 Every infinite binary string corresponds to a subset of : 10 Example: 0111 0 Corresponds to: S ssss 2},,,,{ 6541  S
  • 47. Costas Busch - LSU 47 Let’s assume (for contradiction) that the powerset is countable Then: we can list the elements of the powerset in some order },,,{2 321 tttS  S 2 Subsets of S
  • 48. Costas Busch - LSU 48 1 0 0 0 0 1 1 0 0 0 1 1 0 1 0 1 1 0 0 1 Powerset element Binary encoding example 1t 2t 3t 4t      
  • 49. Costas Busch - LSU 49 1 0 0 0 0 1 1 0 0 0 1 1 0 1 0 1 1 0 0 1 1t 2t 3t 4t     Binary string: 0011 (birary complement of diagonal) the binary string whose bits are the complement of the diagonal t t
  • 50. Costas Busch - LSU 50 0011tThe binary string corresponds to a subset of : S sst 2},,{ 43  S
  • 51. Costas Busch - LSU 51 1 0 0 0 0 1 1 0 0 0 1 1 0 1 0 1 1 0 0 1 1t 2t 3t 4t     Question: 0011 the binary string whose bits are the complement of the diagonal t ?1tt  NO: differ in 1st bit t
  • 52. Costas Busch - LSU 52 1 0 0 0 0 1 1 0 0 0 1 1 0 1 0 1 1 0 0 1 1t 2t 3t 4t     Question: 0011 the binary string whose bits are the complement of the diagonal t ?2tt  NO: differ in 2nd bit t
  • 53. Costas Busch - LSU 53 1 0 0 0 0 1 1 0 0 0 1 1 0 1 0 1 1 0 0 1 1t 2t 3t 4t     Question: 0011 the binary string whose bits are the complement of the diagonal t ?3tt  NO: differ in 3rd bit t
  • 54. Costas Busch - LSU 54 Thus: for every i However, since they differ in the th bit Contradiction!!! itt  i S ttt 2 for some i i S 2Therefore the powerset is uncountable End of proof
  • 55. Costas Busch - LSU 55 An Application: Languages The set of all strings: },,,,,,,,,{},{ * aabaaabbbaabaababaS  infinite and countable Consider Alphabet : },{ baA  because we can enumerate the strings in proper order
  • 56. Costas Busch - LSU 56 The set of all strings: },,,,,,,,,{},{ * aabaaabbbaabaababaS  infinite and countable Any language is a subset of : },,{ aababaaL  S Consider Alphabet : },{ baA 
  • 57. Costas Busch - LSU 57 Consider Alphabet : },{ baA  The set of all Strings: },,,,,,,,,{},{ ** aabaaabbbaabaababaAS  infinite and countable The powerset of contains all languages: }},,,{},...,,{},,{},{},{,{2 aababaabaabaaS  uncountable S
  • 58. Costas Busch - LSU 58 Turing machines: 1M 2M 3M  Languages accepted By Turing Machines: 1L 2L 3L  accepts Denote: },,,{ 321 LLLX  countable Note: S X 2 countable countable  * },{ baS  Consider Alphabet : },{ baA 
  • 59. Costas Busch - LSU 59 X countable S 2 uncountable Languages accepted by Turing machines: All possible languages: Therefore: S X 2  SS XX 2getwe,2since 
  • 60. Costas Busch - LSU 60 There is a language not accepted by any Turing Machine: Conclusion: L S X 2 XLL S  and2
  • 61. Costas Busch - LSU 61 Turing-Acceptable Languages Non Turing-Acceptable Languages L
  • 62. Costas Busch - LSU 62 Note that: },,,{ 321 LLLX  is a multi-set (elements may repeat) since a language may be accepted by more than one Turing machine However, if we remove the repeated elements, the resulting set is again countable since every element still corresponds to a positive integer