Affiliation:
1. University of Cambridge, Cambridge, United Kingdom
Abstract
Describing a problem using classical linear algebra is a very well-known problem-solving technique. If your question can be formulated as a question about real or complex matrices, then the answer can often be found by standard techniques.
It's less well-known that very similar techniques still apply where instead of real or complex numbers we have a closed semiring, which is a structure with some analogue of addition and multiplication that need not support subtraction or division.
We define a typeclass in Haskell for describing closed semirings, and implement a few functions for manipulating matrices and polynomials over them. We then show how these functions can be used to calculate transitive closures, find shortest or longest or widest paths in a graph, analyse the data flow of imperative programs, optimally pack knapsacks, and perform discrete event simulations, all by just providing an appropriate underlying closed semiring.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Cited by
7 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Synthesis of Incremental Linear Algebra Programs;ACM Transactions on Database Systems;2020-09-25
2. A congruence on the semiring of normal tropical matrices;Linear Algebra and its Applications;2018-10
3. Algebraic graphs with class (functional pearl);ACM SIGPLAN Notices;2017-10-31
4. Algebraic graphs with class (functional pearl);Proceedings of the 10th ACM SIGPLAN International Symposium on Haskell;2017-09-07
5. I Got Plenty o’ Nuttin’;A List of Successes That Can Change the World;2016