92.4k views
1 vote
In the examples below represents any positive integer in unary notation (i.e. 1, 11, 111... for 1,2,3, etc.)

1. Given an input of the form write a Turing Machine that determines whether has a remainder of 0, 1 or 2 when divided by 3.
Example: Input 1111 should indicate that the remainder is 1. Input 111111 should indicate that the remainder is 0.
2. Given an input of the form write a Turing machine that adds an = symbol at the end of the input and then copies the number to output a simple equation of the form =.
Example: Input 111 Output: 111=111
3. Given an input of the form x<3> write a Turing machine that multiplies the number n by 3 and gives the output
Example: Input 11x111 Output: 11x111=111111
4. Given input of the form x where n and m are less than 6, output the product of m and n. (You do not have to validate m and n).
Examples: Input 11111x11 Output 11111x11=1111111111

1 Answer

4 votes

Final answer:

The student's questions pertain to creating Turing machines for operations using unary notation: determining remainders when divided by 3, duplicating numbers, multiplying by 3, and multiplying two unary numbers with restricted values - all central to the theory of computation.

Step-by-step explanation:

Turing Machine Operations

The student's question relates to the design of Turing machines for specific computational tasks using unary notation. First, to determine the remainder when a unary number is divided by 3, a Turing machine can be programmed to delete three symbols at a time and indicate the remainder based on the symbols left. Second, duplicating a unary number with an '=' in between can be achieved by copying the input, marking the end, and writing it again. Third, to multiply a unary number by 3, the Turing machine can be set to copy the input three times sequentially. Lastly, to calculate the product of two unary numbers (n and m), provided they are less than six, the Turing machine can sequentially write the first number 'm' times to represent multiplication.

These tasks involve understanding the unary representation of numbers where each '1' represents a single unit. The calculations mandate a fundamental grasp of multiplication and division in unary, which mirrors the basic arithmetic operations performed with more familiar numeric systems, just with a different representation of numbers. Turing machines execute these tasks through a sequence of state changes and symbol manipulations, representing foundational concepts in computer science and theory of computation.

User Guangcong Liu
by
9.1k points