Troubleshooting X+y Turing Machine Example

In summary, the function x+y is Turing-computable, but the example listed does not work for x=2 and y=1. The table might specify what state the machine should start in, but the example does not follow that.
  • #1
wheezyg
5
0
I am working out of Cutlands computability book and I am having trouble understanding the following example:

"The function x+y is Turing-computable." Then the example lists the following specifications:
q_1 1 B q_1
q_1 B R q_2
q_2 1 B q_3
q_2 B R q_2


I wanted to verify this worked for, say, x=2 and y=1. I should end up with three. I started by writing out the tape the machine should begin with (blank marked by B):
...| 1 | 1 | B | 1 | B | ...

The first problem I am having is not understanding where I should start and what state it the start should be. When I start with the following square (marked with * to the right of the number in the square) at state q_1, I get the following:

Start ...| 1* | 1 | B | 1 | B | ...
End ...| B | B | B | 1 | B | ...

Which cannot be correct since I am attempting to add 2&1 not subtract 1 from 2. Can someone please point out what I am doing wrong?

Thank you!
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
No help for your question, but for future reference, the word is Turing, after Alan Turing, a British mathematician who was on the team during WW II that decrypted the messages encoded by the German Enigma machine.
 
  • #3
wheezyg said:
"The function x+y is Turing-computable." Then the example lists the following specifications:
q_1 1 B q_1
q_1 B R q_2
q_2 1 B q_3
q_2 B R q_2
What does a row of this table actually mean?
 
  • #4
They are just the quadruples that give the specification for the machine.

These can be of the form q_i s_j s_k q_l where the action is specified for the Turing machine in state q_i containing the symbol s_j. If s_k is another symbol, we replace s_j with s_k, if s_k = L (or R) we move one square to the left (or right). The final q_l tells us that we now change the state of q_i to q_l.

So q_2 1 B q_3 (row three) tells me to change the value of 1 in the square of state q_2 to B (blank) then change its state to q_3.

I am stuck on the example since I don't know if I am starting in the correct square in e correct state.
 
Last edited:
  • #5
Are you sure the turing machine wasn't supposed to be:
Code:
q1 1 B q1
q1 B R q2
q2 B 1 q3
q2 1 R q2
 

1. What is a Turing machine?

A Turing machine is a theoretical model of computation that is capable of performing any algorithm. It consists of a tape, a read-write head, and a set of rules for manipulating the tape. It was first proposed by Alan Turing in 1936 and is the basis for modern computer architecture.

2. How does a Turing machine work?

A Turing machine works by reading symbols from a tape and following a set of predetermined rules to manipulate those symbols. It can write to or erase symbols on the tape and move the read-write head left or right. This process continues until the machine reaches an accept or reject state.

3. What is the purpose of troubleshooting a Turing machine?

The purpose of troubleshooting a Turing machine is to identify and fix any errors or issues that may be causing the machine to produce incorrect results. This is important in order to ensure the accuracy and reliability of the machine's outputs.

4. What are some common issues that may arise when troubleshooting a Turing machine?

Some common issues that may arise when troubleshooting a Turing machine include faulty hardware components, incorrect or incomplete rules, and errors in the input or output of the machine. It is also possible for the machine to get stuck in an infinite loop, which must be identified and resolved.

5. How can I effectively troubleshoot a Turing machine?

To effectively troubleshoot a Turing machine, it is important to have a thorough understanding of its design and operation. This includes identifying potential sources of error, thoroughly testing and debugging the machine, and making adjustments as needed. Collaborating with other experts in the field can also be helpful in identifying and solving complex issues.

Similar threads

  • Advanced Physics Homework Help
Replies
2
Views
224
  • Programming and Computer Science
Replies
25
Views
4K
  • Programming and Computer Science
Replies
29
Views
3K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Programming and Computer Science
Replies
1
Views
761
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
  • Introductory Physics Homework Help
Replies
1
Views
720
  • Programming and Computer Science
Replies
2
Views
1K
  • Programming and Computer Science
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
500
Back
Top