The Unimodularity Library is a software library written in C++
that implements an efficient algorithm for testing total unimodularity,
based on Seymour's decomposition theorem  for regular matroids.
The algorithm runs in O( (n+m)^5 ) time and is a simplified version
of the cubic algorithm of . The algorithm can also test for the
related properties of unimodularity and strong unimodularity.
The Unimodularity Library is published under the Boost Software License .
Version 1.2b (10/12/2012):
Version 1.2 (04/13/2012):
Fixed compilation error on Mac OS.
Thanks to Yvon Sauvageau for reporting the problem.
Version 1.1 (02/09/2012):
Users of the Polymake extension can now analyze the matroid decomposition.
Updated package documentation (including the experiments' documentation).
This is the official version corresponding to our article in Mathematical Programming Computation.
Version 1.0 (06/13/2011):
A bug in the graphicness test in versions before 1.1
may cause a graphic matrix to be not recognized as such.
Thanks to Paulo Seijas for reporting the problem.
Marc Pfetsch provided an update to make the extension compatible with Polymake version 2.11.
Released version 1.0 (the publication version).
Get the files unimodularity-library-1.2b.tar.gz,
which depends on the Boost Software Library (version 1.43.0 or later) . If you don't have boost installed,
Read the README file for instructions or simply try
to install the software. The main binary is called unimodulary-test;
it can be found in the src/ directory prior to installing.
In publications, please cite the library as follows:
M. Walter and K. Truemper, Implementation of a Unimodularity Test. To be published by Springer, Mathematical Programming Computation, volume 5, number 1, 2013.
Here is the bibtex entry.
For a first test of the program, create a file with the matrix:
1 0 0 1
1 1 0 0
0 1 1 0
0 0 1 1
1 1 1 1
Then invoke unimodulary-test with the file name as the only argument.
If you find out that your matrix is not t.u. and want to search for a violator, you should
add the -c option.
To use the library in C++, you need to create a
object and call the is_totally_unimodular function.
There are different versions of this function
if you want to obtain certificates for the answer.
As an alternative, use the
Experiments in the article "Implementation of a Unimodularity Test"
To repeat our experiments, fetch the test matrices
and follow the instructions in the README file.
P. D. Seymour. Decomposition of regular matroids.
J. Comb. Theory, Ser. B 28, 305-359, 1980.
A decomposition theory for matroids.
V. Testing of matrix total unimodularity,
J. Comb. Theory, Ser. B 49, 241-281, 1990.