Teaching and Learning Graph Algorithms Using Animation

Y. Daniel Liang

Volume 9, Issue 2 (December 2018), pp. 23–29


PDF icon Download PDF

  author={Y. Daniel Liang},
  title={Teaching and Learning Graph Algorithms Using Animation},
  journal={The Journal of Computational Science Education},
Copied to clipboard!

Graph algorithms have many applications. Many real-world problems can be solved using graph algorithms. Graph algorithms are commonly taught in the data structures, algorithms, and discrete mathematics courses. We have created two animations to visually demonstrate the graph algorithms. The first animation is for depth-first search, breadth-first search, shortest paths, connected components, finding bipartite sets, and Hamiltonian path/cycle on unweighted graphs. The second animation is for the minimum spanning trees, shortest paths, travelling salesman problems on weighted graphs. The animations are developed using HTML, CSS, and JavaScript and are platform independent. They can be viewed from a browser on any device. The animations are useful tools for teaching and learning graph algorithms. This paper presents these animations.