On the Theory of One-Step Rewriting in Trace Monoids

On the Theory of One-Step Rewriting in Trace Monoids

On the theory of one-step rewriting in trace monoids ¡ ¢ Dietrich Kuske and Markus Lohrey £ Department of Mathematics and Computer Science University of Leicester, LEICESTER, LE1 7RH, UK ¤ Universitat¨ Stuttgart, Institut fur¨ Informatik, Breitwiesenstr. 20-22, 70565 Stuttgart, Germany [email protected], [email protected] Abstract. We prove that the first-order theory of the one-step rewriting rela- tion associated with a trace rewriting system is decidable and give a nonelemen- tary lower bound for the complexity. The decidability extends known results on semi-Thue systems but our proofs use new methods; these new methods yield the decidability of local properties expressed in first-order logic augmented by modulo-counting quantifiers. Using the main decidability result, we describe a class of trace rewriting systems for which the confluence problem is decidable. The complete proofs can be found in the Technical Report [14]. 1 Introduction Rewriting systems received a lot of attention in mathematics and theoretical computer science and are still an active field of research. Historically, rewriting systems were in- troduced to solve word problems in certain structures [28]. By the work of Markov [18] and Post [24], this hope vanished as they showed that there exist fixed semi-Thue sys- tems with an undecidable word problem. Despite this result, there are plenty of rewriting systems with a decidable word problem, the most famous class being that of confluent and terminating systems. By Newman’s Lemma, confluence can be decided for termi- nating semi-Thue systems as well as for terminating term rewriting systems. In general, both confluence and termination are undecidable properties of a semi-Thue system. A large deal of research tries to identify sufficient conditions for confluence/termination of rewriting systems (cf. [26]), or to describe classes of rewriting systems where con- fluence/termination is decidable. These two properties which are in the heart of research in this area are typical second-order properties of the rewrite graph: its nodes are the structures that are rewrit- ten (e.g., words in case of a semi-Thue system or terms in case of a term rewriting system), and directed edges indicate that one such structure can be rewritten into the other in one step. In order to define confluence and termination, one needs to quantify over paths in this graph. Hence the monadic second-order theory of rewrite graphs is in general undecidable. The situation changes for semi-Thue systems when one consid- ers the first-order theory: the edges of the rewrite graph of a semi-Thue system can be ¥ This work was partly done while the second author was on leave at IRISA, Campus de Beaulieu, 35042 Rennes Cedex, France and supported by the INRIA cooperative research action FISC. described by two-tape automata that move their heads synchronously on both tapes.1 Using the well known closure properties of regular sets, the decidability of the first- order theory of these graphs follows [5, 13]. This result also holds for rewrite graphs of ground term rewriting systems [5], but not for term rewriting systems in general [29]. Another result in this direction is the decidability of the monadic second-order theory of the rewrite graph of a prefix semi-Thue system [2] (a prefix semi-Thue system is a semi-Thue system where only prefixes can be rewritten). In particular confluence and termination are decidable for prefix semi-Thue systems. This paper investigates the first-order theory of the rewrite graph of a trace rewriting system. Cartier and Foata [1] investigated the combinatorics of free partially commuta- tive monoids that became later known as trace monoids. Mazurkiewicz [20] introduced them into computer science. They form a mathematically sound model for the concur- rent behaviour of systems of high abstraction. Since trace monoids are a generalization of free monoids, it was tempting to extend the investigation of free monoids to free partially commutative monoids. This resulted, e.g., in the extensive consideration of recognizable and rational trace languages (cf. [9] for a collection of surveys on this field), trace equations [10, 19, 8], and trace rewriting systems [6, 7, 16, 17]. Our main result states that for any finite trace rewriting system, the first-order theory of the associated rewrite graph is decidable. Because of the non-local effects of trace rewriting,2 the automata-theoretic techniques from Dauchet and Tison [5] and Jacque- mard [13] are not applicable here and we had to search for other ideas. The first is an application of Gaifman’s locality theorem: the validity of a first-order sentence in a structure depends on first-order properties of spheres around elements of . Since this theorem is effective, we were left with the question how to describe the set of traces that are centers of an ¡ -sphere satisfying a given first-order formula. Our second idea is that the ¡ -sphere around a trace can be described in the dependence graph of this trace by a sentence of monadic second-order logic. Note that this logic does not speak about the infinite rewrite graph, but about a single finite dependence graph. We show that this is indeed effectively possible. Hence, by a result of Thomas [27], this implies the recognizability of the set of traces that are centers of an ¡ -sphere satisfying a given first-order formula. Taking these two ideas together, we obtain that the first-order theory of the graph of any trace rewriting system is decidable. We actually show a more general result since we do not only consider trace rewriting systems, but scattered rewriting systems. The idea is that of a parallel rewrite step where the intermediate factors of a trace have to satisfy some recognizable constraints and can be permuted as long as they are independent in the trace monoid. As mentioned above, the first step in our decidability proof is an application of Gaifman’s Theorem. To the knowledge of the authors, all known translations of a first- order sentence into a Boolean combination of local sentences are not elementary, thus our decision procedure is far from efficient. We also show that one cannot avoid this nonelementary complexity. To this aim, we construct a trace rewrite graph whose first- order theory is not elementary. Thus, our use of Gaifman’s translation does not lead to 1 As opposed to rational graphs where the movement is asynchronous. 2 £ ¢¥¤§¦¨£ © £ © ¦¨¢§¤ With ¢ and the only independent letters, one can, e.g., rewrite into in just two £¢ £¦¨¢ steps using the rules ¢§¦¨£ ¢£ and . an unreasonable inefficiency. We actually show a slightly stronger result, namely that the set of valid local sentences for a fixed radius is not elementary. In other words, the complexity of the decision question is already present when restricting to local sentences. This nonelementary lower bound is shown for a nontrivial independence alphabet and the proof does not carry over to semi-Thue systems. We show a lower bound of doubly exponential nondeterministic time for this problem. Again this lower bound holds for local sentences for a fixed radius. In the last section, we return to the confluence problem for trace rewriting systems. For terminating rewriting systems, confluence and local confluence are equivalent. The problem with trace rewriting systems is that there can be infinitely many critical pairs which makes it impossible to check all of them in turn [6, 7]. Even worse, by [22], it is undecidable whether a length-reducing trace rewriting system is confluent. We de- scribe classes of terminating trace rewriting systems for which confluence is decidable. The classes of trace rewriting systems we consider in this last section ensure that local confluence is effectively expressible by a sentence of first-order logic (which is not the case in general). This then allows to apply our main result on the decidability of these first-order properties and therefore the decidability of confluence for these classes when restricted to terminating systems. 2 Rewriting in trace monoids 2.1 Trace monoids and recognizable trace languages In the following we introduce some notions from trace theory, see [9] for more details. An independence relation on an alphabet is an irreflexive and symmetric relation ¡£¢ ¡ §©¨ ¥¤¦ ¥¤¦ , the complementary relation is called a dependence ¡ § relation. The pair (resp. ) is called an independence alphabet (resp. a dependence alphabet). A dependence graph or trace is a triple where is a directed acyclic and finite graph (possibly empty) and £ ¥!" is a labeling #)(¨*% function such that, for all #$%&' with , we have 2#$%0 3&4 %5/#- 3&476 + ,#- .+ /%0 1&'§ if and only if or We will identify traces that are isomorphic as labeled graphs. The set of all (isomor- ¡ ¨98: ;¨¥ phism classes of) traces is denoted by 8 . For a trace , let ¡ ¡ <0=?>A@ 8 /F+G5 H& B;C 3¨D$ E . The independence relation can be lifted to by setting ¢¦¡ <0=?>A@ <0=?>A@ 8 J /G5 if /F- I¤ . On the set , one defines a binary operation by M M M M ¡ ¡ ¡ ¢ ¢ ¢ ¡L ¢ ¡ ¢ ¡ ¢ $JK ¨: ¡ ¢ ¡ ¢UT ¡ ¢ /# Q&R ¤S $ 2# .+ ,# V&R§4W B8RJX where N¨PO5 ,# . Then becomes a ¡ Y 8 monoid, its neutral element is the empty trace . If ¨[Z then is isomorphic to the §]¨ ^ 8 free monoid \ . On the other extreme if Id , then is isomorphic to the free ^ ` a)&* commutative monoid _1` . We will identify the letter with the singleton trace ¡ ¢ b9¨ca a 6d6d6a5eS&f \ whose node is labeled by a . In this sense, a word defines the ¡ ¢ b1hjik¨£a J3a JKlmldlnJIa5e F4oKipG F G g Fhjik¨:g Gqhri trace g . We write for two words and if . a¡ oki¢ .a This relation is the congruence on the free monoid \ generated by all pairs ¡ £ 3& F+G7&8 F G F J G for /a .

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    12 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us