Skip to main content

Packet Forwarding with Swaps

  • Conference paper
  • First Online:
Structural Information and Communication Complexity (SIROCCO 2023)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13892))

  • 307 Accesses

Abstract

We consider packet forwarding in the adversarial queueing theory (AQT) model introduced by Borodin et al. In this context, a series of recent works have established optimal bounds for buffer space usage of \(O(\log n)\) for simple network topologies, where n is the size of the network. Optimal buffer space usage, however, comes at a cost: any protocol that achieves o(n) buffer space usage cannot guarantee bounded packet latency.

In this paper, we introduce a generalization of the AQT model that allows for packet swaps in addition to regular forwarding operations. We show that in this model, it is possible to simultaneously achieve both optimal buffer space usage and packet latency when the network is a path of length n. To this end, we introduce an analytic tool we call the smoothed configuration of the network. We employ the smoothed configuration to reason about packet latency for a large family of local forwarding protocols, whereby we derive our main result. We also employ the smoothed configuration to analyze the total buffer space usage of forwarding protocols under stochastic packet arrivals. We show that the total network load is n in its steady state, but that the system takes exponential time in expectation to reach a total load of n.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    For the standard \((\rho , \sigma )\)-bounded injection model, OED’s buffer space requirement is only optimal among local forwarding protocols—i.e., protocols where each buffer’s decision to forward depends only on the state of that buffer’s distance O(1) neighborhood. Indeed, there are centralized protocols whose buffer space usage is \(O(\rho + \sigma )\) [4, 5] in the standard injection model. In locally \((\rho , \sigma , B)\)-bounded model, however, OED’s buffer space usage is optimal even when compared to centralized protocols. See [10].

References

  1. Adler, M., Rosén, A.: Tight bounds for the performance of longest-in-system on DAGs. In: Alt, H., Ferreira, A. (eds.) STACS 2002. LNCS, vol. 2285, pp. 88–99. Springer, Heidelberg (2002). https://doi.org/10.1007/3-540-45841-7_6, https://dx.doi.org/10.1007/3-540-45841-7_6

  2. Borodin, A., Kleinberg, J., Raghavan, P., Sudan, M., Williamson, D.P.: Adversarial queuing theory. J. ACM 48(1), 13–38 (2001)

    Google Scholar 

  3. Dobrev, S., Lafond, M., Narayanan, L., Opatrny, J.: Optimal local buffer management for information gathering with adversarial traffic. In: Scheideler, C., Hajiaghayi, M.T. (eds.) Proceedings of the 29th ACM Symposium on Parallelism in Algorithms and Architectures, SPAA 2017, Washington DC, USA, 24–26 July 2017, pp. 265–274. ACM (2017). https://doi.org/10.1145/3087556.3087577

  4. Miller, A., Patt-Shamir, B.: Buffer size for routing limited-rate adversarial traffic. In: Gavoille, C., Ilcinkas, D. (eds.) DISC 2016. LNCS, vol. 9888, pp. 328–341. Springer, Heidelberg (2016). https://doi.org/10.1007/978-3-662-53426-7_24, http://dx.doi.org/10.1007/978-3-662-53426-7_24

  5. Miller, A., Patt-Shamir, B., Rosenbaum, W.: With great speed come small buffers: space-bandwidth tradeoffs for routing. In: Robinson, P., Ellen, F. (eds.) Proceedings of the 2019 ACM Symposium on Principles of Distributed Computing, PODC 2019, Toronto, ON, Canada, July 29–2 August 2019, pp. 117–126. ACM (2019). https://doi.org/10.1145/3293611.3331614

  6. Mitzenmacher, M., Upfal, E.: Probability and Computing, 2nd edn. Cambridge University Press, Cambridge (2017)

    Google Scholar 

  7. Patt-Shamir, B., Rosenbaum, W.: The space requirement of local forwarding on acyclic networks. In: Schiller, E.M., Schwarzmann, A.A. (eds.) PODC 2017: Proceedings of the ACM Symposium on Principles of Distributed Computing, Washington, DC, USA, 25–27 July 2017, pp. 13–22. ACM (2017). https://doi.org/10.1145/3087801.3087803

  8. Patt-Shamir, B., Rosenbaum, W.: Space-optimal packet routing on trees. In: 2019 IEEE Conference on Computer Communications, INFOCOM 2019, Paris, France, April 29– 2 May 2019, pp. 1036–1044. IEEE (2019). https://doi.org/10.1109/INFOCOM.2019.8737596

  9. Rosén, A., Scalosub, G.: Rate vs. buffer size-greedy information gathering on the line. ACM Trans. Algorithms 7(3), 32:1–32:22 (2011). https://doi.org/10.1145/1978782.1978787

  10. Rosenbaum, W.: Packet forwarding with a locally Bursty adversary. In: Scheideler, C. (ed.) 36th International Symposium on Distributed Computing, DISC 2022, 25–27 October 2022, Augusta, Georgia, USA. LIPIcs, vol. 246, pp. 34:1–34:18. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2022). https://doi.org/10.4230/LIPIcs.DISC.2022.34

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Will Rosenbaum .

Editor information

Editors and Affiliations

Appendices

Appendix: Latency of Solid Forwarding Protocols with Swaps

Proof

(Lemma 2). First, it is clear that any packet in I at t can only occupy a buffer in \([a, b+1]\) at \(t'\). Furthermore, since I is an island in \(\textbf{C}^t(G)\), either \(\textbf{L}^t(a-1) = 0\) or \(a = 1\), and \(\textbf{L}^t(b+1) = 0\), so no other packets occupy any buffer in \([a, b+1]\) after forwarding. We next induct on the suffixes of \(I'\), \([b+1-i, b+1]\) where \(0 \le i < b+1-a\), to show that each buffer in \([a+1,b+1]\) is non-empty in \(\textbf{C}^{t'}(G)\).

  • Base Case (\(i=0\)): Since I is an island in \(\textbf{C}^t(G)\), \(\textbf{L}^t(b+1) = 0\) so b forwards a packet to \(b+1\in I'\) and \(\textbf{L}^{t'}(b+1) > 0\).

  • Inductive Step (\(0< i < b+1-a\)): Assume that the lemma holds for the interval \([b+1-(i-1), b+1]\) where \(0 \le i < b+1-a\). Since \(i < b+1-a\), \(\textbf{L}^{t}(b-i) > 0\). If either \(\textbf{L}^t(b+1-i) > 1\), or \(\textbf{L}^t(b+1-i) = 1\) but \(b+1-i\) does not forward during round t, then we know that \(\textbf{L}^{t'}(b+1-i) \ge 1\). On the other hand if \(\textbf{L}^t(b+1-i) = 1\) and \(b+1-i\) forwards during round t, then since \(\textbf{L}^t(b-i) > 0\), by Definition 3, \(b+1-i\) receives a packet during forwarding from \(b-i \in I\) and thus \(\textbf{L}^{t'}(b+1-i) = 1\). Combining this with the inductive hypothesis, we get that for each buffer \(x\in [b+1-i, b+1]\), \(\textbf{L}^{t'}(x) > 0\).

Thus, the statement holds for all \(i < b+1=a\). If \(\textbf{L}^t(a) > 1\) or \(\textbf{L}^t(a) = 1\) but a does not forward during round t, then the lemma holds for \(I' = [a, b+1]\). Otherwise, it holds for \(I' = [a+1, b+1]\).

Proof

(Lemma 3). Let \(M_1 = [a_1, b_1], M_2 = [a_2, b_2,], \ldots , M_k = [a_k, b_k] \subseteq M\) be the islands contained in M (from right to left) in \(\textbf{C}^t(H)\). We first claim that for each buffer \(x\in M'\), \(\textbf{SL}^{t'}(x) = 1\). Notice that we must have \(b=b_1\).

Define \(M'_1 = [a_1+1, b_1+1], M'_2 = [a_2+1, b_2+1], \ldots , M'_k = [a_k+1, b_k+1],\) \(G_1 = [b_2+1, a_1-1], G_2 = [b_3+1, a_2-1], \ldots , G_{k-1} = [b_k+1, a_{k-1}-1], G_k = [a, a_k-1]\), and \(G'_1 = [b_2+2, a_1], G'_2 = [b_3+2, a_2], \ldots , G'_{k-1} = [b_k+2, a_{k-1}], G'_k = [a+1, a_k]\).

The \(G_i\)s represent the gaps between the islands contained in M in \(\textbf{C}^t(H)\). Note that the intervals \(M_i, G_i\) are disjoint and that \(M'_i, G'_i\) are also disjoint. Furthermore, note that \(\cup _{i=1}^k \left( M_i \cup G_i \right) = M\) and that \(\cup _{i=1}^k (M'_i \cup G'_i) = M'\). Lemma 2 implies that for all \(x\in \cup _{i=1}^k M'_i\), \(\textbf{SL}^{t'}(x) = 1\).

We will make frequent use of the following observations, where \(I=[a,b]\) is any interval of buffers, in our arguments:

  1. 1.

    If \(\left| \textbf{Q}(b)\right| \ge \left| I\right| \), then \(\forall x \in I\), \(\textbf{SL}(x) = 1.\) Furthermore, if each buffer x in I is empty but has \(\textbf{SL}(x) = 1\), then \(\left| \textbf{Q}(b)\right| \ge \left| I\right| \).

  2. 2.

    \(\left| \textbf{Q}(a-1)\right| \ge \textbf{L}(I) - \left| I\right| \).

To prove our first claim, we show that for all i such that \(1 \le i \le k\), that for all \(x \in G'_i\), \(\textbf{SL}^{t'}(x) = 1\).

  • Base Case (\(i=1\)): Since M is a smoothed plateau in \(\textbf{C}^t(H)\), we know that \(\left| \textbf{Q}^{t}(b_1+1)\right| = 0\), and since \(\forall {x}\in G_1 \cup M_1\) we have \(\textbf{SL}^t(x)=1\), we know that \(\left| \textbf{Q}^t(a_1-1\right| = \textbf{L}^t(M_1) - \left| M_1\right| \ge \left| G_1\right| \). There are two cases to consider:

    1. 1.

      \(\textbf{L}^{t'}(a_1) > 0\). From Lemma 2, since \(M_1\) is an island in \(\textbf{C}^t(H)\),

      $$\begin{aligned} \textbf{L}^t(M_1) = \textbf{L}^{t'}(M'_1) + \textbf{L}^{t'}(a_1) \implies \textbf{L}^{t'}(M'_1) + \textbf{L}^{t'}(a_1) - \left| M_1\right| \ge \left| G_1\right| , \end{aligned}$$

      and thus

      $$\begin{aligned} \textbf{L}^{t'}(M'_1) + \textbf{L}^{t'}(a_1) - (\left| M_1\right| + 1) \ge \left| G'_1\right| - 1 \implies \left| \textbf{Q}^{t'}(a_1-1)\right| \ge \left| G'_1\right| - 1. \end{aligned}$$

      Combining this with the assumption that \(\textbf{L}^{t'}(a_1) > 0 \implies \textbf{SL}^{t'}(a_1) = 1\), we get that \(\forall {x}\in G'_1\), \(\textbf{SL}^{t'}(x) = 1\) since all buffers in \(G'_1\) except \(a_1\) are empty.

    2. 2.

      \(\textbf{L}^{t'}(a_1) = 0\). In this case, \(\textbf{L}^{t'}(M'_1) = \textbf{L}^t(M_1)\) and \(\left| M_1\right| = \left| M'_1\right| \), so \(\textbf{L}^{t'}(M'_1) - \left| M'_1\right| \ge \left| G'_1\right| \), and therefore \(\left| \textbf{Q}^{t'}(a_1)\right| \ge \left| G'_1\right| \) where all buffers in \(G'_1\) are empty in \(\textbf{C}^{t'}(H)\). Thus, \(\forall {x} \in G'_1, \textbf{SL}^{t'}(x) = 1\).

  • Inductive Step (\(k \ge i > 1\)): Suppose that for all \(j < i\), for all \(x \in G'_j\), we have \(\textbf{SL}^{t'}(x) = 1\). Let \(N_i = [a_i, b]\). Since M is a smoothed plateau in \(\textbf{C}^t(H)\) and \(\textbf{L}^t(a_i-1) = 0\), we know that \(\left| \textbf{Q}^t(a_i - 1)\right| = \textbf{L}^t(N_i) - \left| N_i\right| \) and that \(\left| \textbf{Q}^t(a_i - 1)\right| \ge \left| G_i\right| \). There are two cases to consider:

    1. 1.

      \(\textbf{L}^{t'}(a_i) = 0\). Let \(N'_i = [a_i+1, b+1]\). First, because \(\textbf{L}^{t'}(a_i) = 0\), by Lemma 2 we know that \(\textbf{L}^{t'}(N'_i) = \textbf{L}^t(N_i)\), and since \(\left| N'_i\right| = \left| N_i\right| \), we have that \(\textbf{L}^{t'}(N_i) - \left| N'_i\right| = \textbf{L}^t(N_i) - \left| N_i\right| \), and thus by observation 2

      $$\begin{aligned} \left| \textbf{Q}^{t'}(a_i)\right| \ge \textbf{L}^t(N_i) - \left| N_i\right| = \left| \textbf{Q}^t(a_i-1)\right| \ge \left| G_i\right| = \left| G'_i\right| . \end{aligned}$$

      Thus, \(\left| \textbf{Q}^{t'}(a_i)\right| \ge \left| G'_i\right| \) where all buffers in \(G'_i\) are empty in \(\textbf{C}^{t'}(H)\), so \(\forall {x} \in G'_i\), \(\textbf{SL}^{t'}(x) = 1\).

    2. 2.

      \(\textbf{L}^{t'}(a_i) > 0\). Let \(N'_i = [a_i, b+1]\). In this case we know that \(\textbf{L}^t(N_i) - \left| N_i\right| - 1 = \textbf{L}^{t'}(N'_i) - \left| N'_i\right| \) since \(\textbf{L}^t(N_i) = \textbf{L}^{t'}(N'_i)\) and \(\left| N_i\right| = \left| N'_i\right| - 1\). By the same reasoning as case 1,

      $$\begin{aligned} \left| \textbf{Q}^{t'}(a_i-1)\right| \ge \textbf{L}^{t'}(N'_i) - \left| N'_i\right| = \textbf{L}^t(N_i) - \left| N_i\right| - 1 \\ = \left| \textbf{Q}^t(a_i-1)\right| - 1 \ge \left| G_i\right| - 1 = \left| G'_i\right| - 1. \end{aligned}$$

      Since by assumption \(\textbf{L}^{t'}(a_i) > 0 \implies \textbf{SL}^{t'}(a_i) = 1\), and since \(\left| \textbf{Q}^{t'}(a_i-1)\right| \ge \left| G'_i\right| - 1\), where all buffers in \(G'_i\) except \(a_i\) are empty in \(\textbf{C}^{t'}(H)\), we have that for all \(x\in G'_i\), \(\textbf{SL}^{t'}(x) = 1\).

Combining the arguments above, we see that for all \(x \in M'\), \(\textbf{SL}^{t'}(x) > 0\). Finally, we show that \(\textbf{SL}^{t'}(a) = \textbf{SL}^{t'}(b+2) = 0\). M is one of possibly many smoothed plateaus in \(\textbf{C}^t(H)\). Label the \(l \ge 1\) smoothed plateaus in \(\textbf{C}^t(H)\) (from right to left) \(R_1 = [c_1, d_1], \ldots , R_l = [c_l, d_l]\).

We show for all \(1 \le i \le l\) that \(\textbf{SL}^{t'}(c_i) = \textbf{SL}^{t'}(d_i+2) = 0\) by induction. We will use the following observation: for a suffix \(I=[a, n+2]\) of buffers, we must have \(\textbf{L}^t(I) \ge \textbf{SL}^t(I)\), and in particular, if \(\left| \textbf{Q}^t(a-1)\right| = 0\), i.e., \(\textbf{SL}^t(a-1) = 0\), then \(\textbf{L}^t(I) = \textbf{SL}^t(I)\).

  • Base Case (\(i=1\)): Since \(\textbf{L}^t([d_1+1, n]) = 0\), we have \(\textbf{L}^{t'}([d_1+2, n]) = 0\) so \(\textbf{SL}^{t'}(d_1+2) = 0\). Let \(I=[c_1, n+2]\). For \(c_1\), since \(\textbf{SL}^t(c_1-1) = 0\) by assumption, \(c_1\) receives no packets during forwarding so \(\textbf{L}^t(I) = \textbf{L}^{t'}(I)\), and furthermore \(\textbf{L}^t(I) = \textbf{SL}^t(I)\). If \(\textbf{SL}^{t'}(c_1) = 1\), then \(\textbf{SL}^{t'}(I) = \textbf{SL}^t(I) + 1\) since by our previous results \(\textbf{SL}^t(R_1) = \textbf{SL}^t(R'_1)\) where \(R'_1 = [c_1+1, d_1+1]\). Thus, \(\textbf{SL}^{t'}(I) > \textbf{SL}^t(I)\) which, since \(\textbf{L}^{t'}(I) \ge \textbf{SL}^{t'}(I)\) implies \(\textbf{L}^{t'}(I) > \textbf{L}^t(I)\), a contradiction. Thus, \(\textbf{SL}^{t'}(c_1) = 0\).

  • Inductive Step (\(1 < i \le l\)): Assume that for all \(j < i\), \(\textbf{SL}^{t'}(c_j) = \textbf{SL}^{t'}(d_j + 2) = 0\). For \(d_i+2\), by assumption \(d_i+2 \le c_{i-1}\), and all buffers x in \([d_i+1, c_{i-1}-1]\) have \(\textbf{SL}^t(x) = 0\). If \(d_i + 2 < c_{i-1}\), then \(\textbf{SL}^t(d_i+2) = 0\) and since \(\textbf{SL}^t(d_i+1) = 0\), we still have \(\textbf{SL}^{t'}(d_i+2) = 0\) after forwarding. On the other hand if \(c_{i-1} = d_i+2\), then by inductive hypothesis \(\textbf{SL}^{t'}(c_{i-1}) = 0 \iff \textbf{SL}^{t'}(d_i+2) = 0\). For \(c_i\), let \(I = [c_i, n+2]\). By assumption, \(c_i\) receives no packets during forwarding and \(\textbf{SL}^t(c_i - 1) = 0\) so \(\textbf{L}^t(I) = \textbf{L}^{t'}(I) = \textbf{SL}^t(I)\). If \(\textbf{SL}^{t'}(c_i) = 1\), then \(\textbf{SL}^{t'}(I) = \textbf{SL}^t(I) + 1\) since each \(R_m\) for \(m \le i\) moves forward one buffer during forwarding. As in the base case, this is a contradiction and thus \(\textbf{SL}^{t'}(c_i) = 0\).

Proof

(Lemma 4). First, because the buffer loads of each \(x \in [1, n]\) are the same under \(\varPi _S\) as under \(\varPi \), Lemma 3 implies that there will be a smoothed plateau at \(M' = [a+1, b+1]\) in \(\textbf{S}^{t'}(G)\). What is left to show is that for all i such that \(0 \le i \le b-a\), \(s^t(b-i) = s^{t'}(b-i+1)\). We prove the claim using induction.

  • Base Case (\(i=0\)): Since M is a smoothed plateau in \(\textbf{C}^t(G)\), \(\left| \textbf{Q}^t(b+1)\right| = 0\) but \(\left| \textbf{Q}^t(b)\right| > 0\), so \(\textbf{L}^t(b) > 0\). Thus, b forwards \(h^t(b) = s^t(b)\) to the empty buffer \(b+1\). At \(t'\), \(h^t(b)\) is the only packet in \(b+1\) and from Lemma 3, we will have \(\left| \textbf{Q}^{t'}(b+2)\right| = 0\), so \(s^t(b) = s^{t'}(b+1)\).

  • Inductive Step (\(1 \le i \le b-a\)): Suppose for all \(0 \le j < i\) that \(s^t(b-j) = s^{t'}(b-j+1)\). Let \(x=b-i\), and \(p=s^t(x)\). From Algorithm 1, p is the oldest packet in \(\textbf{Q}^t(x)\), which is the set of packets in \(\textbf{C}^t([x, b])\) and not in . Furthermore, \(s^{t'}(x+1)\) is the oldest packet in \(\textbf{Q}^{t'}(x+1)\), which is the set of packets in \(\textbf{C}^{t'}([x+1, b+1])\) and not in . We show 1. that \(\textbf{Q}^{t'}(x+1) \subseteq \textbf{Q}^t(x)\), and 2. that \(p \in \textbf{Q}^{t'}(x+1)\), which together imply that \(p=s^{t'}(x+1)\).

    1. 1.

      Let r be any packet in \(\textbf{Q}^{t'}(x+1)\). At timestep t, r could have been in any buffer in the interval \([x, b+2]\). Since \(\textbf{L}^t(b+1) = 0\), r was not in \(b+1\) at t. Nor was r in \(b+2\) at t since under \(\varPi _S\), no buffer will send a packet backwards to an empty buffer, so r was in [x, b] at t. Furthermore, from Algorithm 1 and by assumption that \(r\in \textbf{Q}^{t'}(x+1)\),

      IMAGE

      By the inductive hypothesis, this set is the same as so \(r\in \textbf{Q}^t(x)\) and \(\textbf{Q}^{t'}(x+1) \subseteq \textbf{Q}^t(x)\).

    2. 2.

      First, since \(p \in \textbf{Q}^t(x)\),

      IMAGE

      If p was in a buffer in \([x+2, b]\) at t, then at \(t'\), p is in a buffer in \([x+1, b+1]\) since packets can only move forward or backward one buffer during forwarding. Thus, in this case \(p\in \textbf{Q}^{t'}(x+1)\). If p was in \(x+1\) and p was sent backward during forwarding, then there was an older packet in x at t than p, so \(p \ne s^t(x)\), a contradiction.

      Finally, if p was in x at timestep t, there are two cases. Notice that \(p=h^t(x)\). First, if p is in x at \(t'\), then \(l^t(x+1) > p\) and \(\textbf{L}^t(x+1) \ge 2\), so \(l^t(x+1)\) was older than p and in \(\textbf{Q}^t(x)\), so \(p \ne s^t(x)\). Second, if p is in \(x-1\) at \(t'\), then \(\textbf{L}^t(x) \ge 2\) and \(p = l^t(x)\), so \(p \ne s^t(x)\). Thus, if p was in x at timestep t, then p must be in \(x+1\) at \(t'\) and so \(p \in \textbf{Q}^{t'}(x+1)\).

Proof

(Lemma 5). We prove the following claim, which implies the lemma: for all \(x \in (-\infty , n]\), \(\textbf{Q}^{(t-1)'}(x) \subseteq \textbf{Q}^t(x)\) and \(\textbf{Q}^t(x) \setminus \textbf{Q}^{(t-1)'}(x)\) contains only packets injected in round t. We induct on the buffers in the network from right to left, showing that for all \(i \ge 0\), the claim holds for \(x = n - i\). Note that we call a packet p new if \(t_p = t\).

  • Base Case (\(i = 0\)): From Algorithm 1, we know that \(\textbf{Q}^{(t-1)'}(n) = \textbf{C}^{(t-1)'}(n)\) and that \(\textbf{Q}^t(n) = \textbf{C}^t(n)\). During injection for round t, buffer n cannot lose any packets, and only gains some new packets (or potentially none). Thus, \(\textbf{C}^{(t-1)'}(n) \subseteq \textbf{C}^t(n)\) with the difference containing only new packets, and the claim holds for \(x=n\).

  • Inductive Step (\(i > 0\)): Let \(x = n - i\), and assume that \(\textbf{Q}^{(t-1)'}(x+1) \subseteq \textbf{Q}^t(x+1)\) with only new packets in the difference between the two sets. If \(\left| \textbf{Q}^{(t-1)'}(x+1) \right| = 0\), the same argument from the base case applies to x. Otherwise, by the inductive hypothesis, the oldest packet p in \(\textbf{Q}^{(t-1)'}(x+1)\) is the oldest packet in \(\textbf{Q}^t(x+1)\) as well, so p is dequeued from both. Letting \(R=\textbf{Q}^{(t-1)'}(x+1) \setminus \left\{ p \right\} \) and \(R' = \textbf{Q}^t(x+1) \setminus \left\{ p \right\} \) denote the states of the queue over \(x+1\) after dequeueing at timesteps \((t-1)'\) and t, respectively, we see that \(R \subseteq R'\) as well with only new packets in the difference, and from Algorithm 1, \(\textbf{Q}^{(t-1)'}(x) = R \cup \textbf{C}^{(t-1)'}(x)\) and \(\textbf{Q}^t(x) = R' \cup \textbf{C}^t(x)\), where \(R \cap \textbf{C}^{(t-1)'}(x) = R' \cap \textbf{C}^t(x) = \emptyset \). Thus, since x only gains new packets during injection, \(\textbf{Q}^{(t-1)'}(x) \subseteq \textbf{Q}^t(x)\) with the difference containing only new packets, we get that the claim holds for buffer x.

This claim implies the lemma since, for each \(x \in (-\infty , n]\) with \(\textbf{SL}^{(t-1)'}(x) > 0\), \(p=s^{(t-1)'}(x) \in \textbf{Q}^t(x)\) and since all of the packets in \(\textbf{Q}^t(x) \setminus \textbf{Q}^{(t-1)'}(x)\) are younger than p, we have \(p = s^t(x)\). Thus, the lemma holds.

Lemma 6 is analogous to a special case of Lemma 3.4 in [7] (with \(j = 0\)). While the proof in [7] is stated only for OED forwarding, the proof for \(j = 1\) only relies upon the properties shared by all solid protocols.

Appendix: Total Load Analysis

Proof

(Lemma 7). For the \(\implies \) direction, suppose \(\textbf{L}^{t+1} = \textbf{L}^t + 1\). This implies that the total load increased after forwarding and injection. Since one packet was injected in round \(t+1\), buffer n must not have forwarded, hence \(\textbf{L}^t(n) = 0\). Therefore, buffer n must be empty in \(\textbf{S}^t\) as well, since the smoothing process never moves packets forward.

Conversely, suppose \(\textbf{S}^t\) has a gap in buffer n. Then \(\textbf{L}^t(n) = 0\), hence no packet is absorbed during the forwarding step: \(\textbf{L}^{t'} = \textbf{L}^t\). Since a packet is injected in the next injection step, we have \(\textbf{L}^{t+1} = \textbf{L}^{t'} + 1 = \textbf{L}^{t} + 1\).

Proof

(Lemma 9). We argue the contrapositive. Suppose that at least \(n - \textbf{L}^t + 1\) injections occur ahead of g. Observe that after the first forwarding step, there are at most \(n - \textbf{L}^t\) gaps ahead of g. By Lemma 3, the number of gaps ahead of g is non-increasing during each forwarding step. Further, by Lemma 5, the number of gaps ahead of g decreases each time a packet is injected ahead of g (unless the injection destroys g). Therefore, after (at most) \(n - \textbf{L}^t\) injections ahead of g, either no gaps remain ahead of g or g was destroyed. Any subsequent injection ahead of g will destroy g (if it wasn’t already destroyed), and the desired result follows.

Proof

(Corollary 3). We argue that when \(\textbf{L}^t \ge (\frac{1}{2} + \delta ) n\), the probability that the gap created in round t survives is exponentially small in n. To this end, for each t and \(i \in [n]\), we define the random variable \(X^t_i\) to be 1 if the injection in round \(t + i\) occurs ahead of the gap formed in round t and 0 otherwise. For each round t, let \(j_{t}\) denote the buffer into which the adversary injects in round t. Then

$$\begin{aligned} X^t_i = {\left\{ \begin{array}{ll} 1 &{} j_{t+i} \ge t + i - 1\\ 0 &{}\text {otherwise}. \end{array}\right. } \end{aligned}$$
(1)

Thus, the sum \(X^t = X^t_1 + X^t_2 + \cdots + X^t_n\) is the total number of packets injected ahead of the gap created in round t. Observe that for a fixed t, the variables \(X^t_1, X^t_2, \ldots , X^t_n\) are independent, and that

$$\begin{aligned} \Pr (X^t_i = 1) = \frac{n-i+1}{n}. \end{aligned}$$
(2)

Therefore, linearity of expectation gives

$$ \mu = E(X^t) = \sum _{i = 1}^n \frac{n-i+1}{n} = \frac{1}{2} (n+1). $$

If \(\textbf{L}^t > (\frac{1}{2} + \delta )n\), then in order for the gap formed in round t to survive, at most \((\frac{1}{2} - \delta ) n < (1 - \delta ) \mu \) packets have been injected ahead of g. The corollary follows by applying the following Chernoff bound to bound the probability of this event.

Lemma 11

(Cf. Theorem 4.5 in [6]). Suppose \(Y_1, Y_2, \ldots , Y_n\) are independent Poisson trials with \(\Pr (Y_i) = p_i\), let \(Y = \sum _{i = 1}^n Y_i\), and \(\mu = E(Y)\). Then for \(0< \delta < 1\), we have

$$ \Pr (Y \le (1 - \delta ) \mu ) \le e^{-\mu \delta ^2 / 2}. $$

Proof

(Lemma 10). Let \(\textbf{S}\) be a smoothed configuration with total load \(\textbf{L}^t = (\frac{1}{2} + \delta ) n\). Let \(g_1, g_2, \ldots , g_k\) be the gaps in the configuration at time t, where \(k = (\frac{1}{2} - \delta ) n\). We bound \(\textbf{L}^{t+n}\) by giving an upper bound on the number of the gaps \(g_1,\ldots , g_k\) that survive. Specifically, we will show that a constant fraction of the gaps are destroyed with very high probability. To this end, assume that \(g_1\) is the rightmost gap, \(g_{2}\) the next gap to the left, and so on. Thus, each \(g_j\) is in buffer \(i < n - j\). Let \(s = (\frac{1}{2} - \delta ) n / 4\). Observe that in rounds \(t+1, t+2, \ldots , t+s\), at most s gaps could survive. Further, in these rounds, any injection into a buffer i satisfying \(i > n - 2 s\) is guaranteed to destroy one of the gaps \(g_1, g_2, \ldots , g_k\) (and not a gap that was created in some round \(t' \ge t\)). We call an injection into a buffer \(i > n - 2 s\) a good injection. Observe that if the are \(\gamma \le s\) good injections in rounds \(t+1, t+2, \ldots , t+4s\), then in round \(t+n\), the total load satisfies \(\textbf{L}^{t+n} \le n - \gamma \).

The probability that any injection is good is \(\frac{2 s}{n} = (\frac{1}{2} - \delta ) / 2\). Therefore, the expected number of good injections in rounds \(t+1,\ldots ,t+s\) is \(\mu = s (\frac{1}{2} - \delta )/2 = (\frac{1}{2} - \delta )^2 / 8 = 2 \alpha \). Applying Lemma 11, with \(\delta = \frac{1}{2}\) gives the desired result.

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Matsui, C., Rosenbaum, W. (2023). Packet Forwarding with Swaps. In: Rajsbaum, S., Balliu, A., Daymude, J.J., Olivetti, D. (eds) Structural Information and Communication Complexity. SIROCCO 2023. Lecture Notes in Computer Science, vol 13892. Springer, Cham. https://doi.org/10.1007/978-3-031-32733-9_24

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-32733-9_24

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-32732-2

  • Online ISBN: 978-3-031-32733-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics