https://github.com/samreynoldsmath/msr
Tools to compute the minimum semidefinite rank of a simple undirected graph
https://github.com/samreynoldsmath/msr
discrete-optimization graph-theory minimum-rank semidefinite-programming
Last synced: 12 months ago
JSON representation
Tools to compute the minimum semidefinite rank of a simple undirected graph
- Host: GitHub
- URL: https://github.com/samreynoldsmath/msr
- Owner: samreynoldsmath
- License: mit
- Created: 2023-05-30T22:50:37.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-16T18:27:28.000Z (almost 2 years ago)
- Last Synced: 2025-02-07T01:47:00.630Z (about 1 year ago)
- Topics: discrete-optimization, graph-theory, minimum-rank, semidefinite-programming
- Language: Python
- Homepage:
- Size: 499 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MSR: Minimum Semidefinite Rank
https://github.com/samreynoldsmath/msr
## Description
Tools to compute the minimum semidefinite rank of a simple undirected graph.
The minimum semidefinite rank of a graph $G$, denoted by $\text{msr}(G)$, is
the smallest rank of a positive semidefinite matrix $A$ such that $A$ is a
generalized adjacency matrix of $G$;
that is, $A_{ij} \neq 0$ if and only if $i \neq j$ and $ij \in E(G)$.
Equivalently, $\text{msr}(G)$ is the smallest dimension $d$ such that every
vertex $i$ of $G$ can be assigned to a vector $x_i \in \mathbb{R}^d$ such for
each $i \neq j$, we have that $x_i \cdot x_j \neq 0$ if and only if
$ij \in E(G)$. Surprisingly, the graph invariant $\text{msr}(G)$ can often be
computed only by consideration of the graph structure, without the need to
actually do any linear algebra.
### Comments
- This package began as a school project for a course on semidefinite
programming (see the
[final report](doc/mth610-semidefprog-final-report-reynolds.pdf)).
- In addition to SDP, this package also uses combinatorial techniques to
compute bounds on the MSR, some of which are well-known in the literature,
and some of which are still under development.
- The package uses a custom graph representation, but supports conversion
to\from [networkx](https://networkx.org/) graphs.
- The package is not designed with efficiency in mind, and probably will not
scale well to large graphs.
## Installation
Install the package with pip:
```bash
pip install msr
```
## Dependencies
This project is written in Python 3.11 and uses the following packages:
- [cvxpy](https://www.cvxpy.org/) is used to solve semidefinite programs
- [matplotlib](https://matplotlib.org/) is used for visualization
- [networkx](https://networkx.org/) is used for graph isomorphism testing
- [tqdm](https://tqdm.github.io/) is used for progress bars
Moreover, examples are written in [Jupyter notebooks](https://jupyter.org/).
## License
Copyright (c) 2023 -- 2024 Samuel Reynolds, released under the [MIT license](LICENSE).