Section 4.1

One-Tape Turing Machines

[7/14%]
Show
LaTeX
Example 4.1

Let M1M_{1} be the one-tape DTM defined by the quintuple (Q,ΣQ, \Sigma, Γ,δ,s)\Gamma , \delta , s), where Q={s,q1,q2,q3,p},Σ={a,b},Γ={a,b, B}Q=\left\{ s, q_{1}, q_{2}, q_{3}, p\right\} , \Sigma = \left\{ a, b\right\} , \Gamma =\left\{ a, b, \mathrm{~ B}\right\} and δ\delta is given by the following table:

δ\deltaaabbB
ssp,a,Rp, a, Rp,b,Rp, b, Rq1, B,Lq_{1}, \mathrm{~ B}, L
q1q_{1}q1,a,Lq_{1}, a, Lq1,b,Lq_{1}, b, Lq2, B,Rq_{2}, \mathrm{~ B}, R
q2q_{2}q2,a,Rq_{2}, a, Rq3,b,Rq_{3}, b, Rp, B,Lp, \mathrm{~ B}, L
q3q_{3}p,a,Rp, a, Rq3,b,Rq_{3}, b, Rh, B,Lh, \mathrm{~ B}, L
ppp,a,Rp, a, Rp,b,Rp, b, Rp, B,Lp, \mathrm{~ B}, L

Draw the transition diagram. What will be the computation on the input abbaa b b a? On the input a3ba^{3} b?

?
Problem 4.1.1

Trace DTM M1M_{1} of Example 4.1 and show the computation of M1M_{1} on inputs aabba and bbbab.

?
Problem 4.1.2

Consider the DTM M2=(Q,Σ,Γ,δ,s)M_{2}=(Q, \Sigma , \Gamma , \delta , s) with Q={s,q1,q2},Σ={a,b}Q=\left\{ s, q_{1}, q_{2}\right\} , \Sigma = \left\{ a, b\right\}, Γ={a,b, B}\Gamma =\left\{ a, b, \mathrm{~ B}\right\}, and

δ\deltaaabbB
ssq1, B,Lq_{1}, \mathrm{~ B}, L
q1q_{1}q1,a,Lq_{1}, a, Lq2,b,Rq_{2}, b, Rh, B,Rh, \mathrm{~ B}, R
q2q_{2}h,a,Lh, a, L
?
(a)

Trace M2M_{2} on inputs aaab, abaa and aaaa.

(b)

What is L(M2)L\left(M_{2}\right)?

Problem 4.1.3

Consider the DTM M3=(Q,Σ,Γ,δ,s)M_{3}=(Q, \Sigma , \Gamma , \delta , s), with Q={s,q1,q2,q3,q4,q5}Q=\left\{ s, q_{1}, q_{2}, q_{3}, q_{4}, q_{5}\right\}, Σ={a,b},Γ={a,b, B}\Sigma = \left\{ a, b\right\} , \Gamma =\left\{ a, b, \mathrm{~ B}\right\}, and

δ\deltaaabbB
ssq1, B,Lq_{1}, \mathrm{~ B}, L
q1q_{1}q1,a,Lq_{1}, a, Lq1,b,Lq_{1}, b, Lq2, B,Rq_{2}, \mathrm{~ B}, R
q2q_{2}q3,a,Rq_{3}, a, Rq4,b,Rq_{4}, b, Rq5, B,Lq_{5}, \mathrm{~ B}, L
q3q_{3}q3,a,Rq_{3}, a, Rq4,a,Rq_{4}, a, Rq5, B,Lq_{5}, \mathrm{~ B}, L
q4q_{4}q3,a,Rq_{3}, a, Rq4,b,Rq_{4}, b, Rq5, B,Lq_{5}, \mathrm{~ B}, L
q5q_{5}h,a,Rh, a, Rh, B,Rh, \mathrm{~ B}, R
?
(a)

Trace M3M_{3} on inputs aaabba and bbbabab b b a b a.

(b)

What is the function computed by M3M_{3}?

Problem 4.1.4

Consider the DTM M4=(Q,Σ,Γ,δ,s)M_{4}=(Q, \Sigma , \Gamma , \delta , s), in which Q,ΣQ, \Sigma and Γ\Gamma are the same as those of M3M_{3}, and δ\delta is the same as δ\delta of M3M_{3} except for

δ\deltaaabbB
q5q_{5}q5,a,Lq_{5}, a, Lh, B,Rh, \mathrm{~ B}, R

.

What is L(M4)L\left(M_{4}\right)?

?
Problem 4.1.5

Show that every regular language is Turing-decidable.

?
Problem 4.1.6

Assume that L⊆{0,1}∗L \subseteq \left\{ 0,1\right\}^{*} is Turing-decidable. Show that the language {0,1}∗−L\left\{ 0,1\right\}^{*}-L is also Turing-decidable. That is, for a given DTM MM that computes the characteristic function χL\chi_{L} of LL, describe in detail how to modify MM to get a new DTM M′M^{\prime } such that M′M^{\prime } computes the characteristic function of {0,1}∗−L\left\{ 0,1\right\}^{*}-L. Can you do the same for Turing-acceptable languages?

?