When are two words in the set W(S) equivalent?