Transitive closure and related semiring properties via eliminants
Theoretical Computer Science
A generalized theory of bit vector data flow analysis
ACM Transactions on Programming Languages and Systems (TOPLAS)
Global Data Flow Analysis and Iterative Algorithms
Journal of the ACM (JACM)
Communications of the ACM
The Design and Analysis of Computer Algorithms
The Design and Analysis of Computer Algorithms
Semiring frameworks and algorithms for shortest-distance problems
Journal of Automata, Languages and Combinatorics
Solving path problems on directed graphs.
Solving path problems on directed graphs.
Journal of Functional Programming
Hi-index | 0.00 |
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.