Maintain a dynamic spanning forest of a graph under incremental updates