D4-Minimum Edit Cost for changing word w1 to w2