I have an array of n
positive numbers. I need to split it into N
contiguous sub-arrays; n > N
.
I need to minimize [max S(j) over j] - [min S(j) over j]
,
where S(j)
denotes sum of elements in j-th
sub-array, (j = 1,...,N)
.
I.e., all sub-arrays should have "same" sum of elements.
I am sure this problem is known.. Could someone point me to algorithms, implementations, or publications?