simulation for 4 algorithms in my paper by PHP