Skip to main content

Using Relations to Develop a Haskell Program for Computing Maximum Bipartite Matchings

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 7560))

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

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. The Haskell report, http://www.haskell.org/onlinereport/haskell2010

  2. Berge, C.: Two theorems in graph theory. PNAS. National Academy of Sciences 43(9), 842–844 (1957)

    Article  MathSciNet  MATH  Google Scholar 

  3. Berghammer, R.: Ordnungen, Verbände und Relationen mit Anwendungen. Vieweg-Teubner (2008)

    Google Scholar 

  4. 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)

    Chapter  Google Scholar 

  5. 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)

    Chapter  Google Scholar 

  6. Diestel, R.: Graphentheorie. Springer (2000)

    Google Scholar 

  7. Erwig, M.: The FGL package, http://hackage.haskell.org/package/fgl

  8. Erwig, M.: Functional programming with graphs. In: Jones, S.L.P., Tofte, M., Berman, A.M. (eds.) ICFP, pp. 52–65. ACM (1997)

    Google Scholar 

  9. Erwig, M.: Inductive graphs and functional graph algorithms. J. Funct. Program. 11(5), 467–492 (2001)

    Article  MathSciNet  MATH  Google Scholar 

  10. Hopcroft, J.E., Karp, R.M.: An n5/2 algorithm for maximum matchings in bipartite graphs. SIAM J. Comput. 2(4), 225–231 (1973)

    Article  MATH  Google Scholar 

  11. Johnsson, T.: Efficient graph algorithms using lazy monolithic arrays. J. Funct. Program. 8(4), 323–333 (1998)

    Article  MathSciNet  MATH  Google Scholar 

  12. King, D.J., Launchbury, J.: Structuring depth-first search algorithms in Haskell. In: POPL, pp. 344–354 (1995)

    Google Scholar 

  13. 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)

    Chapter  Google Scholar 

  14. Launchbury, J., Jones, S.L.P.: Lazy functional state threads. In: PLDI, pp. 24–35 (1994)

    Google Scholar 

  15. 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)

    Chapter  Google Scholar 

  16. Lipovaca, M.: Learn You a Haskell for Great Good!. No Starch Press (2011), http://learnyouahaskell.com

  17. Mucha, M., Sankowski, P.: Maximum matchings via Gaussian elimination. In: FOCS, pp. 248–255. IEEE Computer Society (2004)

    Google Scholar 

  18. Okasaki, C., Gill, A.: Fast mergeable integer maps. In: Workshop on ML, pp. 77–86 (1998)

    Google Scholar 

  19. O’Sullivan, B., Stewart, D., Goerzen, J.: Real World Haskell. O’Reilly (2009), http://book.realworldhaskell.org/read

  20. Rabhi, F., Lapalme, G.: Algorithms: a functional programming approach, 2nd edn. Addison-Wesley (1999)

    Google Scholar 

  21. Russling, M.: Deriving General Schemes for Classes of Graph Algorithms. PhD thesis (1996)

    Google Scholar 

  22. Smith, L.: The data-ordlist package, http://hackage.haskell.org/package/data-ordlist

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics