Approximate bin-packing?


Let $ X_1,…X_n$ denote some bins, and $ w_1,…w_m$ some positive real numbers, where $ m \in \mathbb{N}$ , and the order matters, so e.g. we can’t switch the position of $ w_n$ and $ w_1$ . The goal is to partition $ w_1,…w_m$ into the bins, such that each bin contains "roughly" an equal sum of $ w_i’s$ , e.g. the sums for $ X_1,…X_n$ could approximately equal $ 100$ , so $ X_1$ could have a sum of 104, $ X_2$ could have a sum of 97,… etc. Let’s say this "equal sum" is $ Z$ .

Letting $ Y_i$ be the sum for each $ i^{th}$ bin, is there a way to choose Z such that the error is minimized, error being defined as $ \sum_i |Y_i-Z|$ , where $ 1 \leq i \leq n$ ?