Research Article

Minimizing the Average Waiting Time of Unequal-Size Data Items in a Mobile Computing Environment

Algorithm 1

The algorithm of GRA.
Procedure GRA (, D, , TOL, )
INPUT: the number of channels , the database D, the sorted access pattern ,
    the tolerance TOL, the maximal number of iterations .
OUTPUT: the near-optimal solution to WTM.
Step  1    Calculate , , and construct corresponding , ;
     Construct the dummy objective function ;
     Set ; .
Step  2 While () do Steps  3–15.
Step  3   Set ; ; .
      //Note that is the Euclidean distance of .
Step  4   If () then
       Output “”, “Zero gradient!”;
       Stop.
Step  5   Set ; ; ; .
Step  6   While ) do Steps  7 and 8.
Step  7    Set ; .
Step  8    If () then
         Output “, ”, “No more improvement!”;
         Stop.
Step  9   Set ; .
Step  10     Set ; ; .
      //Note that we use Newton’s forward divided-difference formula [11] to find a quadratic
      //polynomial which interpolates at , , .
Step  11      Set ; .
      //Note that the critical point of occurs at .
Step  12     Find from so that .
Step  13     Set .
Step  14     If () then
         Set ;
         Output “, , ”, and “Success!”;
        Stop.
Step  15     Set .
Step  16  Output “, ”, “Maximum iterations exceeded!”.
    Stop.