Graph Editor Window

Depth-first Search

Breadth-first Search

## Graph Teacher

*Post a comment View Comments (0)*

This was a class project. It was an educational graph algorithm teacher application. Only graph editing, Breadth-first, and Depth-first was implemented. I wrote this using delphi 7.

It is an good tool in the classroom to teach Depth-first/Breadth-first searches.

An english translation can be downloaded from here *[en]* .

The original hungarian version can be downloaded from here *[hu]* .

### Features

- Editor: (editor.exe)
- Can create weighted/unweighted graphs
- Can create directed/undericted graphs
- While editing the graph it is possible to drag and drop the nodes around
- There is also a matrix representation that can be edited
- Algorithm teacher: (algorithms.exe/algoritmusok.exe)
- Can open up graphs created by the editor
- Each algorithm is composed of multiple smaller windows that can be moved and resized inside the main window
- All presented algorithms contain:
- The Adjacency Matrix of th Graph (A gráf szomszédsági mátrixa
*[hu]*) - a graphical representation of the graph with movable nodes. The color of each node and edge gives information about the state of the simulation.
- a description window for the algorithm (Magyarázat
*[hu]*) - a pascal-like pseudocode window (Az algoritmus
*[hu]*) - it is possible to step trough the algorithm using the Control window. It is like in most debuggers, but all information is presented in a much clearer way. (Indítás = Start, Tovább = Next step, Végeredmény = Results)
- a result output window (Kimenet
*[hu]*) - Depth-first search:
- There is a "visited" array window (T=visited, F=not visited) (A "Láttam" tömb
*[hu]*) - The call stack of the backtracking is shown in the Call Stack and local variables window. (Verem
*[hu]*) - The current considered node is colored green (the node that is on the top of the backtracking stack)
- Nodes that have been visited in the past are colored yellow
- The current edge that is considered is colored red
- The edges that led to the current node from the starting node are colored blue
- Breadth-first search:
- There is a 'visited' array window just as for the Depth-first search
- There is a FIFO window. The first item that will come out of the FIFO buffer is marked with a 'S' (K in
*[hu]*), and the last item to go in is marked with a 'V' (E in*[hu]*) (A várakozási sor*[hu]*) - Nodes that have been visited in the past are colored green
- The current considered node is colored yellow (the one in the Node
*[en]*/ Szögpont*[hu]*variable) - all the nodes in the FIFO buffer are colored purple
- Graphs are saved into their own text files. The list of accessible graphs is kept in graphs.txt
*[en]*/grafok.txt*[hu]*