Hacker News new | ask | show | jobs
by r41nbowdash 3206 days 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/S00245ED1V01Y2...