Mobile Information Systems

Volume 2016 (2016), Article ID 9371563, 14 pages

http://dx.doi.org/10.1155/2016/9371563

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

Department of Computer Science and Information Management, Hungkuang University, Taichung 43302, Taiwan

Received 8 November 2015; Revised 19 February 2016; Accepted 29 February 2016

Academic Editor: Lingjie Duan

Copyright © 2016 Jen-Ya Wang. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

In a mobile computing environment, waiting time is an important indicator of customer satisfaction. In order to achieve better customer satisfaction and shorter waiting times, we need to overcome different constraints and make the best use of limited resources. In this study, we propose a minimization problem, allocating unequal-size data items to broadcast channels with various bandwidths. The main idea is to solve the problem in the continuous space . First, we map the discrete optimization problem from to . Second, the mapped problem is solved in optimally. Finally, we map the optimal solution from back to . With the theoretical analyses, we can ensure the solution quality and execution speed. Computational experiments show that the proposed algorithm performs well. The worst mean relative error can be reduced to 0.353 for data items with a mean size of 100. Moreover, almost all the near-optimal solutions can be obtained within 1 millisecond, even for , where is the number of data items, that is, the problem size.

#### 1. Introduction

Broadcasting is an efficient mechanism to transmit information in a mobile computing environment. Popular messages (e.g., weather reports) or instant information (e.g., stock quotes) can be widely disseminated via the broadcast mechanism. This success is mainly due to the high bandwidths of downlinks, which are used for the transmission of data items from a broadcast server to unlimited mobile users. Note that the bandwidths of channels and the sizes of data items might be unequal. The simplest strategy is to equally allocate data items to all channels, or load balance, but it is not the best way to reduce waiting time. Consequently, sophisticated broadcast scheduling or data partition algorithms are called for.

Waiting time, or expected delay, is an important indicator for measuring broadcast performance, for the waiting times of mobile users directly influence their customer satisfaction [1–5]. For example, Chien and Lin [3] found that customers’ waiting experiences may negatively affect their attitudes towards a given service. Moreover, improving the service implies the improvement of user experiences. Therefore, a good broadcast mechanism that is able to reduce waiting time can achieve better customer satisfaction.

Let us observe the simplest form of such problems, that is, . These problems feature single-item queries, multiple channels, and skewed data preferences. Several equal-bandwidth broadcast channels and multiple equal-size data items need to be broadcast over multiple channels periodically. In a mobile computing environment, users can download their desired items via their mobile devices, such as smartphones. Imagine that we allocate a few popular items to a channel, that is, a short cycle length, and other ordinary items to another channel, that is, a long cycle length. Most users can download popular items in a short time, without a long wait. Clearly, access probability and cycle length directly influence broadcast scheduling. Note the unbalanced workloads of these channels (i.e., the different amounts of data) in an optimal allocation. Once the optimal schedule is found, we can achieve shorter waiting times and better customer satisfaction. However, determining optimal schedules requires much execution time. That is, the time complexity excludes the related optimization algorithms from practical use.

Now we consider some complicated forms of such problems, that is, . These problems may have unequal-size data items or various bandwidths. There are still multiple channels and skewed preferences for data items. For example, in [6], the authors assumed that the bandwidths were different. This consideration makes this problem more difficult. In [7], the authors considered another problem, in which the sizes of data items are unequal. This assumption makes the problem more flexible and practical.

In recent years, various other forms have also been studied. In [8], mobile users could download multiple items at a time by sending a simple query. The authors assumed that two queries might have some items in common. To shorten the broadcast cycle length, the duplicate items were centralized and allocated to the same channel. In [9], video was broadcast on a single channel, so the data size was variable. In [10], mobile users could download multiple items in a multichannel environment. However, the wireless links were unreliable, so disconnections occurred frequently. In that study, reducing the waiting time was not the first priority. Instead, the authors aimed to minimize the deadline miss rate. All of the above considerations make the problems more complicated. Obviously, these problems cannot be solved easily or optimally when the problem size is large, so we need some more efficient algorithms to deal with these problems.

Such problems are usually time-consuming or even NP-hard, so several intuitive or metaheuristic algorithms have been proposed. However, traditional algorithms have some shortcomings. For example, although dynamic programming [7, 12] and branch-and-bound algorithms [13, 14] can provide optimal solutions, they are time-consuming and cannot be applied to large problem instances; for example, . On the other hand, some metaheuristic algorithms [8] or greedy approaches [12, 15, 16] generate solutions very quickly. Nevertheless, their solution qualities are not stable. The reason is that their searches are done by random walks in their solution spaces. For the same problem instance, multiple executions of an identical algorithm can generate different solutions. Moreover, as in the case of tabu search, a great amount of memory is needed for keeping track of past experiences. Such algorithms are also unsuitable for large problem instances.

In this study, we consider a waiting time minimization problem (abbreviated as WTM). To make this problem more flexible and practical, meaning that unequal bandwidths and various data sizes are allowed, we propose a linearly convergent algorithm based on a steepest decent technique. First, WTM is mapped from (the discretized space) to (the continuous space). Next, WTM′ in is solved optimally in linear time. Finally, the optimal solution is mapped from back to .

The rest of this study is organized as follows. Section 2 gives the formal definition of the proposed problem. Section 3 establishes the theoretical basis for the problem. Section 4 presents the linearly convergent algorithm. This study is compared with past research in Section 5. In Section 6, computational experiments are conducted to evaluate the performance of the proposed algorithm. Finally, conclusions are drawn in Section 7.

#### 2. Problem Formulation

The waiting time minimization problem (WTM) is formulated as follows. There is a database to be broadcast in a mobile computing environment, where is the th data item for . Let and denote the access probability and the size of , respectively. The total amount of data is . Assume that the access pattern , that is, the sequence of , is given in advance. Assume that a broadcast server is equipped with channels, numbered from 1 to . We let the bandwidth of channel be . Without loss of generality, assume that for all . Each channel is divided into time slices of equal size, called buckets. We need to partition into parts based on the access pattern and assign each part to one of the channels, one item to several consecutive buckets. Then broadcast programs are formed, and each of them will be broadcast cyclically. The average waiting time is defined as the average amount of waiting time spent by each user before he/she receives the desired data item. Finally, the objective is to minimize the average waiting time of the programs under the above assumptions. The objective function can be written as min, where means is allocated to channel or machine .

Three properties regarding WTM are discussed as follows. First, for each single channel , its corresponding broadcast program cycle length is . Then the expected waiting time in receiving on the channel is . If is much larger than , the expected waiting time can be simplified to . Namely, the position order of data items makes no difference on the final result, that is, the average waiting time. Second, the average waiting time can be determined only by data partition. That is, the average waiting time is the weighted sum of the average waiting time on each channel, that is, . Third, such minimization problems are time-consuming or even NP-hard [6, 16, 17]. Consequently, some efficient minimization algorithms are called for. With the above observation, we can define proper objective functions in the next section.

#### 3. Theoretical Basis

In this section, a steepest decent technique is employed to solve the problem. First, we map the WTM problem from to a new problem WTM′ in . Second, we employ a steepest decent technique [11, 18] to obtain the optimal solution to WTM′ in . Finally, we map the optimal solution from back to . The main idea behind the transformation is to improve the solution quality and execution speed. Although WTM can be solved optimally by some optimization algorithms (e.g., a branch-and-bound algorithm) in , it is too time-consuming when is large. On the other hand, though some metaheuristic algorithms (e.g., GA) are able to provide instant solutions in , their solution quality is not guaranteed. For the same problem instance, they may provide different solutions. Consequently, instead of directly optimizing WTM in , we map WTM to and take advantage of the linear convergence and optimality of the gradient-based technique in .

The parameters used in this study are summarized in Parameters at the end of the paper. Parameters , , and are defined earlier. Parameters and are the access patterns used in different spaces, that is, and . We also need two cumulative functions, , , and two interpolating functions, , , to define the objective functions in and in , respectively. Moreover, and are partition vectors or position vectors.

##### 3.1. Mapping WTM from to

First, two objective functions for both WTM and WTM′ are defined. Then we show how to map WTM from to WTM′ in . Finally, we prove that the geometric properties, such as concavity, of both WTM and WTM′ are similar. These proofs ensure that both solution spaces are close to each other.

The relationship between WTM and WTM′ is similar to that between the 0-1 knapsack problem and the fractional knapsack problem [19]. If we can solve the problems in optimally, then the rounded solutions mapped back to are therefore near-optimal solutions to the original problems. To show this relationship, two proper objective functions play an important role. Namely, the objective functions of WTM and WTM′ must resemble each other. Once the two similar objective functions are determined, we can claim that the optimal solution of WTM′ is very close to that of WTM.

Definition 1 helps us to transform the* data* partition problem into a* sequence* partition problem. Since the position order of an access pattern will lead to different results, we need the following definition to help us to ensure the optimality of WTM and WTM′.

*Definition 1. *Given an optimal solution, the programs can be concatenated into an optimal program. Let denote the sequence of that has the same order as the optimal program for WTM. Similarly, let denote the sequence of that has the same order as the optimal program for WTM′.

WTM and WTM′ have different preferences for the order of access pattern. Consider the relationship between the 0-1 knapsack problem and the fractional knapsack problem again. For the fractional knapsack problem, if we take the items of greatest unit value one by one in a preemptive manner, we can easily achieve the maximum objective cost [19]. Thus we try to solve the continuous-case WTM′ by sorting the items in descending order of . That is, the sequence is obtained by sorting in nonincreasing order. On the other hand, for the 0-1 knapsack problem, we may achieve the optimal solution but sacrifice some valuable items because they are too big to fit the knapsack. Clearly, the optimal item partition of the 0-1 knapsack problem cannot be solved by using simple sorting rules. That is, when we reduce an item partition problem to a sequence partition problem, it is difficult to determine the optimal sequence for partition. Consequently, we do not aim to find the optimal sequence for WTM. Instead, we just use for WTM′ to simulate .

Definitions 2 and 3 introduce two cumulative functions regarding the access pattern . With the two cumulative functions, we can define a new objective function in in a more comprehensive way for later transformation.

*Definition 2. *Given , the function of cumulative probability is defined bySimilarly, we define another function to express the cycle length of a broadcast program. The function is defined as follows.

*Definition 3. *Given , the function of the cumulative data size is defined byNow we redefine the objective function for the original problem WTM in . The original objective function is defined from the viewpoint of* data* partition, whereas the new objective function is formulated from the viewpoint of* sequence* partition. With the cumulative functions and , we can determine a proper sequence in advance and then perform partition on the sequence. For simplicity, the leading coefficient of expected waiting time of each channel, 0.5, is omitted in the rest of this study.

*Definition 4. *Given and two constants , for any column vector with , the objective function of WTM is defined bywhere is the bandwidth of channel .

Note that data items numbered are allocated to channel . Therefore, the access probability of channel is and the program cycle length of the channel is .

An interpolating function regarding access probability is defined for mapping WTM from to . To preserve the geometric properties, we interpolate the points , , by using separate line segments. The interpolating function is defined as follows.

*Definition 5. *For , consider the th interval and let the straight line pass through the two points and . The interpolating function is given by An interpolating function regarding program cycle length is also defined as follows. We let it interpolate the points , , by using separate line segments.

*Definition 6. *For , consider the th interval and let the straight line pass through the two points and . The interpolating function is given by Just as we define the objective function for WTM in , we define a dummy objective function for WTM′ in as follows.

*Definition 7. *Given and two constants , , for any position vector with , the objective function of WTM′ is defined bywhere , are the interpolating functions and is the bandwidth of channel .

Since and have the same objective costs at all grid points, the solution spaces of WTM and WTM′ are of similar geometric properties, for example, slope, extreme, and concavity. Lemma 8 shows that both functions agree with each other at all grid points.

Lemma 8. *Given , for any , *

*Proof. *Note that and for all . Then The proof is complete.

By Lemma 8, and have the same function values at grid points. That is, they have similar geometric properties. Therefore, the optimal solution to WTM in is close to that of WTM′ in . The optimal solutions to WTM and WTM′ are also close to each other.

##### 3.2. Optimal Solution to WTM′

In this subsection, we solve WTM′ optimally and obtain the optimal solution in . First, we introduce the concept of gradient. Then the optimality and convergence speed are discussed.

The steepest decent technique we employed is based on the concept of the gradient [11]. Unlike other metaheuristic algorithms, the steepest decent technique always converges at the global minimum instead of piecing several local minimums. Moreover, this steepest decent technique converges in dimensions in linear time instead of performing meaningless random walks. The notation of the gradient is defined as follows.

*Definition 9. *Let : be a continuous differentiable multivariable function. The gradient of at is denoted by and defined byBecause is not differentiable at , we remedy this shortcoming by improper limit. The th element of is modified slightly and redefined asNote that and are therefore right-hand differentiable for . Thus, the gradient of can be obtained for any , and the th element of becomes for three integers with , , and . More specifically, when programming, we do not need to find the derivative of for obtaining the corresponding slope. Instead, we obtain the slope by letting . Hence, we eliminate annoying differentiation procedures in the proposed algorithm.

Similar algorithms are found in [2, 11, 20, 21]. We can modify them slightly in order to obtain the optimal solution in . The details of the algorithm will be presented in the next section. Here, we show only the basic steps of the steepest decent technique as follows:(1)Evaluate at an initial position .(2)Determine the steepest decent direction from that results in a decrease in the value of .(3)Move an appropriate amount (i.e., step size) in this direction, and the new position is .(4)Set .(5)Repeat steps (1) through (4) until the optimal solution is obtained.In order to implement the algorithm easily, we reduce the equation to a single variable functionNote that the value that minimizes is also the value needed for (11). Because the root-finding process in (12) requires much execution time, Burden and Faires [11] employed a quadratic polynomial to interpolate in order to accelerate the root-finding process. The details regarding the quadratic polynomial will be shown in the next section.

The proposed algorithm converges linearly and the proofs of convergence are omitted. Readers can refer to [11, 18]. Even if this algorithm converges rapidly, an accurate initial solution can accelerate the convergence speed more. The following definition and lemma help us to choose an accurate initial solution.

*Definition 10. *Let , be two constants. For any position vector , the length of the th interval is denoted by and defined byfor . Likewise, the difference of caused by is defined byfor .

The following lemma shows how to obtain an accurate initial solution by determining the elements of a position vector or partition vector .

Lemma 11. *If the optimal solution to the dummy objective function is given, then for .*

*Proof. *We show it by contradiction. Suppose for some . Since is the optimal solution to , the sum of products should be the minimal in the interval . On the other hand, since , there exists a number such that . We claim thatLet , , , , , , and . Since the sequence is sorted by in descending order, implies that . That is, if , then . ThenIt contradicts that is the optimal solution. The proof is complete.

By the above lemma, the proposed algorithm is therefore able to start from a better initial position . We find , and such that , where . In the next section, we set instead of randomly choosing . This initial position will also enhance the convergence speed.

Note that the partition vector is a* global* minimizer of WTM′. We prove this property by showing that is concave upward for all . Namely, for any initial vector, the algorithm converges to the global minimum.

Lemma 12. *Let the algorithm converge locally at some . Then is the global optimal solution to WTM′.*

*Proof. *We prove the property by showing that, for any , is concave upward. From (10), we getfor . Note that and are two constants. Then the second partial derivative isBecause interpolates the strictly increasing function , it is clear that . We have , since is composed of straight lines. Similarly, has the same properties. Therefore, for all . The proof is complete.

##### 3.3. Near-Optimal Solution to WTM

We show how to obtain a near-optimal solution of WTM in this subsection. First, we remap the optimal solution in back to by rounding off all elements of , and a rounded solution is obtained. The following lemma shows the magnitude order of , , , and , where minimizes and minimizes .

Lemma 13. *Let be the rounded resulting solution to WTM. Then and are two bounds of withand the Euclidean distance between and is*

*Proof. *Since minimizes . On the other hand, we need to show . Note that is the optimal sequence to the discrete-case problem WTM and that it is difficult to determine. We just assume that is the optimal solution to . Since is obtained by some simple sorting rule and dedicated to the continuous-case problem WTM′, the sequence is more suitable for the discrete-case objective function, , than . Therefore, we obtain .

We show by contradiction. Suppose . On the other hand, by Lemma 8, , since . Therefore, . However, is the optimal solution to WTM′. It is a contradiction.

Since each is rounded from , it is obvious that and thus . The proof is complete.

By Lemma 13, we know that is bounded by and or , since by Lemma 8. This guarantees that the proposed algorithm will output near-optimal broadcast programs.

#### 4. Proposed Algorithm

Algorithm 1 shows the proposed algorithm GRA. In the first step, we prepare the cumulative functions and according to and , respectively. Then we also construct the dummy objective function , and we set the initial value of . All these elements of need to satisfy that (see Lemma 11). In Steps 3 and 4, we evaluate the magnitude of at and determine the steepest decent direction. If a zero gradient occurs, the algorithm will stop. In Steps 5–8, we need to find a new position whose magnitude of is smaller than the current one. Then we move a distance of towards the steepest decent direction, and is replaced with the new position (Steps 9–13). We check if any stopping criterion is met in Step 14. In Step 15, we employ to limit the total iterations; thus, the algorithm will stop anyway.