Abstract
We show how to develop a purely functional algorithm that computes maximum matchings in bipartite graphs by using relation algebra. Our algorithm is based upon the representation of graphs by lists of successor lists and a generalisation to specific container types is discussed. The algorithm itself can be implemented in Haskell and we will provide a complete implementation using the successor list model.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
The Haskell report, http://www.haskell.org/onlinereport/haskell2010
Berge, C.: Two theorems in graph theory. PNAS. National Academy of Sciences 43(9), 842–844 (1957)
Berghammer, R.: Ordnungen, Verbände und Relationen mit Anwendungen. Vieweg-Teubner (2008)
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)
Diestel, R.: Graphentheorie. Springer (2000)
Erwig, M.: The FGL package, http://hackage.haskell.org/package/fgl
Erwig, M.: Functional programming with graphs. In: Jones, S.L.P., Tofte, M., Berman, A.M. (eds.) ICFP, pp. 52–65. ACM (1997)
Erwig, M.: Inductive graphs and functional graph algorithms. J. Funct. Program. 11(5), 467–492 (2001)
Hopcroft, J.E., Karp, R.M.: An n5/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: POPL, pp. 344–354 (1995)
Launchbury, J.: Graph Algorithms with a Functional Flavour. In: Jeuring, J., Meijer, E. (eds.) AFP 1995. LNCS, vol. 925, pp. 308–331. Springer, Heidelberg (1995)
Launchbury, J., Jones, S.L.P.: Lazy functional state threads. In: PLDI, pp. 24–35 (1994)
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)
Lipovaca, M.: Learn You a Haskell for Great Good!. No Starch Press (2011), http://learnyouahaskell.com
Mucha, M., Sankowski, P.: Maximum matchings via Gaussian elimination. In: FOCS, pp. 248–255. IEEE Computer Society (2004)
Okasaki, C., Gill, A.: Fast mergeable integer maps. In: Workshop on ML, pp. 77–86 (1998)
O’Sullivan, B., Stewart, D., Goerzen, J.: Real World Haskell. O’Reilly (2009), http://book.realworldhaskell.org/read
Rabhi, F., Lapalme, G.: Algorithms: a functional programming approach, 2nd edn. Addison-Wesley (1999)
Russling, M.: Deriving General Schemes for Classes of Graph Algorithms. PhD thesis (1996)
Smith, L.: The data-ordlist package, http://hackage.haskell.org/package/data-ordlist
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Danilenko, N. (2012). Using Relations to Develop a Haskell Program for Computing Maximum Bipartite Matchings. In: Kahl, W., Griffin, T.G. (eds) Relational and Algebraic Methods in Computer Science. RAMICS 2012. Lecture Notes in Computer Science, vol 7560. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-33314-9_9
Download citation
DOI: https://doi.org/10.1007/978-3-642-33314-9_9
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-33313-2
Online ISBN: 978-3-642-33314-9
eBook Packages: Computer ScienceComputer Science (R0)