3 ms·
fun fact: you can run shortest path algorithms on pretty much everything as long as it fulfills the monoid constraints (taking min and combining paths, operatin
by r41nbowdash 9y ago
fun fact: you can run shortest path algorithms on pretty much everything as long as it fulfills the monoid constraints (taking min and combining paths, operating on distances is a monoid)
so basically, for the cost of implementing two operations you can reuse dijkstra or bellman-ford to do crazy stuff like belief propagation etc
http://www.morganclaypool.com/doi/abs/10.2200/S00245ED1V01Y201001CNT003 http://www.morganclaypool.com/doi/abs/10.2200/S00245ED1V01Y2...