Visualizing Incidence Algebras



Given a partially ordered set, this can result in an incidence algebra. Visualizing, quickly, all of the resulting transitivity relations can be a laborous task. This project seeks to make the visualization of resulting incidence algebras easy. A user should be able to input a matrix representation of a relation (this can be either total, partial, or some manner in between), and the total ordering should be output as another matrix as well as a reduced Hasse diagram.


For ease of deployment, compiling to a single executable file is paramount. This implies that only libraries inherent to Python can be leveraged because other programs cannot be assumed to be installed on the user's system. The use of inherent Python libraries will then be a major restriction, as graphvis is the standard visualization aid for Hasse diagrams, but graphvis is a standalone program.

Tkinter is used as the framework for the Python graphical interface, with a back-end of NetworkX. NetworkX is used to represent the input matrix as a directed graph. Transitivity in the ordering is then reduced to whether or not a path exists between two nodes in the graph. This translation to graphs leverages the wealth of algorithms and optimizations from NetworkX. 


When launched, the program prompts the user to determine the size of the input matrix. Once this is done, an input window is created for the user to input 1's in the places where a relationship between elements exists. When desired, the user can calculate the resulting incidence algebra. Another window will be displayed to the user including the resulting total ordering as a matrix and the resulting Hasse diagram.

Availability of Code

The project can be compiled with the use of pyinstaller from my github project here. The first line of the python source file contains the command to compile the project into a single executable file.