• No results found

Chapter 3 Maximizing Rewards in Wireless Networks with Energy

3.3 Time-Efficient Approximation

Although the above three pruning conditions are effective in removing unpromis- ing states, the state space in Algorithm 1 can still expand significantly and it will be computationally expensive to get the optimal solution with a large number of receivers, data sizes, and transmission rates. In practice, it is not always necessary to find the optimal solution with limited time and computation resources. A near- optimal solution is more desirable if it can be completed in reasonable time while consuming reasonable computation resources.

In this section, we will first propose a polynomial-time heuristic approach. Then we will analyze the complexity of this algorithm.

3.3.1

Polynomial-time Approximated Approach (Clustering)

We develop a heuristic algorithm, named Clustering algorithm, to approximate the optimal solution to the proposed problem with a polynomial computational time complexity. This Clustering algorithm is novel for the proposed problem. The general idea of this algorithm can be traced back to data clustering in mathematics.

This Clustering algorithm is based on a clustering property of the final states after we enumerate all the tasks. Fig. 3.5 shows the result if we plot the all of the final states for Table 3.1 after enumerating all possible combination of data sizes and transmission rates into a 3-D space with the coordinates of (reward, energy, time). We can find the nodes, representing the final states, are clustered instead of randomly scattering. This is attributed to the discrete levels of data sizes and transmission rates. Those nodes in the same cluster tend to have close reward values, energy consumption, and transmission time. We have similar observations about the intermediate results after each enumeration.

During each enumeration, if we start from one cluster, the best solution generated from this cluster will have close reward values. If one node in this cluster can generate the optimal solution, the others in the same cluster can produce near-optimal solutions as well. Keep only one node in each cluster and remove the others, we can still get the near-optimal solution though the optimal solution might be removed. If none of the nodes in this cluster can lead to the optimal solution, there would be no impact on the final solution if we keep one and remove the others. The benefit of this method is that it can reduce the state space significantly.

We create clusters of nodes by dividing the reward value axis and energy axis evenly to mbins and nbins number of ranges, respectively. Thus we construct mbins× nbins rectangle prisms (clusters) in a 3-D space. In Fig. 3.5, cluster B represents one

3 4 5 6 7 8 9 2 4 6 8 10 12 14 0 5 10 15 20 25 R ew a rd Tim e Energy cluster A cluster B

Figure 3.5: The reward-time-energy relationship in a 3-D space.

of the clusters. Suppose the maximal and minimal sums of energy consumption for all tasks are Emax and Emin, respectively. We set the length of the bottom of the cluster to be e = (Emax− Emin)/nbins. Similarly, we set the width of the bottom of the rectangle prism (cluster) to be r = (Rmax− Rmin)/mbins, where Rmax and Rmin are the maximal and minimal sums of reward values for all tasks, respectively. The scaled reward of task i under data size j, transmission rate k, and reward group size r is rounded to the next integer, i.e., d

rijk

r e, which represents the scaled reward

value in each cluster. In the same way, we can get the rounded scaled energy value, deijk

e e, which represents energy values in each cluster. We introduce d

rijk

r e and d

eijk

e e

into the 3-tuple representing a state in Algorithm 1 to construct a 5-tuple state used in Algorithm 2.

When enumerating a task, we generate all states for one task with pruning condi- tions. the Clustering approach divides all the states into buckets, which represent the clusters, and keep one node for each bucket, as shown in Algorithm 2. In Algorithm 2,

the strategy in determining which node should be kept in each cluster depends on the factor of transmission time. While the nodes in the same cluster have close rewards and energy consumption, we always want to keep the one with the smallest trans- mission time in order to save time for the remaining tasks. Besides this strategy, we have other criteria to decide which node should be reserved in each cluster. Different metrics, such as energy, reward, and energy-delay product, can be employed. We conduct simulations to compare the impact of performance when employing different strategies for selecting representative node in the following evaluation part. Accord- ing to the evaluation results, we choose time as the only metric for this selection since it can lead to the best approximation.

Clearly, if the intermediate states themselves can cluster well, it will lead to small number of non-empty clusters after each enumeration so that the state space can be reduced more thus the execution time can be shortened. Even in the worst case, as a result of rounding up and keeping one node per cluster, the number of states can also be reduced greatly so are the running time and required space to solve the scaled problem compared with the optimal approach. The number of nodes at each enumeration is bounded by the largest number of clusters, which is equal to mbins × nbins.

3.3.2

Algorithm Analysis

For given numbers of ranges for energy and reward, we have the upper bound for the number of states in each iteration by U = nbins × mbins. In Algorithm 1, the running time for adding task i is O(|L0i|2) because we compare each pair of elements in the list to eliminate the dominated states. Here, we don’t have this step. So the running time for adding task i is O(|L0i| log(|L0

an upper bound of the running time is O(N U log U ), where U denotes the upper bound of states in L0i. Replace U by nbins × mbins, we get the time complexity of O(N (nbins × mbins) log(nbins × mbins)). Since the values of nbins and mbins are initialized according to the problem size (see evaluation part) which is determined by a polynomial function with variables of task set size, data size levels and rate levels, the total running time cost is polynomial in the size of task set, data size set and rate set. Similar to Algorithm 1, the space cost is in order of O(U ), which is O(nbins × mbins), as well.