Comparison between different graph algorithms