{"id":19372997,"url":"https://github.com/samreynoldsmath/msr","last_synced_at":"2026-06-15T08:31:18.427Z","repository":{"id":174269865,"uuid":"647493583","full_name":"samreynoldsmath/msr","owner":"samreynoldsmath","description":"Tools to compute the minimum semidefinite rank of a simple undirected graph","archived":false,"fork":false,"pushed_at":"2024-04-16T18:27:28.000Z","size":511,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-24T21:11:38.520Z","etag":null,"topics":["discrete-optimization","graph-theory","minimum-rank","semidefinite-programming"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samreynoldsmath.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-30T22:50:37.000Z","updated_at":"2024-04-03T17:30:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"9c5b4bc8-46db-4a48-8cf8-dd6c2157a918","html_url":"https://github.com/samreynoldsmath/msr","commit_stats":null,"previous_names":["samreynoldsmath/msr"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/samreynoldsmath/msr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samreynoldsmath%2Fmsr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samreynoldsmath%2Fmsr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samreynoldsmath%2Fmsr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samreynoldsmath%2Fmsr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samreynoldsmath","download_url":"https://codeload.github.com/samreynoldsmath/msr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samreynoldsmath%2Fmsr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34355157,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["discrete-optimization","graph-theory","minimum-rank","semidefinite-programming"],"created_at":"2024-11-10T08:26:14.382Z","updated_at":"2026-06-15T08:31:18.394Z","avatar_url":"https://github.com/samreynoldsmath.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MSR: Minimum Semidefinite Rank\r\nhttps://github.com/samreynoldsmath/msr\r\n\r\n## Description\r\nTools to compute the minimum semidefinite rank of a simple undirected graph.\r\n\r\nThe minimum semidefinite rank of a graph $G$, denoted by $\\text{msr}(G)$, is\r\nthe smallest rank of a positive semidefinite matrix $A$ such that $A$ is a\r\ngeneralized adjacency matrix of $G$;\r\nthat is, $A_{ij} \\neq 0$ if and only if $i \\neq j$ and $ij \\in E(G)$.\r\nEquivalently, $\\text{msr}(G)$ is the smallest dimension $d$ such that every\r\nvertex $i$ of $G$ can be assigned to a vector $x_i \\in \\mathbb{R}^d$ such for\r\neach $i \\neq j$, we have that $x_i \\cdot x_j \\neq 0$ if and only if\r\n$ij \\in E(G)$. Surprisingly, the graph invariant $\\text{msr}(G)$ can often be\r\ncomputed only by consideration of the graph structure, without the need to\r\nactually do any linear algebra.\r\n\r\n### Comments\r\n- This package began as a school project for a course on semidefinite\r\n\tprogramming (see the\r\n\t[final report](doc/mth610-semidefprog-final-report-reynolds.pdf)).\r\n - In addition to SDP, this package also uses combinatorial techniques to\r\n\tcompute bounds on the MSR, some of which are well-known in the literature,\r\n\tand some of which are still under development.\r\n - The package uses a custom graph representation, but supports conversion\r\n  \tto\\from [networkx](https://networkx.org/) graphs.\r\n- The package is not designed with efficiency in mind, and probably will not\r\n\tscale well to large graphs.\r\n\r\n## Installation\r\nInstall the package with pip:\r\n```bash\r\npip install msr\r\n```\r\n\r\n## Dependencies\r\nThis project is written in Python 3.11 and uses the following packages:\r\n- [cvxpy](https://www.cvxpy.org/) is used to solve semidefinite programs\r\n- [matplotlib](https://matplotlib.org/) is used for visualization\r\n- [networkx](https://networkx.org/) is used for graph isomorphism testing\r\n- [tqdm](https://tqdm.github.io/) is used for progress bars\r\n\r\nMoreover, examples are written in [Jupyter notebooks](https://jupyter.org/).\r\n\r\n## License\r\nCopyright (c) 2023 -- 2024 Samuel Reynolds, released under the [MIT license](LICENSE).\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamreynoldsmath%2Fmsr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamreynoldsmath%2Fmsr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamreynoldsmath%2Fmsr/lists"}