Click here to Skip to main content
15,892,674 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have N jobs with varied work loads that is to be distributed among n persons so that the work load is as balanced as possible.

e.g-we have to divide 5 jobs with work loads <1,2,3,4,5> between 3 persons. The best way would obviously be to distribute as follows:-

<1,4>,<2,3>,<5>.
Thus the problem is to minimize

z=abs(a-b)+abs(b-c)+abs(c-a)
where a, b, c are the workloads of the three persons.What would be the most efficient way to solve the problem?
Posted
Comments
Sergey Alexandrovich Kryukov 22-Feb-15 13:47pm    
What have you tried so far?
—SA
ZurdoDev 22-Feb-15 22:44pm    
Do you have a coding question?

1 solution

This is an optimization problem. If you are asking about the algorithm, then try Genetic Algorithm, you can find relevant articles[^] on CP.
In a nut shell, you can add another effortless job as 0, so there will be a total of 6 jobs. You program will then permutate these 6 jobs among the 3 persons, then use the z=abs(a-b)+abs(b-c)+abs(c-a) as the fitness function to measure the balance-ness of each permutation.
Person            a          b            c
job rotation1   2, 3        0 5         4, 1  => z?
job rotation2   0, 2        3 1         4, 5  => z?
... and so on

Have fun!
 
Share this answer
 
v2
Comments
Santosh K. Tripathi 22-Feb-15 23:27pm    
nice

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900