algorithmsbooks / optimization

Errata for Algorithms for Optimization book
68 stars 16 forks source link

p. 46, Eq. 3.14: Shubert-Piyavskii uncertainty regions equation error #14

Closed rbalexan closed 4 years ago

rbalexan commented 4 years ago

I have the second printing. In the upper bound in Equation 3.14, and with respect to how the lower bound is computed, the leading sign is flipped, but the y_min and y^(i) terms inside the parentheses have also been flipped in sign, so the lower and upper bounds appear to be equal.

Based on the algorithm, I think it should be: $ \left[ x^{(i)} - \frac{1}{\ell}(y{min}-y^{(i)}), x^{(i)} + \frac{1}{\ell}(y{min}-y^{(i)}) \right] $

mykelk commented 4 years ago

Hmm... Actually, shouldn't it be $ \left[ x^{(i)} - \frac{1}{\ell}(y^{(i)}-y{min}), x^{(i)} + \frac{1}{\ell}(y^{(i)}-y{min}) \right] $

rbalexan commented 4 years ago

The notation is a little tricky here. I think it may be as I wrote it. The algorithm uses index i as the index of the arg-min of all the sampled function values ($y{min}$ in the equation) and then uses index j to represent the indices of all the sawtooth valleys ($y^{(i)}$ from the equation). In the algorithm, we test that the y[j] < y[i], which is equivalent to $y^{(i)} < y{min}$ in the statement below the equation. Since dy = y[i] - y[j] this is guaranteed to be positive and equivalently, the $y_{min}-y^{(i)}$ term is positive as well.

Might be worth updating the code or the equation to use similar indexing schemes for clarity. Maybe create a new variable y_min in the code and switch the loop index to i?

mykelk commented 4 years ago

Ah, yes! You're exactly right. The equation you gave is completely correct. We'll fix this in eq. 3.14 in the next printing.

I'll let @tawheeler comment on the algorithm.

tawheeler commented 4 years ago

@mykel please don't close issues you still want me to comment on :P

We can certainly change i to be y_min, allowing us to replace j with i.

mykelk commented 4 years ago

Oops, I should have committed with refs, not fixes. Thanks!

tawheeler commented 4 years ago

Done!