{'fraction_non_alphanumeric': 0.029676199323203502, 'fraction_numerical': 0.006552319023289762, 'mean_word_length': 4.51555352241537, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Dynamic Rate Adaptation for Improved Throughput and Delay in Wireless Network Coded Broadcast

In this paper we provide theoretical and simulation-based study of the delivery delay performance of a number of existing throughput optimal coding schemes and use the results to design a new dynamic rate adaptation scheme that achieves improved overall throughput-delay performance. Under a baseline rate control scheme, the receivers' delay performance is examined. Based on their Markov states, the knowledge difference between the sender and receiver, three distinct methods for packet delivery are identified: zero state, leader state and coefficient-based delivery. We provide analyses of each of these and show that, in many cases, zero state delivery alone presents a tractable approximation of the expected packet delivery behaviour. Interestingly, while coefficient-based delivery has so far been treated as a secondary effect in the literature, we find that the choice of coefficients is extremely important in determining the delay, and a well chosen encoding scheme can, in fact, contribute a significant improvement to the delivery delay. Based on our delivery delay model, we develop a dynamic rate adaptation scheme which uses performance prediction models to determine the sender transmission rate. Surprisingly, taking this approach leads us to the simple conclusion that the sender should regulate its addition rate based on the total number of undelivered packets stored at the receivers. We show that despite its simplicity, our proposed dynamic rate adaptation scheme results in noticeably improved throughput-delay performance over existing schemes in the literature.


I. INTRODUCTION
In recent times there have been many advances in the capabilities of wireless communication. Video broadcast streaming is just one of many applications expected to grow in the future. Providing high quality service is a difficult task because there are stringent requirements in terms of delay, bandwidth and packet ordering. The challenge is therefore finding ways to utilise available resources to effectively meet these requirements [1].
In this context there are two key measures of performance. High bandwidth efficiency is essential for the transmission of higher quality videos. A measure of bandwidth efficiency is the throughput: the average number of packets successfully delivered to a receiver per unit time. But since the packets of a video can only be viewed in order, we can only consider a packet useful once it has been delivered, that is if it and all preceding packets have also been correctly received. Low delay is also desirable to avoid pauses in the video as it is being played. Therefore, it is important to minimise the delivery delay, the time between when a sender first transmits a packet to the time it is delivered to a receiver.
A. Fu and P. Sadeghi  Meeting these requirements in a wireless setting is not an easy task [1]. Receivers' independent channel conditions mean that they will experience very different erasure patterns, which in turn leads to a variety of demands on the sender.

A. Network coding
Linear network coding [1]- [3] is an effective way to accommodate multiple receivers' needs while still efficiently utilising the transmission bandwidth. Under network coding the sender divides the video into equal sized packets, and combines a number of packets into each transmission using Galois field arithmetic [3]. This combination is broadcast to the receivers along with the coding coefficients used. In order to recover the original packets, receivers must collect enough packets to decode them using Gauss-Jordan elimination.
Coding coefficient selection methods can be broadly classified as either deterministic or random. Under deterministic algorithms there is a fixed procedure for determining what coefficients should be selected. Examples include [3]- [12]. By contrast, under random network coding coefficients are chosen at random, which in [13] is shown to achieve the capacity of a multicast network with probability approaching one as the size of the field becomes large. The simplicity of implementation has led to a great deal of work including [14]- [21].
Although network coding allows efficient bandwidth utilisation, the time spent waiting to receive the necessary packet combinations for decoding results in an additional decoding delay. This lower bounds the achievable delivery delay since packets can only be delivered after being decoded.

B. Methods for delay control
Generally the decoding delay incurred by network coded systems can be reduced in two ways: by limiting transmissions to a coding window and by deterministic selection of the transmitted packet combinations.
1) Coding windows: The simplest way to reduce the decoding delay is to restrict transmitted packet combinations to packets from a predetermined coding window. The idea behind this is that the smaller the coding window, the less time it will take for all packets in that window to be received and decoded. The downside, however, is that the coding window also limits the number of new packets that can be sent, which restricts the transmission rate.
Most commonly, packets are introduced in blocks [17], [18], [22], [23] or generations [19], [24]. Here the coding window is restricted to a particular block of packets, which must all be transmitted before the coding window can move on to the arXiv:1208.3806v1 [cs.IT] 19 Aug 2012 next block. This is particularly common in random network coded systems, since this is the only way to restrict the delay. The advantage of block coding is that we can guarantee the decoding of all packets in the block by the time a block's worth of innovative information is received. However the disadvantage, especially with large block sizes, is that it is also very unlikely that packets can be decoded until before the entire block is transmitted. Work including [15] highlight the effect of block size on both delay and throughput.
To obtain good delay performance while minimising negative effects on the throughput, feedback can be used to determine the most appropriate block size [22], [24]. The most appropriate block size is largely determined by the quality of feedback. In general, frequent, low delay feedback allows for finer granularity of block size control, whereas delayed or infrequent feedback must be compensated for by larger block sizes [16], [23].
However it is not always necessary to restrict the coding window to a static block. A few variants of rate control emerge for full feedback systems, where the sender is updated on the success of every packet transmission. Using feedback information it is possible to adapt the size of the coding window based on the information about receivers' progress.
In [10], [11] a Bernoulli process governs the rate at which new packets are added to the coding window. The coding window grows as packets are added, but shrinks as packets are decoded. When a receiver has received the coding window size worth of innovative information, all packets in the coding window can be decoded. Therefore the coding window size and the delay performance depend on both the rate at which packets arrive and the receivers' progress. This decoding behaviour is not yet well understood, and so far only asymptotic bounds on the resulting delay have been conjectured [10], [11].
In an attempt to move away from the rate restrictions of [10] and [11], [12] proposes a scheme that alternates between throughput optimality and instantaneous decodability, where the time spent in each mode is determined by the receivers' delay performance. The corresponding effect on the coding window size is that it is allowed to grow without limitation in the first mode, but remains static in the second mode. The question then is: is there a more systematic way to select the coding window size?
2) Packet combination selection: A second form of delay minimisation is careful selection of the packet combinations transmitted. This is possible in full feedback systems, where exact knowledge of the contents of receivers' buffers allows the sender to select combinations that increase the likelihood of receivers decoding early.
Examples of these schemes include instantaneously decodable network coding schemes [6]- [9], where combinations are selected to guarantee immediate decoding to a carefullychosen subset of receivers. These rigidly guarantee low delays, but often at the sacrifice of throughput. More flexible schemes include those based on the the 'first unseen' packet principle [10]- [12]. These set no hard limitations on the delay, but rather attempt to improve the probability of early decoding. The mechanism of this is not yet well understood, and due to its extremely intractable nature, no analysis of this has been attempted so far in the literature. However, as we will show, by making some approximations we can gain insights into its behaviour.

C. Throughput delay tradeoffs
This tradeoff between improved throughput and increased decoding delay is a well known performance feature of network coding [12], [20], [25], [26]. In general the higher the throughput the higher the delivery delay, since at higher throughput receivers are presented with less opportunities to decode. The throughput delay tradeoff is well known, and much work [6], [7], [10]- [12], [22], [23] has been done exploring the problem of obtaining good performance given these limitations. The general approach so far has been to bound one of these parameters, then focus on improving the performance of the other. Therefore we can categorise approaches to improving the throughput delay tradeoff as follows.
On one hand we have what we will call delay limited schemes, where an upper bound is placed on the permissible delay and throughput is maximised under this constraint. These can further be categorised according to the type of delay constraint. Instantaneously decodable schemes such as [6], [7] are one example of this. Coding coefficients are selected to guarantee the immediate decodability of any new information, however this comes at the cost of lower throughput since it is often impossible to find a combination which will provide innovative information to all receivers. Hard deadline schemes also exist [22], [26], where packets must be decoded by a particular deadline, or are otherwise lost.
By contrast throughput optimal schemes such as [10], [11] work with a predetermined throughput rate, then attempt to achieve good delay performance. In [12] the rate matches that of the fastest receiver, but is offset by periods in which uncoded packets sent to reduce decoding delay. While these approaches guarantee new information for all receivers within the rate limitations, this can potentially lead to long decoding delays.
So far there has been little work on the middle ground, where a scheme is neither strictly throughput nor delay constrained. It might be asked then: is it possible to design a transmission scheme that can weigh throughput against delay, and make decisions that will simultaneously result in better throughput and delay performance?

D. Contributions
In this paper we take a first step in realising a dynamic tradeoff between delay and throughput in a wireless broadcast system. By first understanding the mechanism by which packets are delivered in Bernoulli arrival schemes such as [10], [11], we gain insight into the nature of the throughput delay tradeoff. This in itself is a difficult problem, due to the complex interactions between the sender and receivers. To manage this, we categorise the methods of delivery into three categories: zero state, leader state and coefficient-based decoding. These distinctions are made on the basis of receivers' Markov states: defined as the difference in knowledge space between sender and receiver at each time step. By decoupling the contributions of each method of delivery, we can present an approximation that removes the effect of cross receiver interactions. In return for some loss of accuracy, we are able to transform a mathematically intractable problem into one that gives easilycalculable results.
Based on our understanding of the mechanics of broadcast packet delivery, we propose a new transmission scheme which uses receiver feedback information to determine not only what packets should be transmitted, but also what transmission rate is most appropriate given the receivers' immediate progress. Estimates of the sender and receivers' rates are utilised to estimate future behaviour. This, in conjunction with complete knowledge of the receivers' immediate progress, allows the sender to dynamically tailor the transmission rate for greatly improved performance compared with throughput optimal schemes such as [10], [11]. A related idea is considered in [22], where the coding window size is chosen to maximise the number of packets delivered to all receivers by a hard deadline. However, these restrictions are generally not conducive to good throughput, nor do they take into account the possibility of early decoding.

II. SYSTEM MODEL
Our system model is essentially the same as that in [10], [11]. A single sender aims to transmit the packets p 1 , p 2 , ... in the correct order to a set of R receivers. The sender can broadcast at the rate of at most one packet per time slot, using network coding to combine packets for transmission (see Section II-A for more details). The receivers are connected to the sender via independent erasure channels, and successfully receive these transmissions with probability µ at each time slot. 1 Receivers store received transmissions in a buffer and send an acknowledgement after each successful reception, which we assume the sender detects without error 2 . The sender uses this information to record which packets receivers have stored in their buffers.
At each time slot t, the sender uses network coding to combine the packets for transmission. The packets p 1 , p 2 , ... are multiplied by coefficents α 1 (t), α 2 (t), ... chosen from the finite Galois field F M , then summed together. This combination is transmitted along with the corresponding vector of coefficients v s (t). If each uncoded packet p i corresponds to the standard basis vector e i whose i-th entry is 1, then so that the i-th entry α i (t) corresponds to the coefficient of p i . Receivers use knowledge of the coding coefficients to recover the original packets by performing Gauss-Jordan elimination [3] on the packets in their buffers. The transmitted network coded combinations are determined by two factors: the rate of packet arrivals and a decision process based on what packets the receivers have stored in their buffers. In the remainder of this section we outline the methods by which the transmitted combination is determined.

A. Arrivals
The sender restricts transmitted packet combinations to a coding window consisting of packets which have arrived in the sender queue. At each time slot t a new packet may be added to the coding window. This is called an arrival, and a(t) = 1 if a new packet is added, otherwise a(t) = 0. Once a packet has arrived, it is available to be coded in all future transmissions. If the total number of arrivals is given by then the sender is only permitted to code packets from the set p 1 , ..., p A(t) . The transmitted combination c(t) is therefore of the form where the coefficients α i (t) are chosen at each time slot from the field F M of an appropriate size. Schemes [10], [11] prove that it is always possible to find an innovative combination for all receivers if M ≥ R, the number of receivers. Initially, we analyse a scheme where arrivals are determined by a Bernoulli process where Pr(a(t) = 1) = λ independently at each time slot t. By assuming the load factor ρ = λ/µ is appreciably less than 1, we can provide more practical nonasymptotic analysis. Later when we expand into dynamic rate control, the arrival pattern a(t) will be determined by receiver feedback and predictive measures of throughput and decoding performance.

B. Coefficient selection
Now that the maximum size A(t) of the coding window has been established, we must choose the coding coefficients to be used at each time slot. Work up to Section VII considers schemes that maintain the innovation guarantee property, in other words all receivers who are missing packets inside the coding window are guaranteed to receive innovative information from the sender. At each time slot the sender selects coding coefficients according to one of the following algorithms.
To highlight the effects of coefficient selection on delay, we will focus on two existing schemes, the drop-when-seen transmission scheme of [10], [27] and the asymptotically optimal delivery scheme of [11], which we call schemes A and B respectively. As a means of comparison, we also consider a baseline coding scheme, which is essentially random network coding conditioned on the innovation guarantee property. The method for selecting coding coefficients in each scheme is summarised below: more details can be found in [10], [11]. Scheme A Scheme A relies on the concept of seen packets. A packet p i is seen by a receiver if it can use the packets in its buffer to create a combination of the form p i +f (p >i ), where f (p >i ) is some linear combination of the vectors p i+1 , p i+2 , .... If this is not possible, then p i is unseen.
Scheme A ensures that with each successful reception, a receiver sees their next unseen packet. To determine what packet to send next, the sender lists the oldest unseen packet from each receiver. Moving from oldest to newest unseen packet, it adds an appropriate multiple of each packet such that it is innovative to all the corresponding receivers. Scheme B Under scheme B, the sender transmits a minimal combination based on the oldest undecoded packet of each receiver. The sender lists these oldest undecoded packets and their corresponding receivers, then beginning with the newest packet in the list, it adds in older packets only if the receiver(s) that correspond to them would not otherwise receive innovative information.

Baseline scheme
The sender transmits a random combination of all A(t) packets in its current coding window. Coding coefficients are selected randomly from F M . For a fair comparison, feedback is used to ensure that the final packet satisfies the innovation guarantee property. If the current set of coefficients do not have this property, new random coefficients are chosen until an appropriate combination is found.
It should be noted that, unlike the baseline scheme which codes all packets in the coding window, under schemes A and B the sender will never code a packet p i until at least one of the receivers has decoded all {p 1 , ..., p i−1 }. This is the case because schemes A and B only code the oldest unseen or undecoded packet of each user. As a result, the sender codes packets from an effective coding window whose size is limited by the receiver with the most packets in their buffer.

III. MARKOV STATE
Our analysis of the delay and throughput performance of the coding schemes outlined above will be based on the receivers' Markov states, a concept we will explain next. This allows us to categorise decoding methods and gives us an important tool for estimation of the delivery delay. We will define the Markov state of a receiver using the concept of virtual queue, and elaborate on how it can be used to categorise and analyse decoding behaviour.

A. Knowledge space and virtual queue
The Markov state forms the basis for our decoding analysis. It is based on the concept of virtual queue length which in [27] was defined as the number of packets a receiver lags behind the sender.
More formally, at time t the sender queue list is defined as the set of vectors V s (t) = {e 1 , e 2 , ..., e A(t) } corresponding to the uncoded packets p 1 , p 2 , ..., p A(t) which have arrived State transition Probability Shorthand notation so far. The sender chooses packets for transmission from its knowledge space which is the set of all linear combinations the sender can compute. The size of the knowledge space is given by where M is the field size and the notation |X| represents the size of the set X. Innovative coded packets received by a receiver r correspond to a set of vectors V r (t) which we call the reception list of receiver r. Likewise the knowledge space of the receiver is then given by K r (t) = span(V r (t)). The virtual queue length of a receiver can now be defined as which in this paper will be referred to as the Markov state, for reasons explained next.

B. The Markov chain model
If the sender arrival rate is determined by a Bernoulli process of rate λ, then changes to a receiver's virtual queue length over time can be modeled as a traversal through a Markov chain. This is illustrated in Fig. 1, where the states 0, 1, 2, ... correspond to the values of s r (t). For this reason we will refer to the virtual queue length s r (t) as the Markov state of a receiver r at time t. Whether s r (t) increases, decreases or remains the same between time slots depends on both the arrival state at the sender a(t) and the receiver's channel conditions. The allowable state transitions for states greater than zero and their probabilities are listed in Table  I. Note that although the Markov chain model is perfectly accurate for any receiver considered on its own, the fact that the sender is shared means that receivers' Markov states can exhibit a significant amount of correlation with one another. Nevertheless this model still provides valuable insight into the delivery delay characteristics of the transmission schemes we will study.
Using the concept of Markov state we can categorise the ways in which the next packet can be delivered to a receiver as follows.
1) Reach the zero state A receiver r is in the zero state when its Markov state s r (t) = 0. At this point, the number of coded packets stored at the receiver equals the number of unknown packets in the current coding window. Since schemes A, B and baseline all satisfy the innovation guarantee property, any time that s r (t) = 0, all packets stored by the receiver are decoded.

2) Receive while a leader
Under schemes A and B, a receiver r is called a leader if it has Markov state, i.e. s r (t) = min {s i (t)}. Since the effective window size is limited to this receiver with most packets in their buffer, receiving while a leader results in the decoding of all stored packets [27].

3) Coefficient-based decoding
Under all three schemes, even when a receiver is not leading or in the zero state, it is possible that the transmitted coded packet, combined with the combinations already stored in their buffer, allows a receiver to decode its next needed packet. Coefficient-based decoding accounts for any packets delivered at times the receiver is not either leading or in the zero state. In this case, some fraction of the stored packets are delivered. 1) Distribution of Markov states: Since the Markov state will form the basis of our analysis, the first step is to find the probability S r (k) that at a randomly selected time, the receiver r is in state k. This is equivalent to finding the stationary distribution of the Markov chain corresponding to that receiver. For the Markov chain of Fig. 1, if the arrival rate λ is less than the receiver channel rate µ, a stationary distribution exists such that pS r (k) = qS r (k + 1).
Solving for ∞ k=0 S r (k) = 1, we obtain In the following Sections IV and V we will analyse the effect of Markov state on the receivers' delivery delay.

IV. CODING WINDOW DELAY ANALYSIS
In this section we study the impact of the coding window size on the receivers' delivery delay. We simplify this problem by dividing packet delivery mechanisms into zero state decoding, where packets are delivered only when all packets in the coding window are obtained, and leader state decoding, where packet delivery occurs when all packets in the effective coding window are received. By making this distinction we are able to provide insight into the decoding behaviour of these throughput optimal schemes that has so far been missing from the literature. Taking zero state decoding as a first approximation for our delay analysis, we use the Markov chain model to find the distribution of zero state decoding cycles, and accurately approximate the expected zero state delivery delay. Where leader state decoding has proven an intractable complication in previous analysis, we show that bounds can be found on the probability of leader state decoding, and furthermore under most circumstances it contributes only a marginal improvement to the decoding delay.

A. Zero state decoding
Here we will calculate the zero state decoding delay as an upper bound on the delivery delay of the three transmission schemes A, B and baseline. It is important to observe that as long as the innovation guarantee property holds, the Markov state of a receiver depends only on its reception rate and that of the sender. It is not affected by the coding scheme, the presence of other receivers, or even the quality of feedback. This independence makes zero state decoding analysis a valuable tool, since it allows us to make initial performance estimates without the intractable complications that have hindered the study of these transmission schemes to date.
To find the zero state decoding delay, it is not sufficient to know the proportion of time a receiver spends in the zero state, calculated in (8). The average delay largely depends on the distribution of times between returns to the zero state, which we call decoding cycles. Therefore, we will use random walk analysis to calculate the distribution of decoding cycle lengths, and based on this work, find an accurate approximation for the zero state decoding delay of Bernoulli arrival systems.
1) Decoding cycle distributions: A receiver starting in Markov state 0 experiences a decoding cycle of length T if its first return to the zero state in the Markov chain occurs after exactly T time slots. We calculate P 0,0 (T ), the probability that a decoding cycle will be of length T .
We can solve this problem in two steps. First, we characterise a path through the Markov chain that consists of only moving steps where s r (t + 1) = s r (t) ± 1. Then we factor in the effect of pause steps, where s r (t + 1) = s r (t).
In the first time step there are two possibilities. The receiver can remain at 0 with probability 1 − p, which gives us P 0,0 (1) = 1−p. If it instead moves up to state 1, it must return to 0 in T > 1 time steps. For a path of fixed length T to start at and return to 0, it must consist of 2k moving steps, k up and k down, and T −2k pause steps, where 1 ≤ k ≤ T /2 . If no other encounters with the zero state are permitted, the first and last time steps must be up and down steps respectively. Therefore the number of paths that first return to the 0 state in exactly 2k steps without pauses is given by the (k − 1)-th Catalan number [28] Now we factor in the T − 2k pauses. These pauses cannot occur in the first or last time step, otherwise the decoding cycle length would not be T . For a given path of 2k moving steps, there are T −2 2k−2 choices for pause locations. Therefore the probability of taking exactly T > 1 timeslots to return to the origin is given by The cumulative decoding cycle length probabilities are given for a number of arrival and reception rates, λ and µ, in Fig. 2. The greater the load factor ρ, the more slowly the probability converges to 1 and the larger the average delay.
2) Delay approximations: Using what we know from (10) about the distribution of decoding cycle lengths, we can estimate a receiver's average zero state decoding delay. Here this is defined as the average time between when a packet arrives at the sender to when it is decoded by the next return to zero. For a decoding cycle of length T we estimate the average number of packets arriving as well as the expected delay incurred. Based on this we give an overall estimate of the decoding delay.
Where the coding cycle is of length T = 1, the probability that one packet arrives and is immediately decoded is simply λµ. This incurs no decoding delay.
In Section IV-A1 we established that, for all other coding cycles with length T ≥ 2, the Markov state must increase in the first time slot, and decrease in the last time slot. Therefore, a packet must arrive in the first time slot, but cannot arrive in the last time slot. We now make the assumption that in the remaining T − 2 time slots packets arrive uniformly with probability λ. The average delay for these packets is then T /2. Using this approximation we can now calculate an estimate of the average zero state delivery delay.
The average number of packets delivered over a decoding cycle of length T is estimated to be while the delay incurred by these packets is Therefore the average delay, including the T = 1 decoding cycle, is given by In Fig. 3 we show how our calculated estimate, truncated at T = 1000, matches well with the average delivery delays obtained from simulation.

B. Leader state decoding
In this section we investigate the amount of time receivers spend leading from a nonzero state and its impact on the delivery delay, compared with zero state decoding on its own. Based on the Markov state distributions calculated in III-B1, we bound the average time that the leader(s) spend in each Markov state. Using simulations we observe the effect of leader state decoding on the delivery delay.
1) Leader state distribution: By (8) the probability of a receiver r being in a state ≥ k is   Were receivers' Markov states independent, the probability of having a leader in state k would be However, since the sender is common to all receivers, there is a noticeable amount of correlation between receivers' Markov states. This is illustrated in Fig. 4, which compares the joint Markov state transition probabilities for two receivers under each model. In practice the correlated transition probabilities result in the receivers being more closely grouped together than predicted by the independent receiver model. Fig. 5 shows that the probability of leading from states k > 0 is higher in practice than under the independent receiver model in (15). The probability of the leader being in state k is bounded between the values in the single receiver case and the independent receiver model. Therefore, although the independent receiver model is not entirely accurate, it can still be used to make some general observations about the leader state probabilities. (1-p-q)q pq q(1-p-q) (1-p-q)p p 2 Fig. 4. Two-receiver state transition probabilities (a) in practice, and (b) under the independent receiver model. The horizontal and vertical axes correspond to the Markov states of receivers 1 and 2 respectively, where s 1 (t) = i and s 2 (t) = j. Since the sender is common to both receivers, it is not possible that s 1 (t + 1) = i ± 1 while s 2 (t + 1) = j ∓ 1.  1) The probability that a receiver r is leading is ≥ 1/R, since at least one receiver must lead at each time slot. 2) Most of the time the leader will be in state k = 0. The larger R, the more likely this is the case.
3) The higher a receiver's state k, the lower its likelihood of leading. 4) By (8) and (15) as the load factor ρ → 1 − , or equivalently λ → µ − , the state probability distribution S r (≥ k) converges on 1 more slowly. This increases the probability that the leader will be in a higher state, and therefore the impact leader state decoding has on delay. We can observe some of these effects in Fig. 6, which illustrates the impact of the number of receivers R on the leader state decoding delay. R = 1 represents the extreme case where the receiver is always leading, and so results in extremely low delivery delays. As R increases, however, the delay performance quickly approaches that of zero state decoding. Even at moderate values of R, for example R = 10, the contribution of leader state decoding is negligibly small. Under imperfect feedback conditions this contribution would be even smaller, since it is unknown exactly how many of the packets the leader has received. In order to maintain the innovation guarantee property, the sender would potentially need to overestimate the leader's rate, reducing the effect of leader state decoding. As the load factor increases, however, so does the contribution from leader state decoding, consistent with observation 4.

V. COEFFICIENT-BASED DECODING
Coefficient-based decoding accounts for the remaining packets decoded while the effective coding window is incomplete. The impact of coefficient-based decoding is not well understood because of the difficulty of analysing its effects. In the literature it is generally speculated to contribute a small, if not negligible, improvement on the delivey delay. However through simulation we demonstrate two important principles for improving the likelihood of coefficient-based decoding: minimising the coding field size, and maintaining sparse codes. When these conditions are met, coefficient-based decoding can reduce the packet delivery delay significantly.
Say that at time t the sender transmits a coded packet with coefficients v s (t). Then the next needed packet will be decoded only if the following condition holds.
Lemma 1: At time t, a receiver can decode the next needed packet p n iff it receives a transmission v s (t) ∈ span(K r (t − 1) ∪ e n ) \ K r (t − 1).
Proof: A packet p k is decoded iff e k ∈ K r (t). Say that e n / ∈ K r (t − 1). Then for p n to be decoded at time t, e n ∈ span(K r (t − 1) ∪ v s (t)). To satisfy the innovation guarantee property, v s (t) / ∈ K r (t − 1). Therefore to decode packet p n at time t, v s (t) ∈ span(K r (t − 1) ∪ e n ) \ K r (t − 1).
As we will show, the probability of coefficient-based decoding depends on both the transmission scheme used and the effective Markov state, which we now define.

A. Effective Markov state
The effective sender queue V * s (t) is defined as the set of vectors corresponding to all packets the sender has transmitted in time slots 1 to t. In the baseline scheme, typically V * s (t) = V s (t) unless all coefficients selected for the newest packet happen to be 0. In contrast, under schemes A and B the leader is restricted to an effective window. Therefore, if the effective arrival rate is given by then V * s (t) = {e 1 , e 2 ..., e |A * (t)| }, and similar to (4), the effective knowledge space is K * s (t) = span(V * s (t)). The effective Markov state of a receiver r can then be defined as This differs from (6) in that, in order to calculate the probability that the current v s (t) will be decoded, it compares the effective sender queue to the reception list prior to the current time slot. Lemma 2: A receiver r can only coefficient-based decode its next needed packet p n when its effective Markov state decreases, i.e. s * . If the receiver is not a leader, then they have not decoded all packets in K * s (t−1) and e n ∈ K * s (t−1). Therefore by Lemma Receiving an innovative packet means that |V r (t)| = |V r (t − 1)| + 1, so by (17) s * r (t) = s * r (t − 1) − 1. So in order for coefficient-based decoding opportunity to arise, three conditions must be satisfied: • The receiver is not a leader • No new packets are encoded by the sender • The receiver successfully receives the transmitted packet. Therefore, of the time slots a receiver is neither in the zero state or a leader, approximately λµ of these provide the opportunity for coefficient-based decoding to occur. We now investigate the effectiveness of the coefficient selection schemes A and B and the baseline scheme in utilising this fraction of coefficient-based decodable time slots to minimise delay.

B. Baseline scheme
To gain some insight into the probability of coefficientbased decoding, we first study our baseline scheme. Here we will demonstrate how the effective Markov state affects the probability of coefficient-based decoding.
We first calculate for a single receiver the probability that with knowledge space K r (t), the next needed packet p n will be delivered. The total number of possible transmissions is given by the size of the sender's knowledge space K s (t) minus that of the receiver. Therefore by Lemma 1, the probability of selecting a packet under the baseline scheme which allows p n to be decoded is Therefore, the probability of coefficient-based decoding depends only on the Markov state of the receiver and the field size M . The exponential dependence on both of these factors means that the coefficient-based decoding probability will be For the multiple receiver case, simulations show that there is a negligible difference between the baseline coefficient-based decoding probabilities for the single and multiple receiver cases, provided they are coded using the same field size. Some of these probabilities, normalised over coefficient-based decodable time slots, are shown in Fig. 7, and the resulting delay performance for M = 4 is given in Fig. 8. As expected, the small coefficient-based decoding probability results in only a slight improvement over zero state decoding.

C. Scheme A
Under scheme A, the sender codes only the first unseen packet of each receiver. Furthermore the coefficient chosen is the smallest that will satisfy the innovation guarantee property 3 . Although a field size M ≥ R is necessary to guarantee innovation, the majority of the time coefficients from a much smaller field size F 2 are sufficient.
In Fig. 7 the coefficient-based decoding performance of Scheme A is compared against the baseline scheme. The performance of Scheme A with four receivers and F 4 is in fact closer to that of the baseline scheme under F 2 . Since most of the time the sender effectively transmits binary field combinations, Scheme A coefficient-based decoding probabilities are only marginally worse than the F 2 baseline scheme. With 8 receivers and a field F 8 , the probability of sending packets containing coefficients greater than 1 is higher. This results in decoding probabilities closer to the baseline F 4 case. In Fig. 8 we can observe that Scheme A has significantly better delay performance compared with the baseline scheme. This is primarily due to the role of leader state decoding, with a slight contribution from coefficient-based decoding.

D. Scheme B
Scheme B, by contrast, attempts to closely mimic a systematic, uncoded scheme by coding additional packets into each transmission only if it is necessary to maintain the innovation guarantee. Each of these added packets has the additional property that, if received, the coded transmission will allow the corresponding receiver to decode their next needed packet, despite being a nonleading receiver.
We can expect that at least λ of the sender's transmissions, corresponding to the first transmission of each new packet, will be uncoded. Fig. 9 agrees with this prediction, and we can observe that the four-receiver case has an appreciably higher proportion of uncoded packets compared with the eight receiver case. This can be attributed to the fact that the smaller the number of receivers, the lower the probability that additional packets need to be included in each transmission.
We can give an intuitive explanation for the link between sparsity and a higher probability of coefficient-based decoding. If a large fraction of undelivered packets are already decoded, this effectively reduces the size of the system of equations corresponding to unknowns in the receiver's buffer. If the transmitted combination is itself sparse, then there is a good probability that its few nonzero elements are those previously decoded by the receiver. Where the elements corresponding to other receivers are already known, the sender will ensure that the transmitted combination allows the delivery of the receiver's next needed packet.
Scheme B is shown in Fig. 7 to have a coefficient-based decoding probability that is significantly higher than Scheme A and decays more slowly as a function of the effective Markov state. The smaller fraction of uncoded packets means that the chance decoding probability of the eight-receiver case is somewhat less than its four-receiver counterpart. From Fig.  8 we can observe that the higher coefficient-based decoding probabilities of Scheme B result in a significantly better delivery delay compared with both Scheme A and the baseline scheme. The improvements are especially notable at high transmission rates, with almost a threefold improvement in delivery delay compared with leader state decoding.
It should be noted that under all of these transmission schemes, imperfect feedback would degrade the delivery delay performance. If the sender were to make decisions based on incomplete information about the contents of receivers' buffers, it would be forced to transmit more conservative packet combinations, losing sparsity and relying on larger field sizes to maintain throughput optimality.

VI. PERFORMANCE PREDICTIONS
In the previous two sections we analysed the decoding behaviour of the three transmission schemes: A, B and the baseline. It was found that much of the decoding behaviour depended on the Markov state of the receivers through zero, leader state and coefficient-based decoding. The delay was primarily determined by zero state decoding, with a relatively minor contribution from leader state decoding. Coefficientbased decoding was generally difficult to predict beyond certain probabilistic measures, and in any case under schemes A and baseline its effect on delay was relatively insignificant. Under imperfect feedback conditions, the contributions from leader and coefficient-based decoding would be further diminished, while zero state decoding probabilities would remain the same.
Based on these observations we will use a model of zero state decoding as an upper bound on the expected delivery delay performance. The purpose of constructing such a model is to attempt to predict the expected delay and throughput performance based on a receivers' current Markov state k. This performance is studied over a time frame of D time slots, where D gives an indication of the urgency of decoding. Two metrics P d (k, D) and P l (k, D) are calculated, which relate to the delivery delay and throughput, respectively. P d (k, D) represents the average probability of zero state decoding by the deadline D, while P l (k, D) corresponds to the expected number of redundant transmissions received due to having already decoded all packets in the current coding window.
These measures will later be used to allow the sender to dynamically adjust the arrival rate and therefore the size of the coding window to give lower delay performance at higher throughputs.

A. Probability of zero state decoding
Here we calculate the probability P d (k, D) that a receiver r in state k will reach the zero state in the next D time slots. We will approach this problem by finding the probability that the receiver first reaches 0 in exactly D ≤ D time steps.
If the receiver starts at Markov state k, the probability it will reach the zero state in D time steps can be calculated by characterising a random walk [29] with up, down and stay probabilities of p, q, and 1−p−q, respectively. To characterise this walk, we first divide its movements into d ≤ D moving time steps, corresponding to changes in the walk's position, and D − d pause steps, where the walk position does not change. Moving time steps occur with probability p + q, while pause steps have probability 1 − p − q. To reach the zero state the last step must be a down step, so the probability that d out of D steps are moving is Ignoring the pause steps, we now consider a walk of length d which moves up with probability P = p p+q and down with probability Q = q p+q . We calculate the probability the receiver travels from k to 0 for the first time in exactly d moving steps. Note that this is only possible if d = k + 2i for some nonnegative integer i. If this is the case, then u = d−k 2 upwards steps and v = d+k 2 downwards steps must have been taken. We can count the number of possible paths under this constraint using the solution to the Ballot problem [29], giving The probability of first reaching zero in d moving steps is Therefore, the probability of moving from k to 0 in exactly D time steps for the first time is Therefore, the probability that the receiver zero state decodes by a deadline D is where the notation in the second summation indicates that d takes the value of every other integer from k to D.

B. Number of lost transmissions
Here we find P l (k), the expected number of potential transmissions lost by a receiver r in state k by deadline D. Assuming the sender adds new packets to the coding window randomly with probability λ est at each time slot, we wish to calculate the expected number of redundant packet transmissions received by deadline D.
Assume that the receiver will only obtain a redundant transmission if it receives a packet while caught up to the sender. In other words, the number of time slots when a receiver's channel is good and its Markov state is s r (t) = 0. The walk's minimum point c below 0, shown in Fig. 10, corresponds to the number of packets lost over that particular walk. Again the probability it will lose c packets in D time steps can be calculated by characterising a random walk.
The probability of having d moving steps is given by For a fixed starting point k we need to determine the average expected minimum point, −c. In order to calculate this average, we individually consider walks each with endpoint b. A path from k to b of length d must consist of u = d−k+b 2 upwards steps and v = d+k−b 2 downwards steps. Paths with minimum value less than or equal to −c must touch −c at least once. By the reflection principle [29], the number of paths from k to b which touch −c is equal to the number of length d paths from k to −2c − b, So the probability of having a minimum state less than or equal to −c is given by So including pause steps, this yields the probability of receiving N l (k) ≥ c redundant transmissions on a walk from k to b, Summing over all values of D, b and c that could feasibly result in lost transmissions, we can find the expected number of lost transmissions: VII. DYNAMIC RATE ADAPTATION SCHEME In the previous section we established the expected short term performance in terms of measures P d (k, D) and P l (k, D) of delay and throughput. We now use this information to define and calculate two new metrics M W (r) and M X (r) that allow the sender to dynamically determine its transmission rate. By weighing the short term delay and throughput against each other, the sender can decide whether to wait and transmit existing packets, or send a new packet and increase the size of the coding window. The fine tuning allowed by the dynamic scheme to choose the best short term throughput delay tradeoffs allows it to achieve better long term delay and throughput performance.

A. Decision metric
Here we outline how the sender determines whether waiting or sending is the better strategy. The sender weighs each of the receivers' probability of zero state decoding against the expected amount of redundant information received over a time frame of length D.
Previously we have studied transmission schemes where the arrival pattern a(t) was determined by a Bernoulli process with a fixed probability λ < µ. On the other hand, in the dynamic rate adaptation scheme we are about to introduce, we assume that the sender has a very large (theoretically infinite) number of packets ready to be transmitted in its buffer. However, the actual transmission pattern is determined based on the receivers' Markov states and the number of undelivered packets. Accordingly, our delay measure is adjusted to these new arrival times. It turns out that there is no straightforward way to predict the resulting arrival pattern, so we continue to model sender arrivals with a Bernoulli process, where the previously known average arrival rate λ is replaced with an estimate λ est of the expected arrival rate. Later, we will study the impact λ est has on the throughput and delay performance.
The measure M (r, k) determines how advantageous it is considered for a receiver to be in state k. This is based on the two previously calculated factors: P d (k), the probability of reaching the zero state in the next D time slots, and P l (k) the expected number of redundant transmissions received due to catching up to the sender. P d (k) is weighted by u, the number of undelivered packets in the receiver's buffer, as well as f , a factor which weighs the benefit of decoding existing packets against the importance of receiving new packets. The expected benefit for a particular receiver being in state k is then At each time slot the sender must decide whether to wait and code only existing packets, or send and add a new packet to the coding window. It does this by calculating the expected benefit of each choice. Waiting can have two possible effects on the Markov state: it can either decrease, if the packet is successfully received, or stay the same if there is an erasure. Then by (29) the expected benefit of waiting is (30) Similarly we can calculate the expected benefit of sending: (31) Summing over all receivers, the final decision is given by the polarity of If it is positive, then a(t) = 1 and sender adds a new packet to the coding window. Otherwise a(t) = 0 and it waits.

B. Influences on the sender decision
To understand how the sender makes its decision, it is helpful to study the impact that a particular receiver will have, in terms of its Markov state, as well as parameters such as length of the deadline D and the arrival rate estimate.
To do this, it is helpful to separate the effects of the probability of decoding P d (·), and the expected number of redundant packet transmissions P l (·). Since the decision depends on the polarity of M X (r) − M W (r), we can define P * l (k) and P * d (k) as (30) and (31), the contribution of receiver r to the final decision is P * d (k) and P * l (k) are plotted for a number of parameters in Figs. 11 and 12. When a receiver is in a particular state k, P * l (k) acts as a baseline value, determining how many more packets the receiver is expected to drop on average if the sender waits a time step, compared to sending a new packet. Note that this difference can be at most one packet, since waiting once instead of sending can only increase the penalty by one packet. The effect of P * l (k) is countered by P * d (k), a probability whose value is scaled by the number of undelivered packets u in the receiver's queue and the weighting factor f . We now examine the effect of the receivers' Markov states, as well as the decision parameters D and λ est on the sender decision.
1) Low Markov states: At k = 0 zero state decoding dictates that u = 0, so by (29) that receiver will always favour sending. Therefore, if all receivers have decoded all of the packets in the current coding window, a new packet must be added. This was not guaranteed by the Bernoulli arrival process, and is one respect in which dynamic rate control offers an improvement. At low Markov states, P * d (k) indicates there is somewhat less urgency to decode since it is quite likely that the receiver will naturally decode by the deadline. However as the Markov state k increases, P * d (k) initially increases, representing a greater urgency for decoding, and then decreases again as the probability of decoding decreases.
2) High Markov states: At high values of k, we observe that receivers will make a smaller contribution to the sender decision. As k becomes large, the probability of decoding by the deadline, regardless of whether the sender waits or sends, becomes small. Therefore P * d (k) makes little contribution to the final decision. In order to lose packet transmissions, the receiver must first reach Markov state k = 0. So if P * d (k) is small, then so is P * l (k). Note that both P * d (k) = P * l (k) = 0 for k > D since it is impossible to reach the 0 state within the D time step deadline.
3) Deadline D: The deadline D gives some sense of the urgency of decoding. In Fig. 11, the effect of decreasing D is to increase the impact of P * d (k) at low k, and reduce that of P * l (k). This encourages the sender to favour waiting more strongly, resulting in slightly smaller Markov states and lower average delivery delay. In contrast, a larger D results in a more flattened P * d (k) shape and more negative P * l (k), resulting in generally lower decoding urgency, but also a larger weighting on higher Markov states. 4) Arrival rate estimate λ est : If our estimate λ est is not correct, it is important to understand the effect it will have on the decision process. As illustrated in Fig. 12, a lower estimate reduces the influence of P * l (k), and shifts the peak value of P * d (k) to lower k. This indicates that waiting will be favoured, even at low Markov states. At higher values of λ est , decoding is considered less urgent and the sender will prefer sending until receivers are in a higher Markov state.

VIII. PERFORMANCE COMPARISON
Here we compare the performance of our dynamic rate adaptation scheme with that in the original Bernoulli arrival process model. Since, unlike the Bernoulli arrival process, the dynamic arrival scheme does not have a known arrival rate λ, we instead use throughput, the average number of arrivals, as a fair comparison. We pair the rate control scheme with the throughput optimal coding scheme B of [11], since of the three schemes studied in Sections IV and V it has the best delay performance.

A. Parameters
In Fig. 13 we compare the delay throughput performance of the original random Bernoulli arrival process against that of  the dynamic rate adaptation scheme, shown for different values of the decision parameters D, λ est and f . As expected, the dynamic rate adaptation scheme has much better throughput delay performance than that of the Bernoulli arrival process. Interestingly, regardless of which parameter is being changed, the resulting performance within reasonable values appears to lie roughly on the same delay-throughput curve. The inset in Fig. 13 takes a closer look at the fine impact of decision parameters λ est and D on the performance. The effect of the deadline D on decision behaviour was studied in Section VII-B3. As expected, increases in D increase both the throughput and delay, while low values of D result in low delay, but also low throughput.
Similarly, Section VII-B4 also correctly predicted that a low λ est would result in a high throughput and delay, and vice versa. This is because the sender in effect overcompensates for the (incorrect) channel rate it expects receivers to experience in the near future. We can observe that changing λ est has a greater impact on the decision curve in Fig. 12, resulting in a larger throughput delay range compared with changing D in Fig. 11. The factor f , by comparison, only changes the weighting of P * d (k) on the sender decision, without altering the shape of the decision curve. The effect is that the number of packets required to alter the decision is scaled by a factor of 1/f . Extremely low values of f reduce the influence of undelivered packets and therefore favour sending, resulting in higher throughput and higher delay. On the other hand, high values of f mean that the sender will be influenced by a relatively small number of undecoded packets, so that it more likely favours waiting. Altering the factor f can be used to achieve the range of desirable transmission rates, from sending whenever a receiver's Markov state s r (t) < D, if f = 0, to waiting whenever a receiver has an undelivered packet, if f = ∞.

B. Delay distributions
Although average delay is one measure of performance, it does not give the complete picture of how long a receiver may need to wait before the packets of the video stream can be played in order. If, for example, extremely long delays occur for a small number of packets, the resulting delay performance may be quite poor.
In Fig. 14 we compare the cumulative number of packets under both Bernoulli and dynamic arrivals. Under Bernoulli arrivals, as λ increases, so does the delay spread, with some packets experiencing delays of over 100 time slots. By comparison, the delay distribution of the dynamic rate adaptation scheme converges to 1 much more quickly under all λ est values.

C. Rate consistency
For good performance, it is also preferable to have a consistently high packet delivery rate. As a measure of this, we find the delivery rate over a sliding window of 10 time slots. This rate distribution is plotted in Fig. 15. In general,  as the throughput increases the average delivery rate also increases. However as the rate approaches µ, less frequent decoding opportunities and larger decoding delays result in a less consistent transmission rate. This is particularly apparent as the throughput approaches µ, where the large range of delivery rates indicates that there are periods where few or no packets are delivered, and times when a large number of packets will be delivered at once. For the Bernoulli scheme at λ = 0.75, about 9% of the time no packets will be received at all over a 10-timeslot window. The dynamic scheme at f = 0.3 (average throughput = 0.757) has roughly the same shape, however it has a lower probability of no deliveries over the 10-time slot window.
At lower rates, the delivery rate distribution of the dynamic scheme is more advantageous, with a much smaller variance indicating more consistent delivery throughput. There is also a much smaller proportion of time in which few or no packets are delivered. These observations both indicate that the dynamic arrival scheme can deliver packets to receivers more consistently than the Bernoulli arrival scheme.

IX. CONCLUSION
We have demonstrated that the transmission rate of a broadcast in-order delivery scheme can be dynamically adjusted to improve both throughput and delay performance.
Analysing schemes where the transmission rate was limited by a Bernoulli arrival process, we used receivers' Markov states to distinguish between three methods for decoding: zero state, leader state and coefficient-based decoding. We were able to accurately model the zero state decoding delay, and found that in most cases zero state decoding alone provided a reasonable approximation for the expected delivery delay. Where there were more than a few receivers, leader state decoding was observed to have a negligible impact on the delivery delay. Although the random network coding and queue management algorithm of [10] had only a small effect on the delay, using the transmission scheme of [11] resulted in significant improvements over zero state decoding alone by capitalising on more coefficient-based decoding opportunities.
Based on these observations we used a model of zero state decoding to predict the expected short term throughput and decoding behaviour. Using the results, we developed a transmission scheme that regulates the transmission rate by weighing the probability of decoding existing packets against expected losses to throughput. The throughput-delay tradeoffs under the dynamic arrival scheme resulted in much better performance, both in terms of average decoding delay and consistency of delivery rates.
So far our work has only been in the context of homogeneous networks. While our analysis is equally applicable to heterogeneous networks, a number of other issues including resource allocation and fairness must also be considered. Although our dynamic rate adaptation scheme has been shown to give improved throughput and delay, there is so far no way to predict what throughput or delay will be experienced in practice. More work needs to be done to study the relationship between decision metrics and the delay and throughput performance.