This TM moves the a's to be before the b's.
f(ababa) = aaabb, f(bbbaa)= aabbb
This TM makes a copy of the string with a 0 between the original and the copy.
f(aba) = aba0aba, f(bbaa) = bbaa0bbaa