- #1
avalys
- 2
- 0
I need to construct a finite series with N elements, such that:
element 1 has the value A
element N has the value B
elements 1 through N sum to Z
A, B and Z are all positive numbers, as is Z. Additionally, I would like minimize the largest difference between any adjacent numbers in the series - i.e. minimize max_i(abs(N_i - N_i+1))
It is trivial to construct this series:
A, (Z-A-B)/(N-2), (Z-A-B)/(N-2), ..., B
which has the appropriate sum - but I don't know how to implement the minimax criteria.
element 1 has the value A
element N has the value B
elements 1 through N sum to Z
A, B and Z are all positive numbers, as is Z. Additionally, I would like minimize the largest difference between any adjacent numbers in the series - i.e. minimize max_i(abs(N_i - N_i+1))
It is trivial to construct this series:
A, (Z-A-B)/(N-2), (Z-A-B)/(N-2), ..., B
which has the appropriate sum - but I don't know how to implement the minimax criteria.