Results 11 - 20
of
20
Linear-time breadth-first tree algorithms An exercise in the arithmetic of folds and zips
- Dept of Computer Science, University of Auckland
, 1992
"... This is a paper about an application of the mathematics of zip, fold (reduce) and accumulate (scan) operations on lists. It gives an account of the derivation of a linear-time breadth-first enumeration function, and of a subtle and efficient breadth-first tree labelling function. 1 Breadth-first ord ..."
Abstract
-
Cited by 6 (1 self)
- Add to MetaCart
This is a paper about an application of the mathematics of zip, fold (reduce) and accumulate (scan) operations on lists. It gives an account of the derivation of a linear-time breadth-first enumeration function, and of a subtle and efficient breadth-first tree labelling function. 1 Breadth-first ordering The algorithms which are developed in this paper relate trees to lists in a way that respects `breadth-first' ordering on the nodes of a tree. This is the order in which nodes nearer the root are considered to be earlier and -- perhaps arbitrarily, but for definiteness -- those at the same depth from the root are ordered lexicographically by the the `left to right' seniority of their line of descent. This paper works with rose trees, in which each node has an arbitrary finite number of immediate descendants tree ff = = ta where ta ::= Nd ff [ta] root(Nd a ts) = a subs(Nd a ts) = ts and will develop implementations of the breadth-first scanning and labelling functions bfs and lab b...
Structured Parallel Computation in Structured Documents
- Journal of Universal Computer Science
, 1995
"... Document archives contain large amounts of data to which sophisticated queries are applied. The size of archives and the complexity of evaluating queries makes the use of parallelism attractive. The use of semantically-based markup such as SGML makes it possible to represent documents and document ..."
Abstract
-
Cited by 6 (2 self)
- Add to MetaCart
Document archives contain large amounts of data to which sophisticated queries are applied. The size of archives and the complexity of evaluating queries makes the use of parallelism attractive. The use of semantically-based markup such as SGML makes it possible to represent documents and document archives as data types. We present a theory of trees and tree homomorphisms, modelling structured text archives and operations on them, from which it can be seen that: ffl many apparently-unrelated tree operations are homomorphisms; ffl homomorphisms can be described in a simple parameterised way that gives standard sequential and parallel implementations for them; ffl special classes of homomorphisms have parallel implementations of practical interest. In particular, we develop an implementation for path expression search, a novel powerful query facility for structured text, that takes time logarithmic in the text size. Keywords: structured text, categorical data type, software developme...
Deriving Tidy Drawings of Trees
, 1995
"... The tree-drawing problem is to produce a `tidy' mapping of elements of a tree to points in the plane. In this paper, we derive an efficient algorithm for producing tidy drawings of trees. The specification, the starting point for the derivations, consists of a collection of intuitively appealing cri ..."
Abstract
-
Cited by 5 (3 self)
- Add to MetaCart
The tree-drawing problem is to produce a `tidy' mapping of elements of a tree to points in the plane. In this paper, we derive an efficient algorithm for producing tidy drawings of trees. The specification, the starting point for the derivations, consists of a collection of intuitively appealing criteria satisfied by tidy drawings. The derivation shows constructively that these criteria completely determine the drawing. Indeed, the criteria completely determine a simple but inefficient algorithm for drawing a tree, which can be transformed into an efficient algorithm using just standard techniques and a small number of inventive steps. The algorithm consists of an upwards accumulation followed by a downwards accumulation on the tree, and is further evidence of the utility of these two higher-order tree operations.
An Initial-Algebra Approach to Directed Acyclic Graphs
, 1995
"... . The initial-algebra approach to modelling datatypes consists of giving constructors for building larger objects of that type from smaller ones, and laws identifying di#erentways of constructing the same object. The recursive decomposition of objects of the datatype leads directly to a recursiv ..."
Abstract
-
Cited by 4 (0 self)
- Add to MetaCart
. The initial-algebra approach to modelling datatypes consists of giving constructors for building larger objects of that type from smaller ones, and laws identifying di#erentways of constructing the same object. The recursive decomposition of objects of the datatype leads directly to a recursive pattern of computation on those objects, whichisvery helpful for both functional and parallel programming. We showhow to model a particular kind of directed acyclic graph using this initial-algebra approach. Keywords. Graphs, data types, catamorphisms, initial algebras, Bird-Meertens Formalism, program derivation. 1 Introduction It is now widely recognized that the traditional ad-hoc approaches to program construction do not yield reliable software; a more systematic and formal approach is required. One such approach consists of program veri#cation---proving after the fact that a given program satis#es its formal speci#cation. This approach turns out to be di#cult to implement, not lea...
A Parallel Tree Difference Algorithm
- Information Processing Letters
, 1995
"... We present a tree difference algorithm with expected sequential execution time O(n log log n) and expected parallel execution time of O(log n), for trees of size n. The algorithm assumes unique labels and permits operations only on leaves and frontier subtrees. Despite these limitations, it can be u ..."
Abstract
-
Cited by 3 (0 self)
- Add to MetaCart
We present a tree difference algorithm with expected sequential execution time O(n log log n) and expected parallel execution time of O(log n), for trees of size n. The algorithm assumes unique labels and permits operations only on leaves and frontier subtrees. Despite these limitations, it can be useful in the analysis of structured text. 1 Applications of Tree Difference In this paper we describe an algorithm for determining the difference between two trees under the assumption that each node has a unique label chosen from an ordered set. The algorithm uses a novel form of hashing to quickly extract neighbourhood information for each node. In a second phase, this neighbourhood information is processed to determine what differences exist between the trees. We assume that trees may be arbitrarily branching, and that the following operations may have been applied to them: 1. a node was inserted to become a new leaf; 2. a leaf node was deleted; 3. a leaf node was moved to become a lea...
Streaming Representation-Changers
- LNCS
, 2004
"... Unfolds generate data structures, and folds consume them. ..."
Abstract
-
Cited by 3 (0 self)
- Add to MetaCart
Unfolds generate data structures, and folds consume them.
A parallel tree di#erence algorithm
- Information Processing Letters
, 1996
"... Wepresent a tree di erence algorithm with expected sequential execution time O(n log log n) and expected parallel execution time of O(log n), for trees of size n. The algorithm assumes unique labels and permits operations only on leaves and frontier subtrees. Despite these limitations, it can be use ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
Wepresent a tree di erence algorithm with expected sequential execution time O(n log log n) and expected parallel execution time of O(log n), for trees of size n. The algorithm assumes unique labels and permits operations only on leaves and frontier subtrees. Despite these limitations, it can be useful in the analysis of structured text. 1 Applications of Tree Di erence In this paper we describe an algorithm for determining the di erence between two trees under the assumption that each node has a unique label chosen from an ordered set. The algorithm uses a novel form of hashing to quickly extract neighbourhood information for each node. In a second phase, this neighbourhood information is processed to determine what di erences exist between the trees. We assume that trees may be arbitrarily branching, and that the following operations may have been applied to them: 1. a node was inserted to become a new leaf; 2. a leaf node was deleted; 3. a leaf node was moved to become a leaf node in another part of the tree;
Mathematical Engineering
- in Proc. Annual European Conference on Parallel Processing (Euro-Par 2003), LNCS 2790 (Springer-Verlag
, 2003
"... Trees are useful data structures, but to design e#cient parallel programs over trees is known to be more di#cult than to do over lists. Although several important tree skeletons have been proposed to simplify parallel programming on trees, few studies have been reported on how to systematically u ..."
Abstract
- Add to MetaCart
Trees are useful data structures, but to design e#cient parallel programs over trees is known to be more di#cult than to do over lists. Although several important tree skeletons have been proposed to simplify parallel programming on trees, few studies have been reported on how to systematically use them in solving practical problems; it is neither clear how to make a good combination of skeletons to solve a given problem, nor obvious how to find suitable operators used in a single skeleton. In this paper, we report our first attempt to resolve these problems, proposing two important transformations, the tree di#usion transformation and the tree context preservation transformation. The tree di#usion transformation allows one to use familiar recursive definitions to develop his parallel programs, while the tree context preservation transformation shows how to derive associative operators that are required when using tree skeletons. We illustrate our approach by deriving an e#cient parallel program for solving a nontrivial problem called the party planning problem, the tree version of the famous maximum-weight-sum problem.
Efficient Functional Programming Communication Functions on the AP1000
, 1994
"... One problem of parallel computing is that parallel computers vary greatly in architecture so that a program written to run efficiently on a particular architecture, when porting to a different architecture, would often need to be changed and adapted substantially in order to run with reasonable perf ..."
Abstract
- Add to MetaCart
One problem of parallel computing is that parallel computers vary greatly in architecture so that a program written to run efficiently on a particular architecture, when porting to a different architecture, would often need to be changed and adapted substantially in order to run with reasonable performance on the target architecture. Porting with performance is, hence, labour-intensive and costly. A method of parallel programming using the Bird-Meertens Formalism where programs are formulated as compositions of (mainly) higher order functions on some data type in the data parallel functional style has been proposed as a solution. The library of (mainly) higher-order functions in which all communication and parallelism in a program is embedded could (it is argued) be implemented efficiently on different parallel architectures. This gives the advantage of portability between different architectures with reasonable and predictable performance without change in program source. ...

