View Single Post
Old 2015-09-06, 18:59   #14
T.Rex's Avatar
Feb 2004

32×103 Posts

About proving the sufficiency, I think that an issue (as I already said) is that s can be equal to sn before i==n-1 .
Finding s(n-1)==sn only after n-1 iterations and not before is important I think.
I think that it is important to add a check s!=sn after the computation of s from i=1,n-2 .
T.Rex is offline   Reply With Quote