SlideShare a Scribd company logo
1 of 61
Fall 2006 Costas Busch - RPI 1
A Universal Turing Machine
Fall 2006 Costas Busch - RPI 2
Turing Machines are “hardwired”
they execute
only one program
A limitation of Turing Machines:
Real Computers are re-programmable
Fall 2006 Costas Busch - RPI 3
Solution: Universal Turing Machine
• Reprogrammable machine
• Simulates any other Turing Machine
Attributes:
Fall 2006 Costas Busch - RPI 4
Universal Turing Machine
simulates any Turing Machine M
Input of Universal Turing Machine:
Description of transitions of M
Input string of M
Fall 2006 Costas Busch - RPI 5
Universal
Turing
Machine
M
Description of
Tape Contents of
M
State of M
Three tapes
Tape 2
Tape 3
Tape 1
Fall 2006 Costas Busch - RPI 6
We describe Turing machine
as a string of symbols:
We encode as a string of symbols
M
M
Description of M
Tape 1
Fall 2006 Costas Busch - RPI 7
Alphabet Encoding
Symbols: a b c d 
Encoding: 1 11 111 1111
Fall 2006 Costas Busch - RPI 8
State Encoding
States: 1
q 2
q 3
q 4
q 
Encoding: 1 11 111 1111
Head Move Encoding
Move:
Encoding:
L R
1 11
Fall 2006 Costas Busch - RPI 9
Transition Encoding
Transition: )
,
,
(
)
,
( 2
1 L
b
q
a
q 

Encoding: 1
0
11
0
11
0
1
0
1
separator
Fall 2006 Costas Busch - RPI 10
Turing Machine Encoding
Transitions:
)
,
,
(
)
,
( 2
1 L
b
q
a
q 

Encoding:
1
0
11
0
11
0
1
0
1
)
,
,
(
)
,
( 3
2 R
c
q
b
q 

11
0
111
0
111
10
1
0
11
00
separator
Fall 2006 Costas Busch - RPI 11
Tape 1 contents of Universal Turing Machine:
binary encoding
of the simulated machine M

1100
0
111
0
111
10
1
0
10011
0
11
0
11
0
1
0
1
Tape 1
Fall 2006 Costas Busch - RPI 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:
Fall 2006 Costas Busch - RPI 13
Language of Turing Machines
L = { 010100101,
00100100101111,
111010011110010101,
…… }
(Turing Machine 1)
(Turing Machine 2)
……
Fall 2006 Costas Busch - RPI 14
Countable Sets
Fall 2006 Costas Busch - RPI 15
Infinite sets are either: Countable
or
Uncountable
Fall 2006 Costas Busch - RPI 16
Countable set:
There is a one to one correspondence
of
elements of the set
to
Natural numbers (Positive Integers)
(every element of the set is mapped to a number
such that no two elements are mapped to same number)
Fall 2006 Costas Busch - RPI 17
Example:
Even integers:
(positive)

,
6
,
4
,
2
,
0
The set of even integers
is countable
Positive integers:
Correspondence:

,
4
,
3
,
2
,
1
n
2 corresponds to 1

n
Fall 2006 Costas Busch - RPI 18
Example:The set of rational numbers
is countable
Rational numbers: 
,
8
7
,
4
3
,
2
1
Fall 2006 Costas Busch - RPI 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
Fall 2006 Costas Busch - RPI 20
Better Approach
1
1
2
1
3
1
4
1
1
2
2
2
3
2
1
3
2
3
1
4




Fall 2006 Costas Busch - RPI 21
1
1
2
1
3
1
4
1
1
2
2
2
3
2
1
3
2
3
1
4




Fall 2006 Costas Busch - RPI 22
1
1
2
1
3
1
4
1
1
2
2
2
3
2
1
3
2
3
1
4




Fall 2006 Costas Busch - RPI 23
1
1
2
1
3
1
4
1
1
2
2
2
3
2
1
3
2
3
1
4




Fall 2006 Costas Busch - RPI 24
1
1
2
1
3
1
4
1
1
2
2
2
3
2
1
3
2
3
1
4




Fall 2006 Costas Busch - RPI 25
1
1
2
1
3
1
4
1
1
2
2
2
3
2
1
3
2
3
1
4




Fall 2006 Costas Busch - RPI 26
Rational Numbers: 
,
2
2
,
3
1
,
1
2
,
2
1
,
1
1
Correspondence:
Positive Integers: 
,
5
,
4
,
3
,
2
,
1
Fall 2006 Costas Busch - RPI 27
We proved:
the set of rational numbers is countable
by describing an enumeration procedure
(enumerator)
for the correspondence to natural numbers
Fall 2006 Costas Busch - RPI 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
Fall 2006 Costas Busch - RPI 29
Enumerator
Machine for

,
,
, 3
2
1 s
s
s
S
s
s
s 

,
,
, 3
2
1
Finite time: 
,
,
, 3
2
1 t
t
t
strings
S
output
(on tape)
Fall 2006 Costas Busch - RPI 30
Enumerator Machine
Configuration
Time 0  
0
q
Time
s
q
1
x 1
s
#
1
t
prints 1
s
Fall 2006 Costas Busch - RPI 31
Time
s
q
3
x 3
s
#
3
t
Time
s
q
2
x 2
s
#
2
t
prints 2
s
prints 3
s
Fall 2006 Costas Busch - RPI 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
Fall 2006 Costas Busch - RPI 33
Example: The set of strings
is countable

 }
,
,
{ c
b
a
S
We will describe an enumerator for
Approach:
S
Fall 2006 Costas Busch - RPI 34
Naive enumerator:
Produce the strings in lexicographic order:
a
aa
aaa
......
Doesn’t work:
strings starting with
will never be produced
b
aaaa

1
s

2
s

Fall 2006 Costas Busch - RPI 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)
Fall 2006 Costas Busch - RPI 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

1
s

2
s

Fall 2006 Costas Busch - RPI 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
Fall 2006 Costas Busch - RPI 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
Fall 2006 Costas Busch - RPI 39
0
1
00
01

1
0
11
0
11
0
1
0
1 1
0
11
0
11
0
1
0
1
0
0
11
0
11
0
1
0
1

101
1010010101
0
11
0
1

Binary strings Turing Machines
1
s
2
s
101
1010010101
0
11
0
1
End of Proof
Fall 2006 Costas Busch - RPI 40
Uncountable Sets
Fall 2006 Costas Busch - RPI 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)
Fall 2006 Costas Busch - RPI 42
A set is uncountable
if it is not countable
Definition:
We will prove that there is a language
which is not accepted by any Turing machine
Fall 2006 Costas Busch - RPI 43
Theorem:
If is an infinite countable set, then
the powerset of is uncountable.
S
2 S
S
(the powerset is the set whose elements
are all possible sets made from the elements of )
S
2
S
Fall 2006 Costas Busch - RPI 44
Proof:
Since is countable, we can write
S
}
,
,
,
{ 3
2
1 
s
s
s
S 
Elements of S
Fall 2006 Costas Busch - RPI 45
Elements of the powerset have the form:
}
,
{ 3
1 s
s
}
,
,
,
{ 10
9
7
5 s
s
s
s
……

S
2
Fall 2006 Costas Busch - RPI 46
We encode each element of the powerset
with a binary string of 0’s and 1’s
1
s 2
s 3
s 4
s 
1 0 0 0
}
{ 1
s
Powerset
element
Binary encoding
0 1 1 0
}
,
{ 3
2 s
s
1 0 1 1
}
,
,
{ 4
3
1 s
s
s



(in arbitrary order)
Fall 2006 Costas Busch - RPI 47
Observation:
Every infinite binary string corresponds
to an element of the powerset:
10 
Example: 0111 0
Corresponds to:
S
s
s
s
s 2
}
,
,
,
,
{ 6
5
4
1 

Fall 2006 Costas Busch - RPI 48
Let’s assume (for contradiction)
that the powerset is countable
Then: we can enumerate
the elements of the powerset
}
,
,
,
{
2 3
2
1 
t
t
t
S

S
2
Fall 2006 Costas Busch - RPI 49
1 0 0 0 0
1 1 0 0 0
1 1 0 1 0
1 1 0 0 1
Powerset
element
Binary encoding
1
t
2
t
3
t
4
t




 
suppose that this is the respective
Fall 2006 Costas Busch - RPI 50
1 0 0 0 0
1 1 0 0 0
1 1 0 1 0
1 1 0 0 1
1
t
2
t
3
t
4
t




Binary string: 
0011
(birary complement of diagonal)
Take the binary string whose bits
are the complement of the diagonal

t
Fall 2006 Costas Busch - RPI 51

0011

t
The binary string
corresponds
to an element of
the powerset : S
s
s
t 2
}
,
,
{ 4
3 
 
S
2
Fall 2006 Costas Busch - RPI 52
Thus, must be equal to some i
t
However,
the i-th bit in the encoding of is
the complement of the bit of , thus:
Contradiction!!!
t
i
t
t 
i-th i
t
i
t
t 
t
Fall 2006 Costas Busch - RPI 53
Since we have a contradiction:
The powerset of is uncountable
S
2 S
End of proof
Fall 2006 Costas Busch - RPI 54
An Application: Languages
The set of all Strings:
}
,
,
,
,
,
,
,
,
,
{
}
,
{ *

aab
aaa
bb
ba
ab
aa
b
a
b
a
S 


infinite and countable
Consider Alphabet : }
,
{ b
a
A 
(we can enumerate the strings
in proper order)
Fall 2006 Costas Busch - RPI 55
The set of all Strings:
}
,
,
,
,
,
,
,
,
,
{
}
,
{ *

aab
aaa
bb
ba
ab
aa
b
a
b
a
S 


infinite and countable
Any language is a subset of :
}
,
,
{ aab
ab
aa
L 
S
Consider Alphabet : }
,
{ b
a
A 
Fall 2006 Costas Busch - RPI 56
Consider Alphabet : }
,
{ b
a
A 
The set of all Strings:
}
,
,
,
,
,
,
,
,
,
{
}
,
{ *
*

aab
aaa
bb
ba
ab
aa
b
a
b
a
A
S 



infinite and countable
The powerset of contains all languages:
}
},
,
,
{
},...,
,
{
},
,
{
},
{
},
{
,
{
2 
aab
ab
aa
b
aa
b
a
a
S



uncountable
S
Fall 2006 Costas Busch - RPI 57
Turing machines: 1
M 2
M 3
M 
Languages accepted
By Turing Machines: 1
L 2
L 3
L 
accepts
Denote: }
,
,
,
{ 3
2
1 
L
L
L
X 
countable
Note:
S
X 2

countable
countable
 
*
}
,
{ b
a
S 
Consider Alphabet : }
,
{ b
a
A 
Fall 2006 Costas Busch - RPI 58
X countable
S
2 uncountable
Languages accepted
by Turing machines:
All possible languages:
Therefore:
S
X 2

 
S
S
X
X 2
have
we
,
2
since 

Fall 2006 Costas Busch - RPI 59
There is a language not accepted
by any Turing Machine:
(Language cannot be described
by any algorithm)
Conclusion:
L
S
X 2
 X
L
and
2 



 S
L
L
Fall 2006 Costas Busch - RPI 60
Turing-Acceptable
Languages
Non Turing-Acceptable Languages
L
Fall 2006 Costas Busch - RPI 61
Note that: }
,
,
,
{ 3
2
1 
L
L
L
X 
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

Recently uploaded

➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men 🔝Vijayawada🔝 E...
➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men  🔝Vijayawada🔝   E...➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men  🔝Vijayawada🔝   E...
➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men 🔝Vijayawada🔝 E...amitlee9823
 
Just Call Vip call girls Begusarai Escorts ☎️9352988975 Two shot with one gir...
Just Call Vip call girls Begusarai Escorts ☎️9352988975 Two shot with one gir...Just Call Vip call girls Begusarai Escorts ☎️9352988975 Two shot with one gir...
Just Call Vip call girls Begusarai Escorts ☎️9352988975 Two shot with one gir...gajnagarg
 
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...drmarathore
 
SM-N975F esquematico completo - reparación.pdf
SM-N975F esquematico completo - reparación.pdfSM-N975F esquematico completo - reparación.pdf
SM-N975F esquematico completo - reparación.pdfStefanoBiamonte1
 
Just Call Vip call girls godhra Escorts ☎️9352988975 Two shot with one girl (...
Just Call Vip call girls godhra Escorts ☎️9352988975 Two shot with one girl (...Just Call Vip call girls godhra Escorts ☎️9352988975 Two shot with one girl (...
Just Call Vip call girls godhra Escorts ☎️9352988975 Two shot with one girl (...gajnagarg
 
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一ougvy
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝
Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝
Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...amitlee9823
 
一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制
一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制
一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制uodye
 
Point of Care Testing in clinical laboratory
Point of Care Testing in clinical laboratoryPoint of Care Testing in clinical laboratory
Point of Care Testing in clinical laboratoryoyebolasonuga14
 
➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men 🔝Deoghar🔝 Escorts...
➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men  🔝Deoghar🔝   Escorts...➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men  🔝Deoghar🔝   Escorts...
➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men 🔝Deoghar🔝 Escorts...amitlee9823
 
Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...gajnagarg
 
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)amitlee9823
 
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 

Recently uploaded (20)

➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men 🔝Vijayawada🔝 E...
➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men  🔝Vijayawada🔝   E...➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men  🔝Vijayawada🔝   E...
➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men 🔝Vijayawada🔝 E...
 
Just Call Vip call girls Begusarai Escorts ☎️9352988975 Two shot with one gir...
Just Call Vip call girls Begusarai Escorts ☎️9352988975 Two shot with one gir...Just Call Vip call girls Begusarai Escorts ☎️9352988975 Two shot with one gir...
Just Call Vip call girls Begusarai Escorts ☎️9352988975 Two shot with one gir...
 
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
 
SM-N975F esquematico completo - reparación.pdf
SM-N975F esquematico completo - reparación.pdfSM-N975F esquematico completo - reparación.pdf
SM-N975F esquematico completo - reparación.pdf
 
Just Call Vip call girls godhra Escorts ☎️9352988975 Two shot with one girl (...
Just Call Vip call girls godhra Escorts ☎️9352988975 Two shot with one girl (...Just Call Vip call girls godhra Escorts ☎️9352988975 Two shot with one girl (...
Just Call Vip call girls godhra Escorts ☎️9352988975 Two shot with one girl (...
 
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
 
CHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
(ISHITA) Call Girls Service Aurangabad Call Now 8617697112 Aurangabad Escorts...
(ISHITA) Call Girls Service Aurangabad Call Now 8617697112 Aurangabad Escorts...(ISHITA) Call Girls Service Aurangabad Call Now 8617697112 Aurangabad Escorts...
(ISHITA) Call Girls Service Aurangabad Call Now 8617697112 Aurangabad Escorts...
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝
Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝
Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝
 
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
 
Abortion pills in Jeddah |+966572737505 | Get Cytotec
Abortion pills in Jeddah |+966572737505 | Get CytotecAbortion pills in Jeddah |+966572737505 | Get Cytotec
Abortion pills in Jeddah |+966572737505 | Get Cytotec
 
一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制
一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制
一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制
 
CHEAP Call Girls in Mayapuri (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Mayapuri  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Mayapuri  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Mayapuri (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Critical Commentary Social Work Ethics.pptx
Critical Commentary Social Work Ethics.pptxCritical Commentary Social Work Ethics.pptx
Critical Commentary Social Work Ethics.pptx
 
Point of Care Testing in clinical laboratory
Point of Care Testing in clinical laboratoryPoint of Care Testing in clinical laboratory
Point of Care Testing in clinical laboratory
 
➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men 🔝Deoghar🔝 Escorts...
➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men  🔝Deoghar🔝   Escorts...➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men  🔝Deoghar🔝   Escorts...
➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men 🔝Deoghar🔝 Escorts...
 
Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...
 
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
 
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
 
CHEAP Call Girls in Hauz Quazi (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Hauz Quazi  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Hauz Quazi  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Hauz Quazi (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Universal_Turing_Machine_Formal_Language.ppt

  • 1. Fall 2006 Costas Busch - RPI 1 A Universal Turing Machine
  • 2. Fall 2006 Costas Busch - RPI 2 Turing Machines are “hardwired” they execute only one program A limitation of Turing Machines: Real Computers are re-programmable
  • 3. Fall 2006 Costas Busch - RPI 3 Solution: Universal Turing Machine • Reprogrammable machine • Simulates any other Turing Machine Attributes:
  • 4. Fall 2006 Costas Busch - RPI 4 Universal Turing Machine simulates any Turing Machine M Input of Universal Turing Machine: Description of transitions of M Input string of M
  • 5. Fall 2006 Costas Busch - RPI 5 Universal Turing Machine M Description of Tape Contents of M State of M Three tapes Tape 2 Tape 3 Tape 1
  • 6. Fall 2006 Costas Busch - RPI 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. Fall 2006 Costas Busch - RPI 7 Alphabet Encoding Symbols: a b c d  Encoding: 1 11 111 1111
  • 8. Fall 2006 Costas Busch - RPI 8 State Encoding States: 1 q 2 q 3 q 4 q  Encoding: 1 11 111 1111 Head Move Encoding Move: Encoding: L R 1 11
  • 9. Fall 2006 Costas Busch - RPI 9 Transition Encoding Transition: ) , , ( ) , ( 2 1 L b q a q   Encoding: 1 0 11 0 11 0 1 0 1 separator
  • 10. Fall 2006 Costas Busch - RPI 10 Turing Machine Encoding Transitions: ) , , ( ) , ( 2 1 L b q a q   Encoding: 1 0 11 0 11 0 1 0 1 ) , , ( ) , ( 3 2 R c q b q   11 0 111 0 111 10 1 0 11 00 separator
  • 11. Fall 2006 Costas Busch - RPI 11 Tape 1 contents of Universal Turing Machine: binary encoding of the simulated machine M  1100 0 111 0 111 10 1 0 10011 0 11 0 11 0 1 0 1 Tape 1
  • 12. Fall 2006 Costas Busch - RPI 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. Fall 2006 Costas Busch - RPI 13 Language of Turing Machines L = { 010100101, 00100100101111, 111010011110010101, …… } (Turing Machine 1) (Turing Machine 2) ……
  • 14. Fall 2006 Costas Busch - RPI 14 Countable Sets
  • 15. Fall 2006 Costas Busch - RPI 15 Infinite sets are either: Countable or Uncountable
  • 16. Fall 2006 Costas Busch - RPI 16 Countable set: There is a one to one correspondence of elements of the set to Natural numbers (Positive Integers) (every element of the set is mapped to a number such that no two elements are mapped to same number)
  • 17. Fall 2006 Costas Busch - RPI 17 Example: Even integers: (positive)  , 6 , 4 , 2 , 0 The set of even integers is countable Positive integers: Correspondence:  , 4 , 3 , 2 , 1 n 2 corresponds to 1  n
  • 18. Fall 2006 Costas Busch - RPI 18 Example:The set of rational numbers is countable Rational numbers:  , 8 7 , 4 3 , 2 1
  • 19. Fall 2006 Costas Busch - RPI 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. Fall 2006 Costas Busch - RPI 20 Better Approach 1 1 2 1 3 1 4 1 1 2 2 2 3 2 1 3 2 3 1 4    
  • 21. Fall 2006 Costas Busch - RPI 21 1 1 2 1 3 1 4 1 1 2 2 2 3 2 1 3 2 3 1 4    
  • 22. Fall 2006 Costas Busch - RPI 22 1 1 2 1 3 1 4 1 1 2 2 2 3 2 1 3 2 3 1 4    
  • 23. Fall 2006 Costas Busch - RPI 23 1 1 2 1 3 1 4 1 1 2 2 2 3 2 1 3 2 3 1 4    
  • 24. Fall 2006 Costas Busch - RPI 24 1 1 2 1 3 1 4 1 1 2 2 2 3 2 1 3 2 3 1 4    
  • 25. Fall 2006 Costas Busch - RPI 25 1 1 2 1 3 1 4 1 1 2 2 2 3 2 1 3 2 3 1 4    
  • 26. Fall 2006 Costas Busch - RPI 26 Rational Numbers:  , 2 2 , 3 1 , 1 2 , 2 1 , 1 1 Correspondence: Positive Integers:  , 5 , 4 , 3 , 2 , 1
  • 27. Fall 2006 Costas Busch - RPI 27 We proved: the set of rational numbers is countable by describing an enumeration procedure (enumerator) for the correspondence to natural numbers
  • 28. Fall 2006 Costas Busch - RPI 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. Fall 2006 Costas Busch - RPI 29 Enumerator Machine for  , , , 3 2 1 s s s S s s s   , , , 3 2 1 Finite time:  , , , 3 2 1 t t t strings S output (on tape)
  • 30. Fall 2006 Costas Busch - RPI 30 Enumerator Machine Configuration Time 0   0 q Time s q 1 x 1 s # 1 t prints 1 s
  • 31. Fall 2006 Costas Busch - RPI 31 Time s q 3 x 3 s # 3 t Time s q 2 x 2 s # 2 t prints 2 s prints 3 s
  • 32. Fall 2006 Costas Busch - RPI 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. Fall 2006 Costas Busch - RPI 33 Example: The set of strings is countable   } , , { c b a S We will describe an enumerator for Approach: S
  • 34. Fall 2006 Costas Busch - RPI 34 Naive enumerator: Produce the strings in lexicographic order: a aa aaa ...... Doesn’t work: strings starting with will never be produced b aaaa  1 s  2 s 
  • 35. Fall 2006 Costas Busch - RPI 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. Fall 2006 Costas Busch - RPI 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  1 s  2 s 
  • 37. Fall 2006 Costas Busch - RPI 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. Fall 2006 Costas Busch - RPI 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. Fall 2006 Costas Busch - RPI 39 0 1 00 01  1 0 11 0 11 0 1 0 1 1 0 11 0 11 0 1 0 1 0 0 11 0 11 0 1 0 1  101 1010010101 0 11 0 1  Binary strings Turing Machines 1 s 2 s 101 1010010101 0 11 0 1 End of Proof
  • 40. Fall 2006 Costas Busch - RPI 40 Uncountable Sets
  • 41. Fall 2006 Costas Busch - RPI 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. Fall 2006 Costas Busch - RPI 42 A set is uncountable if it is not countable Definition: We will prove that there is a language which is not accepted by any Turing machine
  • 43. Fall 2006 Costas Busch - RPI 43 Theorem: If is an infinite countable set, then the powerset of is uncountable. S 2 S S (the powerset is the set whose elements are all possible sets made from the elements of ) S 2 S
  • 44. Fall 2006 Costas Busch - RPI 44 Proof: Since is countable, we can write S } , , , { 3 2 1  s s s S  Elements of S
  • 45. Fall 2006 Costas Busch - RPI 45 Elements of the powerset have the form: } , { 3 1 s s } , , , { 10 9 7 5 s s s s ……  S 2
  • 46. Fall 2006 Costas Busch - RPI 46 We encode each element of the powerset with a binary string of 0’s and 1’s 1 s 2 s 3 s 4 s  1 0 0 0 } { 1 s Powerset element Binary encoding 0 1 1 0 } , { 3 2 s s 1 0 1 1 } , , { 4 3 1 s s s    (in arbitrary order)
  • 47. Fall 2006 Costas Busch - RPI 47 Observation: Every infinite binary string corresponds to an element of the powerset: 10  Example: 0111 0 Corresponds to: S s s s s 2 } , , , , { 6 5 4 1  
  • 48. Fall 2006 Costas Busch - RPI 48 Let’s assume (for contradiction) that the powerset is countable Then: we can enumerate the elements of the powerset } , , , { 2 3 2 1  t t t S  S 2
  • 49. Fall 2006 Costas Busch - RPI 49 1 0 0 0 0 1 1 0 0 0 1 1 0 1 0 1 1 0 0 1 Powerset element Binary encoding 1 t 2 t 3 t 4 t       suppose that this is the respective
  • 50. Fall 2006 Costas Busch - RPI 50 1 0 0 0 0 1 1 0 0 0 1 1 0 1 0 1 1 0 0 1 1 t 2 t 3 t 4 t     Binary string:  0011 (birary complement of diagonal) Take the binary string whose bits are the complement of the diagonal  t
  • 51. Fall 2006 Costas Busch - RPI 51  0011  t The binary string corresponds to an element of the powerset : S s s t 2 } , , { 4 3    S 2
  • 52. Fall 2006 Costas Busch - RPI 52 Thus, must be equal to some i t However, the i-th bit in the encoding of is the complement of the bit of , thus: Contradiction!!! t i t t  i-th i t i t t  t
  • 53. Fall 2006 Costas Busch - RPI 53 Since we have a contradiction: The powerset of is uncountable S 2 S End of proof
  • 54. Fall 2006 Costas Busch - RPI 54 An Application: Languages The set of all Strings: } , , , , , , , , , { } , { *  aab aaa bb ba ab aa b a b a S    infinite and countable Consider Alphabet : } , { b a A  (we can enumerate the strings in proper order)
  • 55. Fall 2006 Costas Busch - RPI 55 The set of all Strings: } , , , , , , , , , { } , { *  aab aaa bb ba ab aa b a b a S    infinite and countable Any language is a subset of : } , , { aab ab aa L  S Consider Alphabet : } , { b a A 
  • 56. Fall 2006 Costas Busch - RPI 56 Consider Alphabet : } , { b a A  The set of all Strings: } , , , , , , , , , { } , { * *  aab aaa bb ba ab aa b a b a A S     infinite and countable The powerset of contains all languages: } }, , , { },..., , { }, , { }, { }, { , { 2  aab ab aa b aa b a a S    uncountable S
  • 57. Fall 2006 Costas Busch - RPI 57 Turing machines: 1 M 2 M 3 M  Languages accepted By Turing Machines: 1 L 2 L 3 L  accepts Denote: } , , , { 3 2 1  L L L X  countable Note: S X 2  countable countable   * } , { b a S  Consider Alphabet : } , { b a A 
  • 58. Fall 2006 Costas Busch - RPI 58 X countable S 2 uncountable Languages accepted by Turing machines: All possible languages: Therefore: S X 2    S S X X 2 have we , 2 since  
  • 59. Fall 2006 Costas Busch - RPI 59 There is a language not accepted by any Turing Machine: (Language cannot be described by any algorithm) Conclusion: L S X 2  X L and 2      S L L
  • 60. Fall 2006 Costas Busch - RPI 60 Turing-Acceptable Languages Non Turing-Acceptable Languages L
  • 61. Fall 2006 Costas Busch - RPI 61 Note that: } , , , { 3 2 1  L L L X  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