Question: 3. (Programming TMs) (a) Let u {0,...,9}& be your BU university identification (just the numbers no leading U or any intermediate dashes). Let s be

3. (Programming TMs) (a) Let u {0,...,9}& be your BU university identification (just the numbers no leading U or any intermediate dashes). Let s be the sum of the digits of u. This should be a number between 0 and 72. Now convert s to a 7-bit binary number x, with the most significant bit on the left and (most likely) at least one leading 0. Record u, s, and x. The binary number x is your special input that you'll use below. Example: If Jenny's BU UID is U-08-67-5309, she would take u = 08675309, s = 38, and x = 0100110. Write Turing machines that decide the following languages. That is, the machines should always halt after a finite number of steps on every input, and accept a string w if and only if w is in the given language. Implement your TMs in the following environment: http://morphett.info/ turing/turing.html. Your solution should contain: 2 (i) An implementation-level description of your code. (ii) Code that we can copy from your submission and run directly on that website. (Please add comments and make it as readable as possible.) (iii) The sequences of configurations your TM enters on test inputs 00, 00111, and your special input x. (We will also run your solution on additional test inputs to check its correctness.) (b) L1 = {w {0,1}* | w contains an odd number of ls}. (c) L2 = {w E {0, 1}* | there are at least as many ls in w as there are 0s}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
