Inductive graphs and functional graph algorithms

  • Authors:
  • Martin Erwig

  • Affiliations:
  • Department of Computer Science, Oregon State University, Corvallis, Oregon 97331, USA (e-mail: erwig@cs.orst.edu)

  • Venue:
  • Journal of Functional Programming
  • Year:
  • 2001

Quantified Score

Hi-index 0.00

Visualization

Abstract

We propose a new style of writing graph algorithms in functional languages which is based on an alternative view of graphs as inductively defined data types. We show how this graph model can be implemented efficiently, and then we demonstrate how graph algorithms can be succinctly given by recursive function definitions based on the inductive graph view. We also regard this as a contribution to the teaching of algorithms and data structures in functional languages since we can use the functional-style graph algorithms instead of the imperative algorithms that are dominant today.