enter image description here

I believe in the video walkthrough, the guy said that it is possible to tell the next steps just from the numbers. However, I can think of several examples of why I don't think this can be so.

Take the image above, for example. The solutions of 2S or 2D are equally valid. However, a big difference is going to be made by which we choose; we can either insert the 'C' and Substitute the 'A' and then delete the 'T', or we can substitute through.

However, which one we choose makes a huge difference. Because the full words may be "cat" and "ate" the PRIOR numbers alone, it seems cannot be used to solve this ambiguity, unless there is some rule I'm missing. Therefore - though the video does not seem to suggest it - it seems to be a need to keep track of the paths you have created, and a need to choose this path based on future entries.

Is this true, or is there something else I'm missing?


As far as I know, we do not need more information.

In fact, I only used information from

  • the exercise
  • the lecture video
  • the files in similarities.zip
  • and probably some generic documentation about python, jinja2 and html

I felt that we should be able to find all specifications in there; we should not even need to watch the walkthroughs to find missing bits of specification.

Because of that, i just made the following assumptions:

  • whenever more than one chosen path would give the same cost, we can simply choose one of the operations.
  • whenever we can "skip" a character because it is the same for both strings, we can registrate it as a zero-cost substitution.

Please note that I could easily make those assumption, because:

  • we can easily resubmit if we made incorrect assumption
  • we can always look inside the score() function of applications.py to see which choices their side of the application makes
  • whenever we need more information about the output of our helper function, we can easily make a tiny (temporary) change in matrix.html to show the operation.

Anyway, it's very easy to change the choices we made in the helper function, we don't even have to restart our web application for that ...

Finally, to quote Cliff B:

If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)


I just realised that there is probably something else you are missing:

Both in the 2S case and in the 2D case, you end up with CA (plus whatever is left from the first word).

So following your example, if you are trying to edit ATE into CAT, in both cases you would still have to substitute the remaining E with a T. That would give you 2 equally valid paths with a score of 3 steps. (Which of course would still lose against the 2-step edit I-S-S-D ...)

And again, to quote Cliff B:

If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .