Theoretical Analysis of Edit Distance Algorithms