Name: ____________________________________________________ Alpha: _____________________

Describe help received: _________________________________________________________________

Problem 1

Using JFLAP, construct (and test!) a machine that reads in an input string over the alphabet {a,b} and halts with the cell the read/write head points to containing 1 if the input's length is odd and a □ (blank) otherwise. For example, if "aabba" is on the tape when the machine starts, the read/write head should point to a cell containing 1 when the machine halts. I don't care what else is on the tape when the machine halts.
Turn in: a printout of the machine. Note, you must use JFLAP!

Problem 2

One fun thing you can do with a Turing Machine is to send it into an infinte loop. The following machine halts if its input begins with a, and goes into an infinite loop otherwise. I mean, it's one way of showing that you don't like a string. You can think of it as throwing a tantrum.
Use JFLAP to construct (and test!) a machine that halts when its input is a palindrome over {a,b} and goes into an infinite loop otherwise. What you leave on the tape is up to you.
Turn in: a printout of the machine. Note, you must use JFLAP!