4 ms·
Of course this tells me about the state of the variant. And it's the same invariant the author uses but with the equation balanced differently. The author's in
by maweki 8y ago
Of course this tells me about the state of the variant. And it's the same invariant the author uses but with the equation balanced differently.
The author's invariant is
Sum = 1+2+..I
Mine is
Sum+(I+1)+...+X = 1+2+..I+(I+1)+...+X
That's both fine and tells us about I. I think the version that contains the value we want to obtain is easier to prove correctness for.