QBoard » Advanced Visualizations » Viz - Others » What is the best way to visualize abstract concepts (algorithm/data structure)?

What is the best way to visualize abstract concepts (algorithm/data structure)?

  • What's the best way to "see what is happening" in an algorithm/data structure? If it's something like a binary search I just imagine a bunch of boxes in a row, and throwing half of them out each time. Is there something more powerful that will let us grok something as abstract as an algorithm/data structure?
    Clarification: I'm looking for something a little more general. Example: in order to visualize time - some people use a clock in there head but thats slow, whereas a more natural feel would be a globe and if you are trying to get a 'feel' for how an algorithm works you can imagine two objects moving in different directions on that globe.

     
      August 5, 2020 12:45 PM IST
    0
  • In general, animations are excellent for visualizing processes that occur over time, such as the execution of algorithms.
    For example, check out these animations: Animated Sort Algorthms
    Here's an animation that shows how the data structures work on MergeSort.
    Now, whether you want to spend time hooking up your algorithm to some kind of animated visualization is a different question!

      August 5, 2020 12:48 PM IST
    1
  • Algorithm animation was a big research area in the 1990s. Marc H. Brown, who was then at the Digital Systems Research Center, did a large amount of interesting work. The source code to his Zeus animation system is still available, and it would not be hard to get it set up. I played with Zeus years ago and if I remember correctly it ships with dozens of animations.

    They had a couple of 'festivals' where non-experts got together to animate new algorithms. You can see one of the reports (with still images) on the 1993 festival. YouTube has one of their videos Visualizing Combinatorial Structures.

      September 25, 2020 4:32 PM IST
    1
  • Describing something in terms of another thing is called analogy. You just did it with the binary search being a bunch of boxes. Just play with the student's prior knowledge.For instance, trees can be thought of linked-lists, with multiple "next" nodes, or they could be explained to the uninitiated as something similar to a hierarchy.

    As for concrete methods of explanation, graphs and state machines can be easily visualized with Graphviz. A very basic, directed graph can be expressed very simply:

    digraph G {
       A->B;
       B->C;
       C->D;
       D->B;
    }
      September 25, 2020 4:34 PM IST
    1