Now, I have assumed the unary number to be 1. and my doubts are

  1. Do you design this machine similar to normal unary multiplication assuming that the constant 2 (11) is always present in the input tape? Or
  2. Is there only one unary number present in the tape?

This confusion may be because of my poor understanding of the question. But, I tried solving it assuming that the tape has only one unary number.

What I thought is

i. Any unary number multiplied by 2 is the number concatenated to itself. Eg. 111 times 2(11) is 111111

ii. I took a tape with the number and a separator 0.

iii. Then convert a 1 to 'x' and a blank symbol after the separator to 1.

iv. now after every 1 before the separator is turned x and the same number of blanks after the separator has been turned into 1, change the separator to 1, turn all x back to 1, and change terminal 1 to blank.

v. That way the number was concatenated after itself (multiplied by 2)

This was the machine I got TM to multiply unary number by 2

A string simulated using above logic enter image description here

Would it be correct to solve this using the approach in point 1 or the way I did it?

  • $\begingroup$ We discourage "please check whether my answer is correct" questions, as only "yes/no" answers are possible, which won't help you or future visitors. See here and here. Can you edit your post to ask about a specific conceptual issue you're uncertain about? As a rule of thumb, a good conceptual question should be useful even to someone who isn't looking at the problem you happen to be working on. If you just need someone to check your work, you might seek out a friend, classmate, or teacher. $\endgroup$
    – D.W.
    Dec 1, 2023 at 22:42


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.