Name: ____________________________________________________ Alpha: _____________________

Describe help received: _________________________________________________________________

Problem 1

Using JFLAP, construct (and test!) a machine that reads in a string over the alphabet {a,b}, erases it, and prints a "1" on the tape if its length is odd and a "0" if its lenth is even. For example, if "aabba" is on the tape when the machine starts, just "1" should be 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!