Question: Suppose we want to replicate a file over a collection of n servers, labeled S1, S2, , Sn. To place a copy of the file
Suppose we want to replicate a file over a collection of n servers, labeled S1, S2, , Sn. To place a copy of the file at server S_i results in a placement cost of c_i, for an integer c_i > 0. Now, if a user requests the file from server S_i, and no copy of the file is present at S_i, then the servers Sj+1, Sj+2, Sj+3 are searched in order until a copy of the file is finally found, say at server Sj where j > i. This results in an access cost of j-i. (Note that the lower-indexed servers S_{i-1}, S_{i-2}, are not consulted in this search.) The access cost is 0 if S_i holds a copy of the file. We will require that a copy of the file be placed at server Sn, so that all such searches will terminate, at the latest, at Sn. Wed like to place copies of the files at the servers so as to minimize the sum of placement and access costs. Formally, we say that a configuration is a choice, for each server S_i with i = 1,2,,n-1, of whether to place a copy of the file at S_i or not. (Recall that a copy is always placed at Sn.) The total cost of a configuration is the sum of all placement costs for servers with a copy of the file, plus the sum of all access costs associated with all n servers. Give a polynomial - time algorithm to find a configuration of the minumum total cost. What is the running time of your algorithm?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
