Professional Documents
Culture Documents
LBAs
Linear Bounded Automata (LBAs)
Sama denganTuring Machines
Dengan satu Perbedaan:
Input string
[ a b c d e ]
Working space
Left-end Right-end
in tape
marker marker
Open Problem:
NonDeterministic LBA’s
have same power with
Deterministic LBA’s ?
Example languages accepted by LBAs:
L {a b c }
n n n
L {a }
n!
Conclusion:
they execute
only one program
Attributes:
• Reprogrammable machine
Description of transitions of M
Initial tape contents of M
Tape 1
Three tapes
Description of M
Universal
Tape 2
Turing
Machine
Tape Contents of M
Tape 3
State of M
Tape 1
Description of M
Symbols: a b c d
States: q1 q2 q3 q4
Move: L R
Encoding: 1 11
Transition Encoding
Encoding: 1 0 1 0 11 0 11 0 1
separator
Machine Encoding
Transitions:
(q1, a ) (q2 , b, L) (q2 , b) (q3 , c, R)
Encoding:
1 0 1 0 11 0 11 0 1 00 11 0 110 111 0 111 0 11
separator
Tape 1 contents of Universal Turing Machine:
Therefore:
111010011110010101, ……
…… }
Countable Sets
Infinite sets are either: Countable
or
Uncountable
Countable set:
Even integers: 0, 2, 4, 6,
Correspondence:
Positive integers: 1, 2, 3, 4,
2n corresponds to n 1
Example: The set of rational numbers
is countable
1 3 7
Rational numbers: , , ,
2 4 8
Naïve Proof
1 1 1
Rational numbers: , , ,
1 2 3
Correspondence:
Positive integers: 1, 2, 3,
Doesn’t work:
we will never count 2 2 2
, , ,
numbers with nominator 2: 1 2 3
Better Approach
1 1 1 1
1 2 3 4
2 2 2
1 2 3
3 3
1 2
4
1
1 1 1 1
1 2 3 4
2 2 2
1 2 3
3 3
1 2
4
1
1 1 1 1
1 2 3 4
2 2 2
1 2 3
3 3
1 2
4
1
1 1 1 1
1 2 3 4
2 2 2
1 2 3
3 3
1 2
4
1
1 1 1 1
1 2 3 4
2 2 2
1 2 3
3 3
1 2
4
1
1 1 1 1
1 2 3 4
2 2 2
1 2 3
3 3
1 2
4
1
1 1 2 1 2
Rational Numbers: , , , , ,
1 2 1 3 2
Correspondence:
Positive Integers: 1, 2, 3, 4, 5,
We proved:
and
Time 0
q0
Time t1 x1 # s1
qs
Time t2 x2 # s2
qs
Time t3 x3 # s3
qs
Observation:
Proof:
We will describe the enumeration procedure
Naive procedure:
Produce the strings in lexicographic order:
a
aa
aaa
aaaa
......
Doesn’t work:
strings starting with b
will never be produced
Better procedure: Proper Order
..........
a
b length 1
c
aa
ab
ac
Produce strings in ba
Proper Order: bb length 2
bc
ca
cb
cc
aaa
aab length 3
aac
......
Theorem: The set of all Turing Machines
is countable
Repeat
1. Generate the next binary string
of 0’s and 1’s in proper order
S
The powerset 2 of S is uncountable
Proof:
S {s1, s2 , s3 ,}
Elements of S
Elements of the powerset have the form:
{s1, s3}
{s5 , s7 , s9 , s10 }
……
We encode each element of the power set
with a binary string of 0’s and 1’s
Encoding
Powerset
element s1 s2 s3 s4
{s1} 1 0 0 0
{s2 , s 3 } 0 1 1 0
{s1,s 3 , s4 } 1 0 1 1
Let’s assume (for contradiction)
that the powerset is countable.
t2 1 1 0 0 0
t3 1 1 0 1 0
t4 1 1 0 0 1
Take the powerset element
whose bits are the complements
in the diagonal
t1 1 0 0 0 0
t2 1 1 0 0 0
t3 1 1 0 1 0
t4 1 1 0 0 1
New element: 0011
(birary complement of diagonal)
The new element must be some ti
of the powerset
from definition of ti
the i-th bit of ti must be
the complement of itself
Contradiction!!!
Since we have a contradiction:
A language is a subset of S :
M1 M2 M3 ?
Turing machines: countable
There are infinitely many more languages
than Turing Machines
Conclusion: