Tropical Semiring in Dyalog APL

4 pointsposted 13 hours ago
by ogogmad

1 Comments

ogogmad

13 hours ago

I feel like the rule against editorialising submissions makes it hard to say which this is interesting: You can find shortest paths in just four APL symbols. Change two of those symbols and you can solve systems of linear equations. Change them again, and...

Additionally, it shows that many CS problems are equivalent in some sense: They reduce to doing linear algebra over different semirings. GPU optimisation presumably comes free.