« www.tkk.fi « CSE « SVG

Skip to main content

Matrix - Algorithm Simulation Framework

Matrix is a portable algorithm simulation framework, which provides an extensive component library that allows the user to manipulate fundamental data types such as arrays, linked lists, trees, and graphs as well as their composites. In addition, the library includes a number of conceptual data types that can also be manipulated in terms of algorithm simulation. The system also stores the manipulation process, and thus allows the user to create algorithm animations without writing any code.

One of the applications for Matrix is MatrixPro that is intended to be used as a demostration tool, for example, in lectures. The system also makes it possible to create algorithm simulation exercises for students. These execises can be evaluated, in order to give feedback for the student of the correctness of his or her simulation. Matrix has also been used to create Trakla2 in order to publish such exercises. For more information about applications created using Matrix, see the applications page.


Algorithm animation is a process where an algorithm manipulates data structures in such way that the operations and the resulting changes in the structures are visualized for the user. In general, algorithm animation is based on observing the working of actual implemented algorithm code.

Algorithm simulation is a process where the user directly manipulates data structures in the memory by using tools and operations available in a graphical user interface. No user written code is needed. Instead, the user performs similar operations as an algorith would do and the simulation system executes the actual changes in the physical data structure. The user can, for example, create new nodes or edges, remove nodes or edges, attach nodes to each other, change the contents or attributes of nodes, swap two nodes etc. Simple drag&drop operations and some menu commands facilitate these possibilities.

Moreover, the user can also specify that he manipulates some abstract data type, like a binary search tree. Then the system understands operations like insert and delete thus enabling the student to survey the behaviour of the data structure with different input data.