Algorithms In Action - Quicksort

Recommendation

Recommended

Link

http://ww2.cs.mu.oz.au/aia/demoindex.html

Delivery Method

Java Applet

License

Unavailable

Language

English

Author

Linda Stern; Lee Naish; Harald Sondergaard

Institution

University of Melbourne

Project

AlgorithmsInAction

RelationshipToProject

PartOfProject

Works

Yes

Description

The application works well and shows nice, intuitive visualizations. The application launches four different windows that can be a positive or negative thing. It may make it easy to handle each window separately or alternatively it can cause difficulties for overall attention. There are Explanation window, Algorithm window (showing program code), "AIA: Quicksort window" (for showing animation) and Help window. The general impression about user interface is good. In the Algorithm window the user can see the program code either in real program code mode or in natural language mode. It is beneficial to have lot of assistive comments available for observing the process of sorting. By clicking parts of the program code it is possible to get some explanation in natural language to Explanation window. The Help window offers advice about what the user can do with each clickable item in Algorithm window or "AIA: Quicksort window". The "AIA: Quicksort window" shows a set of randomized numbers and right above them vertical bars with varying length that corresponds to the size of each number. In the windows there are also buttons with names Step, Back, Run, Pause and Reset, as well as set of menu controls for fine-tuning. The basic functionality is based on seeing first the vertical bars in a randomized order and step by step the algorithm will arrange the bars into ascending or descending order.

Evaluation

Colors are used to show the partitions, the sorted elements and the inactive elements. They clearly show the pivot and the partition boundaries and the top and bottom values (unfortunately, these are labeled with the uninformative i and j). It also builds a hierarchy in a second sub-visualization that shows each sub array as it is being sorted, giving a nice picture of how the array is being divided up. For animation control, there is a speed control as well as pause, step and back buttons. There are a number of options for data – random, sorted, reverse sorted, all equal and user entered. A very nice feature is the ability to pick different pivot choosing algorithms (right, random, middle of three random and middle of three). Unfortunately, the overview doesn’t explain this as well as it could. The source code display shows fully commented source code for the algorithm. Unfortunately, this proves less useful when the visualization is actually running. A nice feature is that the code is instrumented to be foldable - replacing a collection of steps (like a swap) with a high level piece of pseudocode. Even better, this affects the visualization - when steps have been abstracted away they happen atomically in the visualization. The quiz is less useful. It can’t be used in conjunction with the visualization and mostly asks questions that can be answered (or perhaps even have to be answered) as the result of memorizing some of the overview explanation rather than as a result of working with the visualization. Also, while it provides feedback after each question, it doesn’t give any sort of final assessment of the overall score. The biggest drawback with this tool is that the authors didn’t seem to be very familiar with GUI programming and in particular the widget set available for Java. Rather than using panes, each part of the tool ends up in its own window (possibly the cause of the stack dumps on the Mac). This is cluttered and hard to manage. Things like the explanation window are easy to lose or overlook. The code folding is implemented with what looks like an abused file browser as each abstract line is decorated with a folder icon. The tool for changing the highlight color consists of three tiny custom RGB sliders and the custom data entry pane has to been seen to be believed. In addition, there seems to be a bug in the quiz code. There are actually three “modes”: the normal one, one called “self test” and the quiz. When I tried “self test” the only thing that seemed to happen is that the overview window was hidden. Even odder, when I went to the quiz mode, the overview came back (particularly startling as the answers to most of the questions were in that window).

ActivityLevel

Animation; Step Control; Canned Data; Random Data

GoodFor

Lecture Aid; Self Study

Screenshots

Quick Sort 1 Quick Sort 2

Videos

References

HowToUse

The link above takes you to the AIA demonstration index page. Click on the link to the desired AV, and it should load in your browser as a multi-paned Java applet. Note that the level of detail shown in the visualization is directly tied to the level of detail that you choose to expose in the pseudocode pane.

First Visited

2006-11-07

Last Visited

2010-02-10

Last Updated

2000

Topic

QuickSort

Community

Average rating: unrated
Your rating:You must be logged in to Rate.
Comments

Edit

You may edit this entry if you have an account.