Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

There is N length of signs arranged in a row. The i-th sign has signs[i] length. K workers install signs. install consists of merging exactly

There is N length of signs arranged in a row. The i-th sign has signs[i] length. K workers install signs.

install consists of merging exactly K works, and the work time is of the number of signs to install is equal to the total number of signs in these K.

Find the minimum cost to work time that when all workers finished all sign length.

hint: (Dynamic programming) a sequence of mk1 positions where the work is divided: p1,p2i satisfies 1pin. the worker dividing lines, and the meaning is that worker 1 installs signs 1 through p1, worker 2 installs signs p1+1 through p2, and so on up through worker m+1 who installs signs pm through n. Note that dont actually need to use all k workers to get an optimal solution, which is why mk1 rather than m=k1.

input: signs (S) = [3,2,4,1], k= 3

Explanation:

p=<2,3,4>

worker_1 install two signs [3,2] , cost 5 time

worker_2 install one sign [4], cost 4 time

worker_3 install one sign [1], cost 1 time

Question:

  1. What is the objective function for this problem? Be precise and mathematical (ideally it should be a single formula).(A function that takes the inputs values (the s_i values and k) and a solution (the p_i) values, and computes how good that solution is.)
  2. 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions

Question

How do they research and outline writing projects?

Answered: 1 week ago

Question

Were they made on a timely basis?

Answered: 1 week ago

Question

Did the decisions need to be made, or had they already been made?

Answered: 1 week ago

Question

When there was controversy, was it clear who had the final say?

Answered: 1 week ago