1 / 54

Algorithm Visualization (AV)

Algorithm Visualization (AV). Pei-Chia Chang Supervised by: Dr. Jan Stelovsky Nov 19, 2004. Algorithm. A set of instructions or procedures for solving a problem.[1] A rule, set of rules or a formula for solving a problem. A set of computer statements for doing a particular job [2].

zeki
Download Presentation

Algorithm Visualization (AV)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Algorithm Visualization(AV) Pei-Chia Chang Supervised by: Dr. Jan Stelovsky Nov 19, 2004

  2. Algorithm • A set of instructions or procedures for solving a problem.[1] • A rule, set of rules or a formula for solving a problem. A set of computer statements for doing a particular job [2]

  3. Algorithm Visualization (AV) • AV is the use of computer graphics and animations to help illustrate and present algorithms. [3] • So why use AV?

  4. Motivation • Algorithm – the method to tell computer to do things for you. • Is there any better visual interface for programmers and students to trace codes? • What utility can help programmers develop programs faster? • How the abstract ideas work? • Collaborative visualization?

  5. What makes programming hard? • An experiment carried out by S. A. Curtis, Oxford Brookes University[4] • For learning basic programming skills: • Some people have difficulties getting problem solution out of their head and into code.

  6. What makes programming hard? • The learning gap ? Problem statements Program codes

  7. What makes programming hard? • The Challenge: • when a student can solve it subconsciously but not consciously.

  8. Mental Models and Programming • Two types of mental model: • Functional models (how to use the system) • Structural mental models (how a certain system works ) • http://www.cs.umd.edu/class/fall2002/cmsc838s/tichi/knowledge.html • Initially, students have a functional mental model of what computers/programs do ...but a poor structural mental model • Ultimately, we want students to have a good structural model of programming • being able to program necessitates understanding of structure

  9. Solution • Examples!

  10. Frightening Symbol!

  11. But graph not • http://functions.wolfram.com/ElementaryFunctions/Sinh/visualizations/15.html http://www.codeguru.com/Cpp/Cpp/algorithms/article.php/c5129/

  12. Visualization Effectiveness • Provide a reasonable, visual interface to the underlying theories. • Provide program understanding. • Can be used in teaching to help students understand how algorithms work, and they can be used in program development as a way to help programmers understand their code better.

  13. Information visualization • Visualization technique • Interaction and distortion technique

  14. Visualization technique • Standard 2D/3D displays, such as bar charts and x-y plots. • Geometrically transformed displays • Icon-based displays • Dense pixel displays • Stacked displays

  15. Standard 2D/3D displays

  16. Geometrically transformed displays

  17. Icon-based displays

  18. Icon-based displays

  19. Dense pixel displays

  20. Stacked displaysTreemaps[http://www.cs.umd.edu/hcil/academics/courses/fall1999/cmsc838s/presentations/johnson.ppt]

  21. Stacked displaysDimensional stacking[http://davis.wpi.edu/~xmdv/vis_dimstack.html]

  22. Interaction and distortion technique • Interactive projection • Interactive filtering • Interactive zooming • Interactive distortion • Interactive linking and brushing

  23. Interactive projection[http://www.jstatsoft.org/v02/i06/paper.pdf]

  24. Interactive filtering

  25. Interactive zooming

  26. Interactive Distortion

  27. Interactive Linking

  28. Interactive Brushing

  29. AV examples • A 3D View of Heap sort • A 2D view with interactions

  30. A 3D View of Heap sort [http://www.research.compaq.com/SRC/zeus/heapsort3D.html]

  31. http://www2.hawaii.edu/~copley/665/HSApplet.html

  32. AV: Heap sort • Visualization technique used: 2D, 3D display • Interaction and distortion technique used: zooming, distortion

  33. Reviews • Not adaptive. • Have to create a new visualization effect for each algorithm. • Not modularization

  34. Thoughts • Take advantage of the OOP! • The magic XML tags. • How JAVA become successful! – modularization, reuse ability • The power of collaborative programming. • Extendable Algorithm Visualization. (EAV)

  35. EAV Framework Controller Utility Interface View1 Parser View2 UserCodes Database View n

  36. Hit the road • Start with education: • ICS311 is not difficult anymore. • The cognitive process can now be validated.

  37. Extendable Algorithm Visualization How? • Create visual packages. • Use tags • Embedded in IDE/compiler

  38. Visual packages • Extend existing Java packages and add visual effects. • Need a “stage/platform/container” to perform the animation • Pros: extensibility, can be customerized • Cons: need good API, documents and must be easy to use, otherwise, programmers won’t bother to use it.

  39. Tags • Use tags to specify the purpose and location of a given code section. • Use attributes in the tags to indicate the visualization effect. • Pros: extensibility, can be customerized • Cons: need a parser, programmers need to learn another language (for tags).

  40. Embedded in IDE/compiler • Provide user interface for programmers to specify the visual effects. • Embedded all the annoying work in IDE/compiler • Pros: less work for programmers, easy to use with good UI. • Cons: Huge tasks! Infeasible. Need to write a parser, and produce the result.

  41. However, studies reveals.. • AV is good for beginner but several studies discovered that AV is not that powerful if there’s no interactions. • Also, for advanced students, there’s no significant differences.

  42. Scenarios.. • Algorithm animation for CS beginner. • Visualized Debugger for advanced programmers!

  43. Debugger

  44. Visual Debugger Prototype

  45. Extendable Algorithm Visualization • Create your own algorithm!!

  46. Evaluations • Experiments with beginners. • Experiments with senior students. • Visual Debugger scenarios

  47. References • [1]www.davcomuk.co.uk/files/tech/glossary.htm • [2] www.oznet.ksu.edu/ed_asi490/Glossary/cgw.htm • [3] Algorithm Animation http://www.research.compaq.com/SRC/zeus/home.html • [4] http://wwwcms.brookes.ac.uk/ltg/docs/seminars/DiffLearnProg.ppt • [5] Software Visualization Arne Frickhttp://www.info.uni-karlsruhe.de/~frick/SoftVis/ • [6] Daniel A. Keim, Information Visualization and Visual Data Mining, IEEE TRANSACTIONS ON VISUALIZATION AND COMPUTER GRAPHICS, VOL. 7, NO. 1, JANUARY-MARCH 2002

  48. References • [7] CHRISTOPHER D. HUNDHAUSEN, SARAH A. DOUGLAS ANDJOHN T. STASKOz, “AMeta-Study of AlgorithmVisualization E¡ectiveness”, • [8] D. Tang C. Stolte and P. Hanrahan, “Polaris: A system for query, analysis and visualization of multi-dimensional relational databases,” Transactions on Visualization and Computer Graphics, 2001. • [9] J. Abello and J. Korn, “Mgv: A system for visualizing massive multi-digraphs,” Transactions on Visualization and Computer Graphics, 2001. • [10] N. Lopez M. Kreuseler and H. Schumann, “A scalable framework for information visualization,” Transactions on Visualization and Computer Graphics, 2001.

  49. Appendix • More AVs • http://www.research.compaq.com/SRC/JCAT/

  50. Structural and Functional mental models •         In the early 1980's, two basic mental models were identified, which are Structural and functional models. Structural models define facts the user has about how a certain system works. Its basic advantage is that the knowledge of how a device or system works can predict the effect of any possible sequence of actions, meanwhile constructing such a model in mind involves a great deal of effort .On the other hand, functional models, also called task-action mapping models,  are procedural knowledge about how to use the system. The main advantage of functional models is that they can be constructed from existing knowledge about a similar domain or system. Structural models are context free while functional models are context sensitive. • http://www.cs.umd.edu/class/fall2002/cmsc838s/tichi/knowledge.html

More Related