Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Need to construct a finite series with certain properties

  1. Aug 21, 2009 #1
    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.
  2. jcsd
  3. Aug 21, 2009 #2


    User Avatar
    Science Advisor
    Homework Helper

    You can't do any better than to have all of the interior points increasing (if a < b), decreasing (if a > b), or equal (if a = b). So it looks like you already have the answer.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Need to construct a finite series with certain properties