Is there any method to randomly generate a totally unimodular matrix?
Any algorithm or code will be appreciated.
Is there any method to randomly generate a totally unimodular matrix?
Any algorithm or code will be appreciated.
Copyright © 2021 JogjaFile Inc.
The adjacency matrix of any bipartite graph is TU. You could randomly generate bipartite graphs using NetworkX, and just take their adjacency matrices. This wouldn't be able to get any TU matrix, but would be a way to easily generate random square TU matrices of arbitrary size.