User blog comment:QuasarBooster/Bashicu matrix version 4 in Python!/@comment-35470197-20191109233117/@comment-35470197-20191110000957

Right. In the searching process of ancestors of S_xy, you can only pick up ancestors of S_x(y-1). (Therefore you need to compute not only parents but also all ancestors in order to recurse the process.)