simulation for visualisation of graph algorithms