For this part of the assignment you will design, Implement, and analyze the performance of a single tape
DTM that perform sthe subtraction of two unary numbers. Unary numbers are non-negative integers n is
represented by a string of n successive 1's.
Please note that you could define other symbols in I. If, for example, you include S,E in your set I you could
use those symbols to recognize the start of data on the tape (S) and the end of data on the tape (E) making
those symbols available to you in your state modeling. Remember that each state must fully define the oper-
ation of the DTM in that state for each symbol in P.
For a Turing machine, the time complexity refers to the measure of the number of times the tape moves when
the machine is initialized for some input symbols and the space complexity is the number of cells of the tape
written.
(a) [5 points] Write the formal 6-tuple $M = (\Gamma, Q, s, \delta, \Sigma, b)$ that defines a DTM that does unary subtraction
(b) [25 points] Implement the TM that does the unary subtraction and that displays the result as a unary
number. The TM will need to handle the subtraction of two variable length unary inputs. The two numbers
to be subtracted are separated by a blank. What is the time and space complexity? Justify your answer.