Discussion about algorithm termination
change introduction to algorithm section and fix references