We are going to write a Turing machine that reads a string of 1's as input and produces a 1 for output if the string is a length that is a multiple of 3 and outputs a O otherwise. The 1 or O should be...


We are going to write a Turing machine that reads a string of 1's as input and produces a 1 for<br>output if the string is a length that is a multiple of 3 and outputs a O otherwise. The 1 or O should<br>be spaced 1 position to the right of the end of the input. You may assume that the input contains<br>only zero or more 1's.<br>For example here are four before and after snapshots.<br>Before<br>After<br>B1<br>В<br>Input is zero 1's (0 is a multiple of 3)<br><==<br>1<br>1 0<br>11<br>11 0<br>111<br>111 1<br>Here is a Turing machine that does most of the work but is missing one instruction. Fill the blank<br>with the instruction needed. Follow the format of the other instructions (ie, current-state current-<br>head head-instruction new-state, with exactly one space between each).<br>qO 1 R q1<br>q1 1 R q2<br>q2 1 R q0<br>q0 BR q3<br>q1 BR q4<br>93 В 1 q5<br>q4 B0 q6<br>Hint: I suggest you draw what is given and then figure out what single instruction will make the<br>machine behave as described.<br>

Extracted text: We are going to write a Turing machine that reads a string of 1's as input and produces a 1 for output if the string is a length that is a multiple of 3 and outputs a O otherwise. The 1 or O should be spaced 1 position to the right of the end of the input. You may assume that the input contains only zero or more 1's. For example here are four before and after snapshots. Before After B1 В Input is zero 1's (0 is a multiple of 3) <== 1="" 1="" 0="" 11="" 11="" 0="" 111="" 111="" 1="" here="" is="" a="" turing="" machine="" that="" does="" most="" of="" the="" work="" but="" is="" missing="" one="" instruction.="" fill="" the="" blank="" with="" the="" instruction="" needed.="" follow="" the="" format="" of="" the="" other="" instructions="" (ie,="" current-state="" current-="" head="" head-instruction="" new-state,="" with="" exactly="" one="" space="" between="" each).="" qo="" 1="" r="" q1="" q1="" 1="" r="" q2="" q2="" 1="" r="" q0="" q0="" br="" q3="" q1="" br="" q4="" 93="" в="" 1="" q5="" q4="" b0="" q6="" hint:="" i="" suggest="" you="" draw="" what="" is="" given="" and="" then="" figure="" out="" what="" single="" instruction="" will="" make="" the="" machine="" behave="" as="">

Jun 03, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here