David Wilson (at Microsoft Research) designed a very simple algorithm for counting uniform spanning trees that mathematicians study as well as theoretical computer scientists. Not entirely sure how UST can be used in software engineering, but we implement it in Python and output the result in d3.js
The paper Trees and Matchings makes for any interesting reading on the cusp between combinatorics, statiscal mechanics and theoretical computer science.
Manually:
- place all files in the same folder
- run
ust.py
(can give you UST of any size, but just usen = 30
) which outputs ust.txt - open
ust.html
readsust.txt
and produces a nice iage. - possible you need to set up a server due to same-origin-policy issues
If you give me a few minutes, I can write a Bottle.py server that does all this for you.
As it runs now:
- place all files in the same folder
- run
server.py
- go to
localhost:8080/