Course Slide Question

A small detail to confirm:
The third line should be w(3, m-2), instead of w(m, m-2), right? Because there are only 3 consecutive words in this chain.

The slide is actually correct as-is.

The notation w_i^j means “the word sequence from position i to position j.” The superscript is the ending index, not the word count.

So w_{m-2}^m reads as: start at word m-2, end at word m. That gives you w_{m-2}, w_{m-1}, w_m, which is indeed 3 consecutive words (the last 3 in the corpus).

If it were w_{m-2}^3, that would mean “from position m-2 to position 3”, which goes backwards and doesn’t make sense for any reasonable value of m.

Quick reference:

  • w_1^m → position 1 to m → all m words
  • w_1^3 → position 1 to 3 → first 3 words
  • w_{m-2}^m → position m-2 to m → last 3 words