We describe a simple, incremental algorithm that avoids this problem, and show how to implement it efficiently.
our new algorithm can be thought of as a probabilistic version of the Ramshaw and Marcus (1994) algorithm, for speeding up TBLs.