Question: Informally in this problem we consider how to divide the chapters in a story into volumes (think the seven volumes of Harry Potter or however

 Informally in this problem we consider how to divide the chapters

Informally in this problem we consider how to divide the chapters in a story into volumes (think the seven volumes of Harry Potter or however many Game of Thrones volumes there will be) so as to equalize the size of the volumes. The input consists of positive integers x_1, x_2,...,x_n and k lessthanorequalto n. Here x_i is the number of pages in chapter i, and k is the desired number of volumes. The problem is determine which chapters go into each of the k volumes so as to minimize the difference between the most number of pages in any volumes, and the least number of pages in any of the volumes. Of course you cannot reorder the story. Give an algorithm whose running time is bounded by a polynomial in n. You running time should not depend on the number of pages in the chapters

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!