Construct a Turing Machine computer science (all on paper, no programming/source code needed) that computes the function
f(n) = n mod 3
In other words, for you non-math majors: sd
It will halt successfully if the number is divisible by 3.
11 (good)
1001 (good)
1101 (bad)
It will go to a reject state with bad input.
There’s a pattern you can figure out to set up your states.
Construct a machine that accepts if the input string {S = x^n y^n } and rejects anything else.
In other words it accepts if there are a certain number of x’s followed by the same amount of y’s.
xx (bad)
xxyy (good)
xxxyyyy (bad)
xxxxxyyyyy (good)
You can write other symbols if you would like, but the only accept strings are x’s followed by same amount of y’s.
Select your paper details and see how much our professional writing services will cost.
Our custom human-written papers from top essay writers are always free from plagiarism.
Your data and payment info stay secured every time you get our help from an essay writer.
Your money is safe with us. If your plans change, you can get it sent back to your card.
We offer more than just hand-crafted papers customized for you. Here are more of our greatest perks.
Get instant answers to the questions that students ask most often.
See full FAQ