home *** CD-ROM | disk | FTP | other *** search
Text File | 1985-02-28 | 2.3 KB | 46 lines | [TEXT/MACA] |
-
- Date: Tue, 26 Feb 85 17:10:48 EST
- From: winkler@harvard.ARPA (Dan Winkler)
-
- Here are two animated Macintosh programs I've written, SimuTree and
- SimuNet. (I'm open for better names.)
-
- SimuTree is an animated tree program which is similar to handson except
- that it also does AVL trees and self-adjusting trees, not just binary
- trees. Just type characters to insert nodes. If you change tree
- types without first clearing the nodes in the current tree, it
- reinserts the same input sequence into the new tree type. There is an
- undo feature that lets you watch the same insertion several times.
- There is an insert random feature that lets you build random trees (it
- uses the Random() function in QuickDraw). You can adjust the speed of
- the animation by choosing whether the program should pause, stop, or
- continue full speed ahead after each message it prints. If you choose
- stop, the program will wait for a keydown or mousedown before
- proceeding. It counts steps needed for each insertion to give you
- some idea of the relative efficiency of each tree type.
-
- SimuNet is an animation of Valiant's randomized packet switching
- algorithm which shows packets moving between queues in nodes
- positioned at the vertices of a hypercube. The point of the animation
- is that there are permutations which cause very bad traffic jams when
- all packets move along the shortest path to their destinations but
- that if you send each packet first to a random destination and then
- along the shortest path to its real destination, you avoid the traffic
- jams. This program takes a few seconds to start up; be patient.
-
- These programs were inspired by Brown's BALSA system. SimuNet has
- never been used for anything except amusing Valiant and me. SimuTree
- is being used this semester at Harvard in Computer Science 124, a
- course on data structures and algorithms. Both programs are stable
- but far from finished. SimuTree needs 2-3, B, and B* trees, a better
- redrawing algorithm, scrolling, and node labels longer than a single
- character. I know how to do all those enhancements but am quite busy
- right now and my recent rejection from Harvard Computer Science
- graduate school has killed my former enthusiasm for pouring hundreds
- of hours into Harvard projects.
-
- If you want source, you can have it. It's written in Manx C.
-
- Dan. (winkler@harvard)
-
-