Question: divide up the sign so that the maximum workload is as small as possible. Input: A sequence of sign lengths, s 1 ,s 2 ,,s
divide up the sign so that the maximum workload is as small as possible.
Input: A sequence of sign lengths, s1,s2,,sn, a number of worker k, where kn.
hint: (Dynamic programming) a sequence of mk1 positions where the work is divided: p12
For example:
input S = <2,1,10,77,6>, workers k =3,
one solution: if
1, p2, p3>=<2,4,5>, then worker_1 work p1 = 2 => install s1 and s2 signs, work length 2+1=3; worker_2 work p2 = 4 => install s3 and s4 signs, work length= 10+77=87; worker_3 work p3 =5 => install s5, work length= 6 .
when all worker finished the job? is worker_2 finshied 87 length.
another solution: if < p1, p2, p3>=<2,3,5>, then worker_1 work p1 = 2 => install s1 and s2 signs, work length 2+1=3; worker_2 work p2 = 3 => install s3 signs, work length= 10, worker_3 work p3 =5 => install s4,s5, work length=77+ 6=83 .
when all worker finished the job? is worker_3 finshied 83 length.
base on two solutions, the second one (83) is best then first one (87).
Question:
- What is the objective function for this problem? Be precise and mathematical (ideally it should be a single formula).
- For an input with n signs and k workers, how many feasible solutions are there?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
