Abstract
Consider the following kinds of sets: • the set of all possible distances between two vertices of a directed graph; • any set of integers that is either finite or periodic for all n greater or equal to some n 0 (such a set is called ultimately periodic); • a context-free language over an alphabet with one letter (such a language is also regular); • the set of all possible lengths of words of a context-free language. All these sets are isomorphic relatively to the operations of union (or sum), concatenation and Kleene (or transitive) closure. Furthermore, they all share a particularly important property which is not valid in some similar algebraic structure - the concatenation is commutative. The purpose of this paper is to investigate the representation and properties of these sets and also the algorithms to compute the operations mentioned above. The concepts of linear number and Δ-sum are developed in order to provide convenient methods of representation and manipulation. It should be noted that although Δ-sums and regular expressions (or finite automata) over a one-letter alphabet denote essentially the same sets, the corresponding algebras are quite different. For example, it is always possible to eliminate the closure and concatenation operations from a Δ-sum by expanding it as a sum of linear numbers. No such elimination is possible for regular expressions (although special forms of regular expressions or finite automata are sufficient to denote regular sets over one-letter alphabets). The algorithms using Δ-sums are often faster and simpler than those based on finite automata or regular expressions over a one-letter alphabet. We think that this improvement comes from the fact that a set of words over one letter is represented by the set of their lengths and manipulated by arithmetic operations. We apply these methods to the first kind of sets listed above and present new algorithms dealing with a variety of problems related to distances in directed graphs.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have