Week1 of Course 2 of NLP specialization. Quitz question No.7. “The value
D[i−1,j−1]+rep_cost is valid only when the source letter is the same as the target letter, otherwise, the last value would be D[i−1,j−1].” What does this sentence mean? I need help to give an example to explain the quoted sentence which is displayed by grading automatically when I submit my choosing of optional answers. Thanks.
@qihua-william are you sure you are reading the question right ? Or what exactly are your options for answers ?
If this were a true/false question, I would have to say that statement is false.
The reasoning is shown in this section of the reading (and in the video corresponding):
So basically if the source letter and the target letter are the same… There is nothing to replace. This you’d have no cost.
But as mentioned, this statement is false, so it is actually the other way around. I.e. "The value
D[i−1,j−1]+rep_cost is valid only when the source letter is different from the target letter, otherwise, the last value would be D[i−1,j−1].”
Thank you for help. I understand your explanation by the reading reference. I just am confused by the quote statement which is popped up by the grading when I submitted my choosing. But anyway I understood it already no matter what explnantion given by grading system. I appreciate your refering to the reading page.
Okay-- What you referred to in your post though was the actual question, right ? Not ‘what popped up’ correct ? I’m not sure what popped up.
I refer to this question. With your explanation now I understand why the third option is not correct. Thank you again.
Oh… Well option 3 is generally, but not strictly correct. Glad you understand it now. ![]()

