Abstract
It is a known fact that many graph problems can be restated in terms of an algebraic setting. One particular operation that arises in such a setting is the multiplication of a vector with a matrix. Depending on the underlying algebra the multiplication can carry different reachability semantics (e.g. no additional information, single path prolongation, all path prolongation). We propose an abstraction of this operation that is easily implemented in the functional programming language Haskell, explore the associated framework and provide several applications.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Berghammer, R.: A functional, successor list based version of warshall’s algorithm with applications. In: de Swart, H. (ed.) RAMICS 2011. LNCS, vol. 6663, pp. 109–124. Springer, Heidelberg (2011)
Chakravarty, M.M.T., Keller, G.: An approach to fast arrays in haskell. In: Jeuring, J., Jones, S.L.P. (eds.) AFP 2002. LNCS, vol. 2638, pp. 27–58. Springer, Heidelberg (2003)
Danilenko, N.: Using relations to develop a haskell program for computing maximum bipartite matchings. In: Kahl, W., Griffin, T.G. (eds.) RAMICS 2012. LNCS, vol. 7560, pp. 130–145. Springer, Heidelberg (2012)
Dinitz, Y.: Dinitz’ algorithm: the original version and even’s version. In: Goldreich, O., Rosenberg, A.L., Selman, A.L. (eds.) Theoretical Computer Science. LNCS, vol. 3895, pp. 218–240. Springer, Heidelberg (2006)
Dolan, S.: Fun with semirings: a functional pearl on the abuse of linear algebra. In: Morrisett, G., Uustalu, T. (eds.) ICFP 2013, pp. 101–110. ACM (2013)
Elliott, C.: Reimagining Matrices. www.conal.net/blog/posts/reimagining-matrices
Erwig, M.: Inductive Graphs and Functional Graph Algorithms. J. Funct. Program. 11(05), 467–492 (2001)
Hinze, R., Paterson, R.: Finger Trees: A Simple General-Purpose Data Structure. J. Funct. Program. 16(2), 197–217 (2006)
Hopcroft, J.E., Karp, R.M.: An n\(^{\text{5/2 }}\) Algorithm for Maximum Matchings in Bipartite Graphs. SIAM J. Comput. 2(4), 225–231 (1973)
Johnsson, T.: Efficient Graph Algorithms Using Lazy Monolithic Arrays. J. Funct. Program. 8(4), 323–333 (1998)
King, D.J., Launchbury, J.: Structuring depth-first search algorithms in haskell. In: Cytron, R.K., Lee, P. (eds.) POPL, pp. 344–354. ACM (1995)
Kozen, D.: On kleene algebras and closed semirings. In: Rovan, B. (ed.) MFCS 1990. LNCS, vol. 452, pp. 26–47. Springer, Heidelberg (1990)
Lesniak, M.: Palovca: describing and executing graph algorithms in haskell. In: Russo, C., Zhou, N.-F. (eds.) PADL 2012. LNCS, vol. 7149, pp. 153–167. Springer, Heidelberg (2012)
Liang, S., Hudak, P., Jones, M.: Monad transformers and modular interpreters. In: Cytron, R.K., Lee, P. (eds.) POPL, pp. 333–343. ACM (1995)
Marlow, S.: The Haskell report. www.haskell.org/onlinereport/haskell2010
Rabhi, F., Lapalme, G.: Algorithms - A Functional Programming Approach. Addison-Wesley (1999)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2015 Springer International Publishing Switzerland
About this paper
Cite this paper
Danilenko, N. (2015). Graph Problems and Vector-Matrix Multiplications in Haskell. In: Hage, J., McCarthy, J. (eds) Trends in Functional Programming. TFP 2014. Lecture Notes in Computer Science(), vol 8843. Springer, Cham. https://doi.org/10.1007/978-3-319-14675-1_4
Download citation
DOI: https://doi.org/10.1007/978-3-319-14675-1_4
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-14674-4
Online ISBN: 978-3-319-14675-1
eBook Packages: Computer ScienceComputer Science (R0)