Graph Algorithms with a Functional Flavous

Graph algorithms have long been a challenge to program in a pure functional language. Previous attempts have either tended to be unreadable, or have failed to achieve standard asymptotic complexity measures. We explore a number of graph search algorithms in which we achieve standard complexities, while significantly improving upon traditional imperative presentations. In particular, we construct the algorithms from reusable components, so providing a greater level of modularity than is typical elsewhere. Furthermore, we provide examples of correctness proofs which are quite different from traditional proofs, largely because they are not based upon reasoning about the dynamic process of graph traversal, but rather reason about a static value.

[1]  John Darlington,et al.  A system which automatically improves programs , 1973, Acta Informatica.

[2]  Simon L. Peyton Jones,et al.  State in Haskell , 1995, LISP Symb. Comput..

[3]  Simon L. Peyton Jones,et al.  Lazy functional state threads , 1994, PLDI '94.

[4]  John Hughes,et al.  Lazy Memo-functions , 1985, FPCA.

[5]  John Launchbury,et al.  Structuring depth-first search algorithms in Haskell , 1995, POPL '95.

[6]  Philip Wadler,et al.  Comprehending monads , 1990, LISP and Functional Programming.

[7]  Lawrence Charles Paulson,et al.  ML for the working programmer , 1991 .

[8]  Rachel Harrison Abstract data types in standard ML , 1993, Wiley professional computing.

[9]  Eugenio Moggi,et al.  Computational lambda-calculus and monads , 1989, [1989] Proceedings. Fourth Annual Symposium on Logic in Computer Science.

[10]  Robert E. Tarjan,et al.  Depth-First Search and Linear Graph Algorithms , 1972, SIAM J. Comput..

[11]  Ian Holyer Functional programming with Miranda , 1991 .

[12]  J. Hopcroft,et al.  Algorithm 447: efficient algorithms for graph manipulation , 1973, CACM.

[13]  Udi Manber,et al.  Introduction to algorithms - a creative approach , 1989 .

[14]  Ronald L. Rivest,et al.  Introduction to Algorithms , 1990 .

[15]  Christopher D. Clack,et al.  Programming with Miranda , 1995 .