ACTIVITY
You'll use JFLAP
and choose the
Turing Machine option.
[
Note: JFLAP's Turing machine model is slightly
different than ours. The JFLAP Turing machine has a two-way
infinite tape, rather than one-way. I want you to avoid
using JFLAP's two-way infiniteness! In other words, your
machine should never touch the tape square that is left of the
square the tape head originally points to!]
Construct Turing Machines (input alphabet is {a,b} for all
problems) with JFLAP that:
-
swaps all the as and bs in the input.
E.g.
abb → baa.
-
swaps all the as and bs in the input
and leaves the read/write head pointing to the first
character in the string.
Note: This should be a 1-way infinite tape
solution! I.e. your
machine should never touch the tape square that is left of the
square the tape head originally points to!
-
copies the first letter of the string to the square
following the first blank after the string.
E.g.
abb → abb a.
-
copies the input with a blank in between the input and the
copy. E.g.
abb → abb
abb.
-
halts if the input is a palindrome, goes into an infinite
loop otherwise.
Note: Please save each machine as a separate JFLAP
file. You might need them later!