Discrete Models and Algorithms for Analyzing DNA Rearrangements