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:

  1. swaps all the as and bs in the input. E.g. abbbaa.

  2. 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!

  3. copies the first letter of the string to the square following the first blank after the string. E.g. abbabb a.

  4. copies the input with a blank in between the input and the copy. E.g. abbabb abb.

  5. 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!