Lecture 06
Lecture 06
Lecture #6
Sarmad Abbasi
Virtual University
αqβ, w1 #w2 # · · · wk −1 #x
where α, β ∈ (Γ ∪ )∗ and x ∈ (Σ∗ ∪ Σ∗ #)
1 For i = 1, . . . ,
2 Simulate the machine M on xi
3 If M accepts xi output xi .
Why is this wrong?
Lets say
1 M accepts .
2 M rejects 0.
3 M accepts 1.
4 M loops forever on 00.
5 M accepts 01.
Then the enumerator will never output 01. Whereas, 01 ∈ L. So, we
have to get around this problem.
xt ∈ {x1 , . . . , xi }
An algorithm is a decider.
Suppose
L ⊂ Σ∗
we can define
Le = {e(w) : w ∈ L}.
Designing a TM for M or designing a TM for Le is equally difficult or
easy.
L = {(i, j) : i 2 = j}
(1, 1), (2, 4), (3, 9) are in L and (1, 3), (2, 5), (3, 1) are not in L.
L is a subset of N × N.
(2, 4) to 110001110000
110111011111000011111111011111
000000101110110111011111000101011110 · · ·
which is very long but not conceptually difficult.
Sarmad Abbasi (Virtual University) Theory of Computation 26 / 39
Encodings
L = {G : G is connected }.
L0 = {hGi : G is connected }.
6x 3 yz 2 + 3xy 2 − x 3 − 10.
L(M) = H
(Q, Σ, Γ, q0 , qa , qr , δ).
We have seen examples of this in the last two lectures.
w1 #w2
When you give a high-level description you must be convinced that you
can convert it into a formal one in principle. Although it will take a very
long time to do so.