A Simple Greedy Algorithm for Dynamic Graph Orientation

Graph orientations with low out-degree are one of several ways to efficiently store sparse graphs. If the graphs allow for insertion and deletion of edges, one may have to flip the orientation of some edges to prevent blowing up the maximum out-degree. We use arboricity as our sparsity measure. With an immensely simple greedy algorithm, we get parametrized trade-off bounds between out-degree and worst case number of flips, which previously only existed for amortized number of flips. We match the previous best worst-case algorithm (in $$\mathcal {O}\left( \log n\right) $$ O log n flips) for almost all values of arboricity and beat it for either constant or super-logarithmic arboricity. We also match a previous best amortized result for at least logarithmic arboricity, and give the first results with worst-case $$\mathcal {O}\left( 1\right) $$ O 1 and $$\mathcal {O}\left( \sqrt{\log n}\right) $$ O log n flips nearly matching out-degree bounds to their respective amortized solutions.