I Introduction
There has been a dramatic proliferation of research on wireless network coding. The wireless network coding can substantially reduce the number of transmissions by exploiting the broadcast nature of wireless medium, resulting in power saving. Illustrated in Fig. 1(a), two end nodes and exchange their packets, and , respectively, through a relay. The conventional communication technique (without network coding) requires four transmissions (two for each packet). Leveraging the wireless network coding, only three transmissions are required; precisely, nodes and send packets and to the relay, and the relay broadcasts the linear combination (over XOR) to both end nodes. Each end node can recover its desired packet by subtracting the packet it transmitted previously from the received packet . In general, the wireless network coding can save up to 50% of transmissions as long as the number of relays in a line network in Fig. 1(b) (as also called the reverse carpooling [16]) is large.
To benefit from the wireless network coding, a relay has to create sufficient coded packets; however, a coded packet at the relay can be created only when packets from both sides are available. Precisely, a relay in Fig. 1(b) maintains two queues and storing packets from both sides, respectively. If both queues are nonempty, then the relay can construct coded packets by combining packets from both queues. However, what should the relay do if only one queue is nonempty? Should the relay wait for coding in the future or just transmit uncoded packets from the nonempty queue? To fully realize the advantage of the wireless network coding would incur packet delays, whereas always transmitting uncoded packets to minimize the delays causes a larger number of transmissions. Therefore, a scheduling algorithm for determining when to code is crucial.
The scheduling problem for a singlerelay network as in Fig. 1(a) under stationary stochastic traffic has been investigated leveraging stochastic control techniques, like Lyapunov theory (e.g., [3]
) or Markov decision processes (e.g.,
[7]). All the prior solutions fail to generalize to nonstationary or adversarial (worstcase) traffic. In particular, they cannot be implemented at each relay distributedly in a multirelay network with provable performance guarantees. However, nonstationary or adversarial traffic has gained increasing importance in recent years. On one hand, external traffic injections at nodes or can arbitrarily generated by their sources, following no particular probabilistic assumption. On the other hand, the relay cannot expect the scheduling algorithms employed by nodes and to follow a stationary probabilistic distribution. In particular, [1] claimed that the adversarial traffic is a better traffic model. Because of those practical issues, the research on the adversarial traffic has attracted much attention in recent years (e.g., [14]). Although network coding design for adversarial channels has been an active area (e.g., [18]), little attention was given to the adversarial traffic in networkcodingenabled networks. To fill the gap, this paper aims to develop a universal scheduling algorithm for arbitrary traffic with a provable performance guarantee.Moreover, note that the skirental problem [10] is a classic problem in an adversarial setting, where for each day a skier decides either to buy a ski or to continue renting a ski without knowing the skier’s last vacation, e.g., the day when the snow melts. The skirental setting has been exploited in several works (e.g., [12]) for managing delays under some uncertainties. This paper shows that the proposed scheduling algorithm can solve generalized skirental scenarios.
Ia Contributions
Our main contribution lies in designing and analyzing scheduling for delayaware wireless network coding in adversarial traffic. The objective is to minimize a total cost, including a transmission cost and a delay cost, for each relay. To reach the goal, we show that our problem can be cast into a linear program. Leveraging
primaldual techniques [2] for the linear program, we propose a randomized online scheduling algorithm for each relay in a multirelay network. In particular, the proposed algorithm can guarantee that the worstcase ratio between the expected total cost incurred by the proposed online algorithm and that incurred by an optimal offline algorithm is (asymptotically) . In addition to the theoretical worstcase analysis, the averagecase analysis is conducted via computer simulations. Moreover, it turns out that the proposed algorithm can generalize the classic skirental algorithm to several scenarios.IB Related works
Scheduling design for networkcodingenabled networks has been extensively explored from various perspectives. Most of scheduling works (with network coding) focused on maximizing throughput (perhaps with some constraints like power consumption); for example, the works appeared in [16, 23, 17, 25, 15, 6, 4, 11, 5, 9]: while [16, 23, 17, 25] considered deterministic optimization problems, [15, 6, 4, 11, 5, 9] considered dynamic control problems. The work [15] studied singlehop networks. While [6] analyzed multihop networks with intrasession network coding, [4, 11] analyzed those with intersession network coding. The work [5] developed a dynamic network coding scheme. A distributed scheduling algorithm in networkcodingenabled networks was proposed in [9]. In addition to the throughputoptimal design, [20, 13] considered some utility optimization problems when network coding is enabled. Moreover, many works investigated delayoptimal design for singlehop networks (with random network coding), e.g., [22, 21, 19].
The most relevant works on the tradeoff between delays and power consumption (with wireless network coding) in relay networks are [3, 7]. While [3] proposed a scheduling algorithm using Lyapunov techniques, [7] showed the optimality of a thresholdtype scheduling algorithm using Markov decision processes. All those prior solutions were based on stochastic models with some stationary assumptions but cannot apply to nonstationary settings, especially in multirelay networks. In contrast, we explores the tradeoff in nonstationary settings. Our solution not only solves the delayaware coding problem in the adversarial traffic, but also generalizes the classic skirental scheduling algorithm in [2].
Ii System overview
Iia Network model
Consider a wireless line network in Fig. 1(b). The two end nodes and send and packets, respectively, to each other through shared relays. Divide time into slots and index them by . Suppose that a perfect schedule (i.e., MAC protocol) of wireless links is given, e.g., CSMA, TDMA, or FDMA (as also assumed in [16, 3, 17, 7]); therefore, during each slot, each relay can transmit some packets under a transmission constraint without any interference.
Consider a relay in Fig. 1(b) maintaining two queues and for storing packets from both sides, respectively. At the beginning of each slot , there are new packets arriving at queue and new packets arriving at queue . By we define an arrival pattern for the relay. The arrival pattern depends on the number of packets transmitted (in the previous slot) by its neighboring nodes. The arrival pattern is arbitrary, which can be nonstationary or even adversarial.
Let and be the number of packets at queues and , respectively, immediately after the packet arrivals in slot . If and , then the relay idles in slot . If and , then the relay transmits some XORcoded packets (under the transmission constraint) by combining packets from both queues. After transmitting the coded packets, if only one queue is nonempty and the relay can transmit more packets in that slot, then the relay has two options: to transmit some uncoded packets from the nonempty queue or to idle with the hope of receiving matching packets in the next slot. While always to transmit minimizes the delays, to idle provides coding for saving the number of transmissions.
Let be the relay’s decision on the number of packets (including both uncoded and coded packets) transmitted in slot . We assume that the broadcast channel from the relay to its neighboring nodes is noiseless. This simple model facilitates to explore the delays for coding in the arbitrary arrival pattern. In fact, our design can extend to adversarial ONOFF channels (see Remark 23 later). Under the noiseless assumption, the queueing dynamics is
for all and . For example, if , , and , then the relay transmits three XORcoded packets combining from queues and , and transmits one uncoded packets from queue .
A scheduling algorithm for the relay specifies decision for each slot . A scheduling algorithm is called an offline scheduling algorithm if arrival pattern is given as a prior. In contrast, a scheduling algorithm is called an online scheduling algorithm is arrival pattern (along with the numbers and of packets) is unavailable; instead, it knows the present arrivals and only, for each slot .
IiB Problem formulation
To capture the tradeoff between the delays and the number of transmissions, we define a holding cost and a transmission cost as follows. Suppose that holding a packet at the end of a slot incurs a cost of one unit. Moreover, suppose that each packet transmission takes a constant cost of units, where we assume that transmitting a coded packet incurs the same transmission cost as transmitting an uncoded packet. See Remark 5 for nonconsistent costs for transmitting coded and uncoded packets.
Given arrival pattern , we define a total cost under scheduling algorithm by
(1) 
where the first term reflects the cost of transmitting packets in slot and the other terms reflects the cost of delaying all remaining packets for one slot. Since we consider the finite numbers and , the minimum achievable total cost is finite.
We aim to develop an online scheduling algorithm such that the total cost is minimized for all possible arrival patterns . However, without knowing arrival pattern (along with the total numbers and of packets) in advance, an online scheduling algorithm is unlikely to achieve the minimum total cost (obtained by an optimal offline scheduling algorithm). We characterize our online scheduling algorithm in terms of the competitiveness against an optimal offline scheduling algorithm, defined as follows.
Definition 1.
For arrival pattern , let be the minimum total cost for all possible (offline) scheduling algorithms . Then, an online scheduling algorithm is called competitive if
for all possible arrival patterns , where is called the competitive ratio of the online scheduling algorithm .
Remark 2.
A competitive online scheduling algorithm guarantees that the resulting total cost is at most times the minimum total cost, regardless of arrival patterns . Thus, while the scheduling algorithm can be implemented at each relay in the multirelay network in a distributed way, it guarantees the competitive ratio for each relay.
We aim to design and analyze an online scheduling algorithm for minimizing the competitive ratio.
Iii Onesided adversarial traffic
We start with a fixed number of packets waiting for coding; in particular, this section focuses on the following setting:

queue has all (with ) packets initially, i.e., and for all ;

queue is injected by an arbitrary traffic with a total of packets;

the relay can transmit any number of packets in each slot.
The setting is referred to as the onesided adversarial traffic. With the first and second assumptions, we can focus on a fixed number of packets at queue waiting for coding, while capturing the key feature of the adversarial arrival pattern at queue . In fact, the first assumption is practical as well for bursty traffic at queue . Section IV will also generalize to twosided adversarial traffic. Note that, under the first assumption, the relay never delays the packets at queue for minimizing the total cost. The third assumption is made for delivering a clear insight into our innovation. Lemma 14 will analyze the maximum number of transmissions required by the proposed online scheduling algorithm; moreover, Section IVE will extend to a transmission constraint.
This paper approaches the scheduling problem by primaldual techniques [2] for a linear program. While showing that the offline scheduling problem for this setting can be solved by a linear program in Section IIIA, we propose a primaldual formulation. The primaldual formulation will be exploited later in Section IIIB for designing and analyzing our online scheduling algorithm.
Iiia Primaldual formulation
This section casts the offline scheduling problem (under the onesided adversarial traffic) into a linear program. To that end, we introduce some variables:

: the number of packets at queue transmitted without coding in slot 1.

: the number of packets at queue at the end slot of .
Given arrival pattern and scheduling algorithm , the total cost in Eq. (1) under the onesided adversarial traffic can be expressed by
where the first term is the cost of transmitting all packets at queue , the second term is the cost of transmitting uncoded packets at queue (i.e., transmitting coded packets at queue is free), and the last term is the cost incurred by holding packets at queue . By removing the constant , we have the following scheduling problem:
Problem 3.
Under the onesided adversarial traffic, develop a scheduling algorithm for the packets at queue such that the cost is minimized.
Remark 4.
Problem 3 can be linked with the classic skirental problem. We can think of each packet at queue as a skier and think of a slot when a packet arrives at queue as the time when a skier has to leave. Moreover, buying a ski takes dollars while renting a ski for a day takes one dollar. With the transformation, Problem 3 considers a group of skiers (i.e., the packets at queue ) with potentially different last vacation days (i.e., the arriving slots at queue ). Those skiers cooperatively make buying or renting decision in each slot for minimizing the buying cost plus renting cost (i.e., ).
Remark 5.
If transmitting a coded packet incurs a cost of units and transmitting an uncoded packet incurs a different cost of units with , then the total cost in Eq. (1) becomes
where the term is the extra cost for transmitting the coded packets. Then, we can replace cost in Problem 3 with . Note that . If were higher than , then transmitting a coded packet by combining two packets would not save any cost from transmitting two uncoded packets. The rest of the paper focuses on the constant cost without loss of generality.
Next, we propose the following integer program for optimally solving Problem 3 in the offline fashion:
Integer program:
(2a)  
s.t.  (2c)  
where is the total number of packets arriving at queue until slot . The constraint in Eq. (2c) is because for each slot the number of packets at queue is at least , where packets at queue are transmitted without coding in slot and at most packets at queue are transmitted with coding by slot . A solution to integer program (2) can optimally solve Problem 3 if arrival pattern is given in advance: transmitting uncoded packets in slot 1 and other packets always wait for coding.
Next, by relaxing the integrality constraint in Eq. (2c) to real numbers, we obtain the following linear program.
Linear program (primal program):
(3a)  
s.t.  (3c)  
The next lemma shows that the relaxation has no integrality gap; as such, the offline scheduling problem can be solved in polynomial time.
Proof.
See Appendix A. ∎
We refer to linear program (3) as a primal program and express its dual program as follows.
Dual program:
(4a)  
s.t.  (4c)  
The primaldual formulation will be employed for developing an online scheduling algorithm.
IiiB Primaldual algorithm
This section proposes a primaldual algorithm in Alg. 1 for obtaining a feasible solution to primal program (3) and dual program (4). The primaldual algorithm does not have arrival pattern as a prior; instead, it can obtain the present arrivals and only, for each slot . Section IIID will propose a randomized online scheduling algorithm by exploiting the solution from the primaldual algorithm. The underlying idea is that the intermediate solution for in primal program (3
) produced by the primaldual algorithm in each slot can suggest the probability of transmitting an uncoded packet in that slot. In contrast, the solution to dual program (
4) produced by the primaldual algorithm is used to analyze the primal objective value in Eq. (3a) computed by the algorithm.Alg. 1 initializes all variables (in Lines 1 and 1) at the beginning of slot 1. Obtaining the present arrivals and at the beginning of each new slot , Alg. 1 updates all variables for slot . For updating the value of , Alg. 1 introduces a set of auxiliary variables (initialized in Line 1). The underlying idea is that the value of can suggest the probability of transmitting the th (counted from the head of queue ) packet at queue without coding. Precisely, for each slot , Line 1 increases the value of for those packets potentially staying at queue :

A total of packets arrives at queue by slot , yielding at most coded packets at queue until . As such, Line 1 considers , for until , because only the th packet until the th packet might wait at queue in slot , but other packets have been transmitted with coding by slot .
The constant used in Line 1 is specified in Line 1 for satisfying the dual constraint in Eq. (4c). Then, Line 1 sets the value of to be that of , counting for all packets at queue .
Moreover, Alg. 1 introduces another set of auxiliary variables for all , and updates the value of to be that of (in Line 1) in slot for satisfying the constraint in Eq. (3c). Again, the value of is set to be that of in Line 1, counting for all packets at queue . In addition, the value of is updated to be one in Line 1 for maximizing the dual objective value in Eq. (4a) subject to the constraints in Eq. (4c).
IiiC Analysis of Alg. 1
Since the values of all variables can be updated by Alg. 1 in each slot, the following proofs use , , , , , , , , to represent the corresponding values at the beginning (before update) of slot ; use , , , , , , , , to represent the corresponding values at the end (after update) of slot . Note that , , , , , , , , is the solution produced by Alg. 1. In fact, Alg. 1 will not update any variable after slot (see Remark 9 later).
The next lemma establishes the primal feasibility of Alg. 1.
Proof.
See Appendix B. ∎
The next lemma establishes the dual feasibility of Alg. 1. For proving the lemma, we define the increment (under Alg. 1) of the value of in slot by . From [2], we can obtain that for all ; moreover, if , then for . That is, forms a geometric sequence, with the initial value of and the ratio of .
Proof.
First, the dual constraint in Eq. (4c) holds obviously according to Lines 1 and 1. Second, we will show that the value of in Eq. (4c) computed by Alg. 1 is less than or equal to . Note that Line 1 updates the value of to be one if the condition in Line 1 holds. Thus, it suffices to show that the condition in Line 1 fails at the end of slot , i.e., the value of is zero for all .
If in slot , then we can obtain
where (a) is because the sequence is the geometric sequence with the initial value of and the ratio of . Thus, the value of for all is zero since the condition in Line 1 fails. ∎
Remark 9.
Theorem 10.
Proof.
Let be the increment (under Alg. 1) of the primal objective value in Eq. (3a) in slot and let be that of the dual objective value in Eq. (4a) in slot . Appendix C establishes that
for all . Let and be the primal and dual objective values, respectively, computed by Alg. 1. Then, and ; therefore, the result follows since
where the last inequality is due to the weak duality [2]. ∎
IiiD Randomized online scheduling algorithm
Leveraging Alg. 1, this section proposes a randomized online scheduling algorithm in Alg. 2. For each slot , Alg. 2 transmits coded packets (in Line 2) by combing the packets left at queue and the new arriving packets at queue . Then, to decide whether to transmit uncoded packets for each slot, Lines 2  2 and 2 update the values of and in the same way as Alg. 1 does. In addition, Alg. 2 uses another variable (in Line 2) to record the value of at the beginning (before update in Line 2) of each slot. Let be the value of at the end of slot .
At the beginning of slot , Line 2 chooses a random number
from a continuous uniform distribution between 0 and 1. According to Lines
2  2, if there exists a such that , then the relay transmits an uncoded packet in slot . Note that, if there are multiple ’s such that , then the relay transmits multiple uncoded packets in slot , until the present value of is greater than or equal to (as in Line 2).Let () be the increment of the value of in slot . The idea behind Alg. 2 is that, with the random value of , the expected number of uncoded packets transmitted in slot is exactly .
Theorem 11.
Proof.
We show that the expected cost of transmitting uncoded packets by Alg. 2 is , which is the value of the first term in Eq. (3a) computed by Alg. 1. Moreover, we show that expected number of packets left at queue at the end of slot under Alg. 2 is less than or equal to , which is the value of the second term in Eq. (3a) computed by Alg. 1. Thus, the expected cost incurred by Alg. 2 is less than or equal to the primal objective value in Eq. (3a) computed by Alg. 1. Then, the result immediately follows from Theorem 10. See Appendix D for details. ∎
Remark 12.
Remark 13.
The next lemma investigates the maximum number of uncoded packets per slot required by Alg. 2.
Lemma 14.
Alg. 2 transmits at most three uncoded packets in each slot.
Proof.
Since is the geometric sequence with the initial value of and the ratio of for all , we have
Moreover, because of , , and (from the assumption for the onesided traffic), we have . Thus, at most three ’s such that , i.e., Alg. 2 transmits at most three uncoded packets in each slot. ∎
Iv Twosided adversarial traffic
This section relaxes the first assumption (but keeps the second and third assumptions) in the onesided adversarial traffic by allowing arbitrary traffic at both queues and , and refers to the setting as the twosided adversarial traffic. Moreover, motivated by an interesting and practical scenario where packets from an end node are delaytolerant but those from the other end node are delaysensitive (e.g., realtime traffic), we first consider the case when the packets at queue can wait for coding but those at queue have to be transmitted immediately upon arrival. This model can make us focus on the decision for a queue while capturing the key feature of the twosided adversarial traffic. Section IVD will extend our design to the general case when packets at both queues can wait for each other.
We introduce some variables similar to Section III:

: indicate if the th packet at queue is transmitted without coding upon arrival, where if the packet is transmitted without coding; otherwise;

: the number of packets at queue at the end of slot .
We have the following problem similar to Problem 3.
Problem 15.
Under the twosided adversarial traffic, develop a scheduling algorithm for the packets at queue such that the cost is minimized.
Remark 16.
Section IVA discusses ideas underlying another primaldual formulation that will be proposed by Section IVB for solving Problem 15. With the new primaldual formulation, Section IVC proposes a primaldual algorithm for solving Problem 15 in the online fashion.
Iva Ideas underlying the primaldual formulation
The next example shows that an immediate extension from linear program (3) along with Alg. 1 cannot solve Problem 15 with the competitive ratio in Theorem 10.
Example 17.
Suppose that two packets arrive at queue in slots 1 and 3, respectively, and no packet arrives at queue . Assume transmission cost . In this case, the optimal solution to Problem 15 is and , i.e., both packets at queue are optimally transmitted without coding upon arrival. In particular, the optimal solution satisfies the following linear program (similar to linear program (3)).
Linear program (primal program):
(5a)  
s.t.  (5d)  
The associated dual program can be expressed as
Dual program:
(6a)  
s.t.  (6c)  
Applying the idea behind Alg. 1, we would update and update until the dual constraint in Eq. (6c) becomes tight. Given , the constant is . In slot 1, update to be and update to bo one. In slot 2, update to be and update to be one. Because the dual constraint in Eq. (6c) becomes tight in slot 2, we cannot update any variable since slot 3; in particular, we cannot update when the second packet arrives at queue . Thus, the second packet waits forever, yielding an infinite amount of holding costs.
To tackle the issue in the above example, the next example proposes another primaldual formulation.
Example 18.
Note that an optimal solution for and in linear program (5) also satisfies the following linear program, where we use and to indicate if the first packet and second packet, respectively, stay at queue at the end of slot .
Linear program (primal program):
(7a)  
s.t.  (7d)  
While expressing variable in Eq. (5a) by in Eq. (7a), we substitute the original constraints in Eqs. (5d) and (5d) by the constraints in Eqs. (7d) and (7d). The associated dual program can be expressed as
Dual program:
(8a)  
s.t.  (8d)  
Follow the idea behind Alg. 1 as discussed in Example 17. In slot 1, update to be and update to be one. In slot 2, update to be one and update to be one. In slot 3, update to be and update to be one. In slot 4, update to be one and update to be one. The updating process can achieve the competitive ratio in Theorem 10.
The above example implies that the idea of Alg. 1 can solve Problem 15 with the same competitive ratio, if we can formulate a linear program with constraints for each individual packet (like Eqs. (7d) and (7d)) instead of those for all arriving packets (like Eqs. (5d) and (5d)). In this context, we introduce additional variables: let indicate if the th packet stays at queue at the end slot , where if it does and otherwise. For each slot , the value of is either zero or one, where implies that the th packet at queue is transmitted with coding by slot and implies that the packet is either transmitted without coding by slot or stays at queue at the end of slot . By the next example, we emphasize that the constraints should be carefully considered.
Example 19.
Suppose that two packets arrive at queue in slots 1 and 2, respectively, and one packet arrives at queue in slot 3. Assume transmission cost . In this case, the optimal solution to Problem 15 is and . Next, given the optimal decision for the packet at queue (i.e., optimally transmitted with coding), we consider constraints for each packet at queue as follows:

Slot : A packet arrives at queue in slot . Thus, we can obtain .

Slot : The other packet arrives at queue in slot . Thus, we can obtain and .

Slot : A packet arrives at queue . Since we are given that the packet at queue optimally codes with a packet at queue , two options are following: (1) , , i.e., the first packet at queue is transmitted with coding, and the second packet either is transmitted without coding or waits in slot ; (2) , .

Slot : No packet arrives at both queues. Thus, if and , then , ; otherwise, and .
We calculate the minimum value of subject to the two possible constraints, i.e., forming two different linear programs:

Consider the constraints of for , and for : The optimal solution is and , while the minimum objective value is .

Consider the constraints of for , and : The optimal solution is and , while the minimum objective value is .
Thus, only the second set of constraints is correct. The idea underlying the correct set of constraints is that the first packet waits for a longer time (for coding) than the second packet does.
Let be the set of indices such that the value of in slot is specified to be greater than or equal to one. Let . Our goal is to identify a correct set of constraints such that the solution to minimize the cost (in Problem 15) subject to the set is an optimal solution to Problem 15. Example 19 suggests that, when a packet arrives at queue in slot , a correct set of constraints in slot can be obtained by removing the most recent packet in set of the previous slot. The argument will be confirmed in the next section.
IvB Primaldual formulation
With the idea developed in Example 19, we propose an algorithm in Alg. 3 for identifying a correct set of constraints. Line 3 initiates set in slot to be set of the previous slot. When a packet arrives at queue in slot , Line 3 adds the corresponding index to set . Line 3 introduces a variable to indicate the available packets at queue for coding; precisely, Line 3 sets the value of variable to be the present arrivals at queue . Since Line 3, if (i.e., there is a packet at queue ) and (i.e., there is a packet at queue ), then Line 3 removes index (i.e., the most recent packet in set as in Line 3) from set and Line 3 removes one packet from queue .
We formulate a linear program subject to the set produced by Alg. 3 as follows.
Linear program (primal program):
(9a)  
s.t.  (9b) 
Proof.
See Appendix E. ∎
The dual program of primal program (9) is following.
Dual program:
(10a)  
s.t.  (10c)  
IvC Primaldual algorithm
Note that Alg. 3 can learn a correct set of constraints for each slot in the online fashion. Leveraging the online feature, we develop a primaldual algorithm in Alg. 4 for solving Problem 15 in the online fashion. For each slot , Alg. 4 updates those ’s in the set in Lines 4  4. The updating process is similar to that in Alg. 1.
Using the same arguments as those in the proofs of Lemmas 7 and 8, the next lemma establishes the feasibility of the solution produced by Alg. 4.
Similar to Theorem 10, the next theorem shows that Alg. 4 can achieve the same competitive ratio as Alg. 1 does.
Theorem 22.
Proof.
See Appendix F. ∎
Then, similar to Alg. 2, we can transform the solution produced by Alg. 4 to a randomized online scheduling algorithm for managing the delayaward coding decision at queue . In particular, the scheduling algorithm can also achieve the same expected competitive ratio as that in Theorem 11, approaching when cost is large enough.
IvD Scheduling both queues
This section extends Alg. 4 to the case when both queues and can wait for each other. In this context, we propose a waitingcoding queueing system consisting of a waiting queue and a coding queue at the relay. While queue stores those packets that can wait for coding, queue stores those packets that can find coding pairs at the waiting queue immediately upon arrival.
Precisely, let and be the number of packets at queue and queue , respectively, at the end of slot . If the packets at queue belong to queue , then the (i.e., the number of packets arriving at the original queue ) new arriving packets enter queue at the beginning of slot ， and

if , then the new arriving packets enter queue at the beginning of slot ;

if , then only out of the new arriving packets enter queue at the beginning of slot , but the remaining packets enter queue at the beginning of slot .
In contrast, if the packets at queue belong to queue , then the waitingcoding queueing system operates in the opposite way. In other words, while packets entering queue are transmitted (with coding) immediately upon arrival, packets entering queue need scheduling decisions. With the transformation, the waitingcoding queueing system becomes the previously discussed queueing model where only packets at queue can wait for coding. Thus, the randomized online scheduling algorithm associated with Alg. 4 can apply to the waitingcoding queueing system with the expected competitive ratio in Theorem 11. Furthermore, Section V will demonstrate the superiority of the proposed scheduling algorithm and the proposed waitingcoding queueing system via computer simulations.
Comments
There are no comments yet.