  An edge-coloring of a graph G is acyclic if it is a proper edge-coloring of G
and every cycle contains at least three colors. We prove that every graph with
maximum degree Delta has an acyclic edge-coloring with at most 4 Delta - 4
colors, improving the previous bound of 9.62 (Delta - 1). Our bound results
from the analysis of a very simple randomised procedure using the so-called
entropy compression method. We show that the expected running time of the
procedure is O(mn Delta^2 log Delta), where n and m are the number of vertices
and edges of G. Such a randomised procedure running in expected polynomial time
was only known to exist in the case where at least 16 Delta colors were
available. Our aim here is to make a pedagogic tutorial on how to use these
ideas to analyse a broad range of graph coloring problems. As an application,
also show that every graph with maximum degree Delta has a star coloring with 2
sqrt(2) Delta^{3/2} + Delta colors.
