Acta Informatica

, Volume 55, Issue 1, pp 57–80 | Cite as

Online edge coloring of paths and trees with a fixed number of colors

  • Lene M. Favrholdt
  • Jesper W. Mikkelsen
Original Article


We study a version of online edge coloring, where the goal is to color as many edges as possible using only a given number, k, of available colors. All of our results are with regard to competitive analysis. Previous attempts to identify optimal algorithms for this problem have failed, even for bipartite graphs. Thus, in this paper, we analyze even more restricted graph classes, paths and trees. For paths, we consider \(k=2\), and for trees, we consider any \(k \ge 2\). We prove that a natural greedy algorithm called \({\textsc {First-Fit}}\) is optimal among deterministic algorithms, on paths as well as trees. For paths, we give a randomized algorithm, which is optimal and better than the best possible deterministic algorithm. For trees, we prove that to obtain a better competitive ratio than \({\textsc {First-Fit}}\), the algorithm would have to be both randomized and unfair (i.e., reject edges that could have been colored), and even such algorithms cannot be much better than \({\textsc {First-Fit}}\).



The authors would like to thank the anonymous reviewers for helpful comments on this work and its presentation.


  1. 1.
    Bach, E., Boyar, J., Epstein, L., Favrholdt, L.M., Jiang, T., Larsen, K.S., Lin, G.-H., van Stee, R.: Tight bounds on the competitive ratio on accommodating sequences for the seat reservation problem. J. Sched. 6(2), 131–147 (2003)MathSciNetCrossRefzbMATHGoogle Scholar
  2. 2.
    Bar-Noy, A., Motwani, R., Naor, J.S.: The greedy algorithm is optimal for on-line edge coloring. Inf. Process. Lett. 44(5), 251–253 (1992)MathSciNetCrossRefzbMATHGoogle Scholar
  3. 3.
    Borodin, A., El-Yaniv, R.: Online computation and competitive analysis. Cambridge University Press, Cambridge (1998)zbMATHGoogle Scholar
  4. 4.
    Boyar, J., Favrholdt, L.M.: The relative worst order ratio for online algorithms. ACM Trans. Algorithms 3(2), 22 (2007)MathSciNetCrossRefzbMATHGoogle Scholar
  5. 5.
    Boyar, J., Favrholdt, L.M., Larsen, K.S.: The relative worst-order ratio applied to paging. J. Comput. Syst. Sci. 73, 818–843 (2007)MathSciNetCrossRefzbMATHGoogle Scholar
  6. 6.
    Boyar, J., Larsen, K.S.: The seat reservation problem. Algorithmica 25(4), 403–417 (1999)MathSciNetCrossRefzbMATHGoogle Scholar
  7. 7.
    Chen, Z.-Z., Konno, S., Matsushita, Y.: Approximating maximum edge 2-coloring in simple graphs. Discrete Appl. Math. 158(17), 1894–1901 (2010)MathSciNetCrossRefzbMATHGoogle Scholar
  8. 8.
    Ehmsen, M.R., Favrholdt, L.M., Kohrt, J.S., Mihai, R.: Comparing first-fit and next-fit for online edge coloring. Theor. Comput. Sci. 411(16–18), 1734–1741 (2010)MathSciNetCrossRefzbMATHGoogle Scholar
  9. 9.
    Favrholdt, L.M., Nielsen, M.N.: On-line edge-coloring with a fixed number of colors. Algorithmica 35(2), 176–191 (2003)MathSciNetCrossRefzbMATHGoogle Scholar
  10. 10.
    Feige, U., Ofek, E., Wieder, U.: Approximating maximum edge coloring in multigraphs. In: Proceedings of the 5th international workshop on approximation algorithms for combinatorial optimization, volume 2462 of LNCS, pp. 108–121 (2002)Google Scholar
  11. 11.
    Kamiński, M., Kowalik, Ł.: Beyond the Vizing’s bound for at most seven colors. SIAM J. Discrete Math. 28(3), 1334–1362 (2014)MathSciNetCrossRefzbMATHGoogle Scholar
  12. 12.
    Karlin, A.R., Manasse, M.S., Rudolph, L., Sleator, D.D.: Competitive snoopy caching. Algorithmica 3, 77–119 (1988)MathSciNetCrossRefzbMATHGoogle Scholar
  13. 13.
    Kierstead, H.A.: Coloring graphs on-line. In Online Algorithms, pp. 281–305. Springer (1998)Google Scholar
  14. 14.
    Kosowski, A.: Approximating the maximum 2- and 3-edge-colorable subgraph problems. Discrete Appl. Math. 157(17), 3593–3600 (2009)MathSciNetCrossRefzbMATHGoogle Scholar
  15. 15.
    Rizzi, R.: Approximating the maximum 3-edge-colorable subgraph problem. Discrete Math. 309(12), 4166–4170 (2009)MathSciNetCrossRefzbMATHGoogle Scholar
  16. 16.
    Sleator, D.D., Tarjan, R.E.: Amortized efficiency of list update and paging rules. Commun. ACM 28(2), 202–208 (1985)MathSciNetCrossRefGoogle Scholar
  17. 17.
    Yao, A.C-C.: Probabilistic computations: toward a unified measure of complexity (extended abstract). In: Proceedings of the 18th Annual Symposium on Foundations of Computer Science, pp. 222–227 (1977)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2016

Authors and Affiliations

  1. 1.Department of Mathematics and Computer ScienceUniversity of Southern DenmarkOdense MDenmark

Personalised recommendations