Upvote Upvoted 1 Downvote Downvoted
Subtraction Turning Machine
posted in Off Topic
1
#1
0 Frags +

So for CS we need to make a turning machine that does subtraction of whole numbers to result in whole numbers.

I made a code, but the teacher said it was wrong.

The format is in <Statecurrent, Symbol, Statenext, Action>

Any tips?

So for CS we need to make a turning machine that does subtraction of whole numbers to result in whole numbers.

I made a code, but the teacher said it was wrong.

The format is in <Statecurrent, Symbol, Statenext, Action>

Any tips?
2
#2
1 Frags +

Do you mean Turing machine? And what was the answer you gave?

This link might help you:
http://scientopia.org/blogs/goodmath/2012/06/24/turing-machines-what-they-are-what-they-arent/

On that page is a table of states, actions and symbols, and a basic explanation of a Turing machine. You should also know what a state diagram is before doing this problem, otherwise this will be confusing.

The basic concept is you want to make a machine that erases a 1 from the left number and a 1 from the right number until the one on the right no longer exists, so something like this:

5-3:
11111 111
1111_ 11_
111__ 1__
11___ ___
DONE

_ - denotes places that were erased
space separates the two numbers

There's a lot of good information out there about everything CS-related so I recommend doing your own research if you don't understand some of the finer principles.

Do you mean Turing machine? And what was the answer you gave?

This link might help you:
http://scientopia.org/blogs/goodmath/2012/06/24/turing-machines-what-they-are-what-they-arent/

On that page is a table of states, actions and symbols, and a basic explanation of a Turing machine. You should also know what a state diagram is before doing this problem, otherwise this will be confusing.

The basic concept is you want to make a machine that erases a 1 from the left number and a 1 from the right number until the one on the right no longer exists, so something like this:

5-3:
11111 111
1111_ 11_
111__ 1__
11___ ___
DONE

_ - denotes places that were erased
space separates the two numbers

There's a lot of good information out there about everything CS-related so I recommend doing your own research if you don't understand some of the finer principles.
Please sign in through STEAM to post a comment.