Trying to tag parts of a word and keep track of any changes that happen to those parts
You can use sequence alignments with a suitable score. You then get something like this:

$\qquad\displaystyle
\begin{array}{cccccc}
  r &amp; e &amp; p &amp; e &amp; a &amp; t &amp; e &amp; d \\
  r &amp; - &amp; p &amp; e &amp; - &amp; t &amp; e &amp; -
\end{array}$

Now, if you have marked the original word, you can read off that -- according to your alignment score -- only "r" is left from the prefix, "pet" from the stem and "e" from the suffix.

The score makes a difference when parts may be assigned to e.g. prefix or stem. Levenstein/edit distance and Damerau-Levenstein distance may be good starting points. Play around with the penalties a bit; note that you can assign costs depending on whether you match against prefix, stem or suffix (if you have marked the original words) and use things like affine gap costs.