Results 1 -
4 of
4
Structuring Depth-First Search Algorithms in Haskell
, 1995
"... Depth-first search is the key to a wide variety of graph algorithms. In this paper we express depth-first search in a lazy functional language, obtaining a linear-time implementation. Unlike traditional imperative presentations, we use the structuring methods of functional languages to construct alg ..."
Abstract
-
Cited by 24 (0 self)
- Add to MetaCart
Depth-first search is the key to a wide variety of graph algorithms. In this paper we express depth-first search in a lazy functional language, obtaining a linear-time implementation. Unlike traditional imperative presentations, we use the structuring methods of functional languages to construct algorithms from individual reusable components. This style of algorithm construction turns out to be quite amenable to formal proof, which we exemplify through a calculationalstyle proof of a far from obvious strongly-connected components algorithm. Classifications: Computing Paradigms (functional programming) ; Environments, Implementations, and Experience (programming, graph algorithms). 1 Introduction The importance of depth-first search (DFS) for graph algorithms was established twenty years ago by Tarjan (1972) and Hopcroft and Tarjan (1973) in their seminal work. They demonstrated how depth-first search could be used to construct a variety of efficient graph algorithms. In practice, this...
Lazy Depth-First Search and Linear Graph Algorithms in Haskell
- Glasgow Workshop on Functional Programming
, 1994
"... Depth-first search is the key to a wide variety of graph algorithms. In this paper we explore the implementation of depth first search in a lazy functional language. For the first time in such languages we obtain a linear-time implementation. But we go further. Unlike traditional imperative presenta ..."
Abstract
-
Cited by 6 (0 self)
- Add to MetaCart
Depth-first search is the key to a wide variety of graph algorithms. In this paper we explore the implementation of depth first search in a lazy functional language. For the first time in such languages we obtain a linear-time implementation. But we go further. Unlike traditional imperative presentations, algorithms are constructed from individual components, which may be reused to create new algorithms. Furthermore, the style of program is quite amenable to formal proof, which we exemplify through a calculational-style proof of a strongly-connected components algorithm. 1 Introduction Graph algorithms have long been a challenge to programmers of lazy functional languages. It has not been at all clear how to express such algorithms without using side effects to achieve efficiency. For example, many texts provide implementations of search algorithms which are quadratic in the size of the graph (see Paulson (1991), Holyer (1991), or Harrison (1993)), compared with the standard linear im...
Metric Lexical Analysis
, 1999
"... . We study automata-theoretic properties of distances and quasi-distances between words. We show that every additive distance is finite. We also show that every additive quasi-distance is regularitypreserving, that is, the neighborhood of any radius of a regular language with respect to an addit ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
. We study automata-theoretic properties of distances and quasi-distances between words. We show that every additive distance is finite. We also show that every additive quasi-distance is regularitypreserving, that is, the neighborhood of any radius of a regular language with respect to an additive quasi-distance is regular. As an application we present a simple algorithm that constructs a metric (fault-tolerant) lexical analyzer for any given lexical analyzer and desired radius (faulttolerance index). 1 Introduction You are frustrated when you type a UNIX command incorrectly and cannot find what the correct spelling is. You may be wondering why the system does not give any suggestions on what command you might want to type. Those questions concern the concepts of distances between words and neighborhoods of languages with respect to a distance and a radius. Much work has been done in spell checking and correction, and other online dictionary applications using various method...
Additive distances and quasi-distances between words
- J. Universal Computer Sci
"... Abstract: We study additive distances and quasi-distances between words. We show that every additive distance is finite. We then prove that every additive quasi-distance is regularity-preserving, that is, the neighborhood of any radius of a regular language with respect to an additive quasi-distance ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
Abstract: We study additive distances and quasi-distances between words. We show that every additive distance is finite. We then prove that every additive quasi-distance is regularity-preserving, that is, the neighborhood of any radius of a regular language with respect to an additive quasi-distance is regular. Finally, similar results will be proven for context-free, computable and computably enumerable languages. Key Words: some words Category: F.1.1, F.4.3

