Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. (Code as data) Consider the following description of a three-tape TM H. Algorithm: H((M, w)) Input : Encoding of a basic TM M and

image text in transcribed

1. (Code as data) Consider the following description of a three-tape TM H. Algorithm: H((M, w)) Input : Encoding of a basic TM M and a string we {0, 1}* 1. Copy the the string w to tape 2. 2. Repeat the following three steps forever: 3. Simulate M for one step on tape 2. 4. Erase the contents of tape 3. Copy the contents of tape 2 to tape 3, and check if the substring 1010 appears on tape 3. If it does, accept. Otherwise, continue. 5. If M halts (in either an accept or reject state), reject. Otherwise, continue. (a) Let M be the following (uninteresting) TM. Is (M1,) E L(H)? Explain why or why not. Algorithm: M1(2) Input : String x {0,1}* 1. Write "010101 to the tape and reject. (b) Let M, be the following TM. Is (M2, 101) L(H)? Explain why or why not. Algorithm: M2(2) Input : String x {0, 1}* 1. Scan the input string x and (without writing anything) accept if the last symbol of x is 1. Otherwise, reject. (c) What is the language L(H) recognized by H? (d) Is H a decider for the language L(H)? Explain why or why not. 1. (Code as data) Consider the following description of a three-tape TM H. Algorithm: H((M, w)) Input : Encoding of a basic TM M and a string we {0, 1}* 1. Copy the the string w to tape 2. 2. Repeat the following three steps forever: 3. Simulate M for one step on tape 2. 4. Erase the contents of tape 3. Copy the contents of tape 2 to tape 3, and check if the substring 1010 appears on tape 3. If it does, accept. Otherwise, continue. 5. If M halts (in either an accept or reject state), reject. Otherwise, continue. (a) Let M be the following (uninteresting) TM. Is (M1,) E L(H)? Explain why or why not. Algorithm: M1(2) Input : String x {0,1}* 1. Write "010101 to the tape and reject. (b) Let M, be the following TM. Is (M2, 101) L(H)? Explain why or why not. Algorithm: M2(2) Input : String x {0, 1}* 1. Scan the input string x and (without writing anything) accept if the last symbol of x is 1. Otherwise, reject. (c) What is the language L(H) recognized by H? (d) Is H a decider for the language L(H)? Explain why or why not

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

How do Dimensional Database Models differ from Relational Models?

Answered: 1 week ago

Question

What type of processing do Relational Databases support?

Answered: 1 week ago

Question

Describe several aggregation operators.

Answered: 1 week ago