Please read the new rule regarding the restriction on the use of AI tools. ×

Is it a Greedy?

Revision en1, by woolgatherer, 2021-10-10 20:56:45

Recently I faced this problem in some greedy tags. But unfortunately even after several trials, I couldn't come up with a solution. The problem in brief is, You have to distribute some refugees into n counties or groups, each of the county has a limit Ci on number of refugee it can hold. The sum of all Ci is the total number of refugees that we have. your first target is to partition the population into n groups such that each group can be sent to the corresponding county that is C[i] matched with some group. You decided to do the grouping in multiple steps. Assume that initially, there is a single group of people. In each step, you can take any group of refugees with a total population of p and divide them into at mostk(k will be given) groups with an arbitrary number of people in each of the k groups. As you have to talk to all the people you are grouping, the cost of doing this operation is p. At any step, the refugees are not allowed to regroup again. So, you want to group the refugees following the above strategy with minimized cost. Please click on the above link to understand the problem better. Is this problem really a greedy one? If yes, then please explain the choice that we can make to get the optimal answer. If it is not, then also explain some other approach for this problem. I will be grateful to your effort for explaining this.

Tags lightoj, greedy, idea

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English woolgatherer 2021-10-10 20:56:45 1458 Initial revision (published)