Low-Memory Algorithms for Online Edge Coloring

Authors Prantar Ghosh , Manuel Stoeckl

Thumbnail PDF


  • Filesize: 0.82 MB
  • 19 pages

Document Identifiers

Author Details

Prantar Ghosh
  • Georgetown University, Washington, DC, USA
Manuel Stoeckl
  • Dartmouth College, Hanover, NH, USA

Cite AsGet BibTex

Prantar Ghosh and Manuel Stoeckl. Low-Memory Algorithms for Online Edge Coloring. In 51st International Colloquium on Automata, Languages, and Programming (ICALP 2024). Leibniz International Proceedings in Informatics (LIPIcs), Volume 297, pp. 71:1-71:19, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2024)


For edge coloring, the online and the W-streaming models seem somewhat orthogonal: the former needs edges to be assigned colors immediately after insertion, typically without any space restrictions, while the latter limits memory to be sublinear in the input size but allows an edge’s color to be announced any time after its insertion. We aim for the best of both worlds by designing small-space online algorithms for edge coloring. Our online algorithms significantly improve upon the memory used by prior ones while achieving an O(1)-competitive ratio. We study the problem under both (adversarial) edge arrivals and vertex arrivals. Under vertex arrivals of any n-node graph with maximum vertex-degree Δ, our online O(Δ)-coloring algorithm uses only semi-streaming space (i.e., Õ(n) space, where the Õ(.) notation hides polylog(n) factors). Under edge arrivals, we obtain an online O(Δ)-coloring in Õ(n√Δ) space. We also achieve a smooth color-space tradeoff: for any t = O(Δ), we get an O(Δt(log²Δ))-coloring in Õ(n√{Δ/t}) space, improving upon the state of the art that used Õ(nΔ/t) space for the same number of colors. The improvements stem from extensive use of random permutations that enable us to avoid previously used colors. Most of our algorithms can be derandomized and extended to multigraphs, where edge coloring is known to be considerably harder than for simple graphs.

Subject Classification

ACM Subject Classification
  • Mathematics of computing → Graph coloring
  • Theory of computation → Streaming, sublinear and near linear time algorithms
  • Edge coloring
  • streaming model
  • online algorithms


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Amir Abboud, Keren Censor-Hillel, Seri Khoury, and Ami Paz. Smaller cuts, higher lower bounds. CoRR, abs/1901.01630, 2019. URL: https://doi.org/10.48550/arXiv.1901.01630.
  2. Gagan Aggarwal, Rajeev Motwani, Devavrat Shah, and An Zhu. Switch scheduling via randomized edge coloring. In 44th Annual IEEE Symposium on Foundations of Computer Science (FOCS), 2003,, pages 502-512. IEEE, 2003. URL: https://doi.org/10.1109/SFCS.2003.1238223.
  3. Noga Alon and Sepehr Assadi. Palette sparsification beyond (Δ+1) vertex coloring. In Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques, APPROX/RANDOM 2020, August 17-19, 2020, Virtual Conference, volume 176 of LIPIcs, pages 6:1-6:22, 2020. URL: https://doi.org/10.4230/LIPIcs.APPROX/RANDOM.2020.6.
  4. Noga Alon and Shachar Lovett. Almost k-wise vs. k-wise independent permutations, and uniformity for general group actions. In Proc. 16th International Workshop on Randomization and Approximation Techniques in Computer Science, pages 350-361. Springer, 2012. URL: https://doi.org/10.1007/978-3-642-32512-0_30.
  5. Mohammad Ansari, Mohammad Saneian, and Hamid Zarrabi-Zadeh. Simple Streaming Algorithms for Edge Coloring. In Shiri Chechik, Gonzalo Navarro, Eva Rotenberg, and Grzegorz Herman, editors, 30th Annual European Symposium on Algorithms (ESA 2022), volume 244 of Leibniz International Proceedings in Informatics (LIPIcs), pages 8:1-8:4, Dagstuhl, Germany, 2022. Schloss Dagstuhl - Leibniz-Zentrum für Informatik. URL: https://doi.org/10.4230/LIPIcs.ESA.2022.8.
  6. Sepehr Assadi, Amit Chakrabarti, Prantar Ghosh, and Manuel Stoeckl. Coloring in graph streams via deterministic and adversarially robust algorithms. In Proceedings of the 42nd ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems, PODS 2023, Seattle, WA, USA, June 18-23, 2023, pages 141-153. ACM, 2023. URL: https://doi.org/10.1145/3584372.3588681.
  7. Sepehr Assadi, Andrew Chen, and Glenn Sun. Deterministic graph coloring in the streaming model. In Proc. 54th Annual ACM Symposium on the Theory of Computing, pages 261-274, 2022. URL: https://doi.org/10.1145/3519935.3520016.
  8. Sepehr Assadi, Yu Chen, and Sanjeev Khanna. Sublinear algorithms for (Δ+ 1) vertex coloring. In Proc. 30th Annual ACM-SIAM Symposium on Discrete Algorithms, pages 767-786, 2019. URL: https://doi.org/10.1137/1.9781611975482.48.
  9. Sepehr Assadi, Pankaj Kumar, and Parth Mittal. Brooks' theorem in graph streams: a single-pass semi-streaming algorithm for Δ-coloring. In STOC '22: 54th Annual ACM SIGACT Symposium on Theory of Computing, Rome, Italy, June 20 - 24, 2022, pages 234-247. ACM, 2022. URL: https://doi.org/10.1145/3519935.3520005.
  10. Bahman Bahmani, Aranyak Mehta, and Rajeev Motwani. Online graph edge-coloring in the random-order arrival model. Theory of Computing, 8(1):567-595, 2012. URL: https://doi.org/10.4086/toc.2012.v008a025.
  11. Amotz Bar-Noy, Rajeev Motwani, and Joseph Naor. The greedy algorithm is optimal for on-line edge coloring. Information Processing Letters, 44(5):251-253, 1992. URL: https://doi.org/10.1016/0020-0190(92)90209-E.
  12. Soheil Behnezhad, Mahsa Derakhshan, MohammadTaghi Hajiaghayi, Marina Knittel, and Hamed Saleh. Streaming and massively parallel algorithms for edge coloring. In 27th Annual European Symposium on Algorithms, ESA 2019, September 9-11, 2019, Munich/Garching, Germany, volume 144 of LIPIcs, pages 15:1-15:14. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2019. URL: https://doi.org/10.4230/LIPIcs.ESA.2019.15.
  13. Soheil Behnezhad and Mohammad Saneian. Streaming edge coloring with asymptotically optimal colors. arXiv preprint arXiv:2305.01714, 2023. URL: https://doi.org/10.48550/arXiv.2305.01714.
  14. Omri Ben-Eliezer, Rajesh Jayaram, David P. Woodruff, and Eylon Yogev. A framework for adversarially robust streaming algorithms. In Proc. 39th ACM Symposium on Principles of Database Systems, pages 63-80, 2020. URL: https://doi.org/10.1145/3375395.3387658.
  15. Suman K. Bera, Amit Chakrabarti, and Prantar Ghosh. Graph coloring via degeneracy in streaming and other space-conscious models. In 47th International Colloquium on Automata, Languages, and Programming, ICALP 2020, July 8-11, 2020, Saarbrücken, Germany (Virtual Conference), volume 168 of LIPIcs, pages 11:1-11:21, 2020. URL: https://doi.org/10.4230/LIPIcs.ICALP.2020.11.
  16. Suman Kalyan Bera and Prantar Ghosh. Coloring in graph streams. CoRR, abs/1807.07640, 2018. URL: https://doi.org/10.48550/arXiv.1807.07640.
  17. Anup Bhattacharya, Arijit Bishnu, Gopinath Mishra, and Anannya Upasana. Even the easiest(?) graph coloring problem is not easy in streaming! In 12th Innovations in Theoretical Computer Science Conference, ITCS 2021, January 6-8, 2021, Virtual Conference, volume 185 of LIPIcs, pages 15:1-15:19, 2021. URL: https://doi.org/10.4230/LIPIcs.ITCS.2021.15.
  18. Sayan Bhattacharya, Fabrizio Grandoni, and David Wajc. Online edge coloring algorithms via the nibble method. In Proceedings of the 2021 ACM-SIAM Symposium on Discrete Algorithms, SODA 2021, Virtual Conference, January 10 - 13, 2021, pages 2830-2842. SIAM, 2021. URL: https://doi.org/10.1137/1.9781611976465.168.
  19. Joakim Blikstad, Ola Svensson, Radu Vintan, and David Wajc. Simple and asymptotically optimal online bipartite edge coloring. In 2024 Symposium on Simplicity in Algorithms (SOSA), pages 331-336, 2024. URL: https://doi.org/10.1137/1.9781611977936.30.
  20. Amit Chakrabarti, Prantar Ghosh, and Manuel Stoeckl. Adversarially robust coloring for graph streams. In Proc. 13th Conference on Innovations in Theoretical Computer Science, pages 37:1-37:23, 2022. URL: https://doi.org/10.4230/LIPIcs.ITCS.2022.37.
  21. Moses Charikar and Paul Liu. Improved algorithms for edge colouring in the W-streaming model. In 4th Symposium on Simplicity in Algorithms, SOSA 2021, Virtual Conference, January 11-12, 2021, pages 181-183. SIAM, 2021. URL: https://doi.org/10.1137/1.9781611976496.20.
  22. Shiri Chechik, Doron Mukhtar, and Tianyi Zhang. Streaming edge coloring with subquadratic palette size. arXiv preprint arXiv:2305.07090, 2023. URL: https://doi.org/10.48550/arXiv.2305.07090.
  23. Ilan Reuven Cohen, Binghui Peng, and David Wajc. Tight bounds for online edge coloring. In 60th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2019, Baltimore, Maryland, USA, November 9-12, 2019, pages 1-25. IEEE Computer Society, 2019. URL: https://doi.org/10.1109/FOCS.2019.00010.
  24. Camil Demetrescu, Bruno Escoffier, Gabriel Moruz, and Andrea Ribichini. Adapting parallel algorithms to the W-stream model, with applications to graph problems. Theoretical Computer Science, 411(44):3994-4004, 2010. URL: https://doi.org/10.1016/j.tcs.2010.08.030.
  25. Camil Demetrescu, Irene Finocchi, and Andrea Ribichini. Trading off space for passes in graph streaming problems. In Proceedings of the Seventeenth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2006, pages 714-723. ACM Press, 2006. URL: https://doi.org/10.1145/1644015.1644021.
  26. Martin R. Ehmsen, Lene M. Favrholdt, Jens S. Kohrt, and Rodica Mihai. Comparing first-fit and next-fit for online edge coloring. Theor. Comput. Sci., 411(16-18):1734-1741, 2010. URL: https://doi.org/10.1016/j.tcs.2010.01.015.
  27. Thomas Erlebach and Klaus Jansen. The complexity of path coloring and call scheduling. Theoretical Computer Science, 255(1):33-50, 2001. URL: https://doi.org/10.1016/S0304-3975(99)00152-8.
  28. Lene M. Favrholdt and Jesper W. Mikkelsen. Online edge coloring of paths and trees with a fixed number of colors. Acta Informatica, 55(1):57-80, 2018. URL: https://doi.org/10.1007/s00236-016-0283-0.
  29. Lene M. Favrholdt and Morten N. Nielsen. On-line edge-coloring with a fixed number of colors. Algorithmica, 35(2):176-191, 2003. URL: https://doi.org/10.1007/s00453-002-0992-3.
  30. S. Gandham, M. Dawande, and R. Prakash. Link scheduling in sensor networks: distributed edge coloring revisited. In Proceedings IEEE 24th Annual Joint Conference of the IEEE Computer and Communications Societies., volume 4, pages 2492-2501 vol. 4, 2005. URL: https://doi.org/10.1109/INFCOM.2005.1498534.
  31. Christian Glazik, Jan Schiemann, and Anand Srivastav. A one pass streaming algorithm for finding euler tours. Theory of Computing Systems, 67(4):1-23, December 2022. URL: https://doi.org/10.1007/s00224-022-10077-w.
  32. Magnus M. Halldorsson, Fabian Kuhn, Alexandre Nolin, and Tigran Tonayan. Near-optimal distributed degree+1 coloring. In Proc. 54th Annual ACM Symposium on the Theory of Computing, pages 450-463, 2022. URL: https://doi.org/10.1145/3519935.3520023.
  33. Ian Holyer. The np-completeness of edge-coloring. SIAM Journal on Computing, 10(4):718-720, 1981. URL: https://doi.org/10.1137/0210055.
  34. Tiago Januario, Sebastián Urrutia, Celso C. Ribeiro, and Dominique de. Werra. Edge coloring: A natural model for sports scheduling. European Journal of Operational Research, 254(1):1-8, 2016. URL: https://doi.org/10.1016/j.ejor.2016.03.038.
  35. Janardhan Kulkarni, Yang P. Liu, Ashwin Sah, Mehtaab Sawhney, and Jakub Tarnawski. Online edge coloring via tree recurrences and correlation decay. In STOC '22: 54th Annual ACM SIGACT Symposium on Theory of Computing, Rome, Italy, June 20 - 24, 2022, pages 104-116. ACM, 2022. URL: https://doi.org/10.1145/3519935.3519986.
  36. Luigi Laura and Federico Santaroni. Computing strongly connected components in the streaming model. In Theory and Practice of Algorithms in (Computer) Systems, pages 193-205. Springer Berlin Heidelberg, 2011. URL: https://doi.org/10.1007/978-3-642-19754-3_20.
  37. Jesper W. Mikkelsen. Optimal online edge coloring of planar graphs with advice. In Algorithms and Complexity - 9th International Conference, CIAC 2015, Paris, France, May 20-22, 2015. Proceedings, volume 9079 of Lecture Notes in Computer Science, pages 352-364. Springer, 2015. URL: https://doi.org/10.1007/978-3-319-18173-8_26.
  38. Jesper W. Mikkelsen. Randomization can be as helpful as a glimpse of the future in online computation. In 43rd International Colloquium on Automata, Languages, and Programming, ICALP 2016, July 11-15, 2016, Rome, Italy, volume 55 of LIPIcs, pages 39:1-39:14. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2016. URL: https://doi.org/10.4230/LIPIcs.ICALP.2016.39.
  39. Jayadev Misra and David Gries. A constructive proof of Vizing’s theorem. Information Processing Letters, 41(3):131-133, 1992. URL: https://doi.org/10.1016/0020-0190(92)90041-S.
  40. Ben Morris. Improved mixing time bounds for the thorp shuffle. Combinatorics, Probability and Computing, 22(1):118-132, 2013. URL: https://doi.org/10.1017/S0963548312000478.
  41. Joseph Naor, Aravind Srinivasan, and David Wajc. Online dependent rounding schemes. CoRR, abs/2301.08680, 2023. URL: https://doi.org/10.48550/arXiv.2301.08680.
  42. Prabhakar Raghavan and Eli Upfal. Efficient routing in all-optical networks. In Proceedings of the twenty-sixth annual ACM symposium on Theory of computing (STOC), pages 134-143, 1994. URL: https://doi.org/10.1145/195058.195119.
  43. Amin Saberi and David Wajc. The greedy algorithm is not optimal for on-line edge coloring. In 48th International Colloquium on Automata, Languages, and Programming, ICALP 2021, July 12-16, 2021, Glasgow, Scotland (Virtual Conference), volume 198 of LIPIcs, pages 109:1-109:18. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2021. URL: https://doi.org/10.4230/LIPIcs.ICALP.2021.109.
  44. Claude E. Shannon. A theorem on coloring the lines of a network. Journal of Mathematics and Physics, 28(1-4):148-152, 1949. URL: https://doi.org/10.1002/sapm1949281148.
  45. Michael Sipser and Daniel A. Spielman. Expander codes. IEEE Transactions on Information Theory, 42(6):1710-1722, 1996. URL: https://doi.org/10.1109/18.556667.
  46. V. G. Vizing. On an estimate of the chromatic class of a p-graph. Discret Analiz, 3:25-30, 1964. Google Scholar