https://github.com/ddsuhaimi/spanning_grid_counter
A script to count spanning trees in an m by n grid graph
https://github.com/ddsuhaimi/spanning_grid_counter
graph spanning-trees
Last synced: over 1 year ago
JSON representation
A script to count spanning trees in an m by n grid graph
- Host: GitHub
- URL: https://github.com/ddsuhaimi/spanning_grid_counter
- Owner: ddsuhaimi
- Created: 2019-06-13T18:39:32.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-18T13:14:23.000Z (almost 7 years ago)
- Last Synced: 2025-01-05T13:11:12.922Z (over 1 year ago)
- Topics: graph, spanning-trees
- Language: Python
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Calculate number of spanning tree of a grid graph
The code uses matrix tree theorem. Basically, we compute adjacency matrix and then form Laplacian matrix. We then compute any cofactor of said Laplacian matrix. The result is the number of spanning trees.