• Aucun résultat trouvé

Inductive definitions in logic versus programs of real-time cellular automata

N/A
N/A
Protected

Academic year: 2021

Partager "Inductive definitions in logic versus programs of real-time cellular automata"

Copied!
63
0
0

Texte intégral

(1)

HAL Id: hal-02474520

https://hal-normandie-univ.archives-ouvertes.fr/hal-02474520

Preprint submitted on 11 Feb 2020

HAL is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

real-time cellular automata

Etienne Grandjean, Théo Grente, Véronique Terrier

To cite this version:

Etienne Grandjean, Théo Grente, Véronique Terrier. Inductive definitions in logic versus programs of real-time cellular automata. 2020. �hal-02474520�

(2)

versus programs of real-time cellular automata

Etienne Grandjean, Th´´ eo Grente, V´eronique Terrier

Normandie Univ, UNICAEN, ENSICAEN, CNRS, GREYC, 14000 CAEN, France

Contents

1 Introduction 2

2 Preliminaries 6

2.1 Cellular automata and real-time complexity . . . 6 2.2 Our logics . . . 8 2.3 Our main results . . . 10 3 First examples: express problems; translate formulas into automata 10 3.1 Three examples of problems expressed in our three Horn logics . . . 10 3.2 Normalizing and translating a formula into a cellular automaton: an introduction

example . . . 12

4 Normalizing our Horn logics 17

4.1 Normalizing predecessor Horn logic . . . 18 4.2 Normalizing predecessor Horn logic with diagonal input-output . . . 24 4.3 Normalizing inclusion Horn logic . . . 25 5 Extending our logics with negation and normalizing them 28 5.1 Proof of Lemma 4: Normalizing predecessor logics with negation . . . 29 5.2 Proof of Lemma 5: Normalizing inclusion logic with negation . . . 31 6 Equivalence between our logics and real-time cellular automata 34 6.1 Logical characterization ofRealTimeCA . . . 34 6.2 Logical characterization ofRealTimeIA . . . 36 6.3 Logical characterization ofTrellisand linear conjunctive grammars . . . 38 7 Programming some reference problems in our logics 40 7.1 Defining in predecessor Horn logic the product of integers . . . 40 7.2 Expressing in logic the set of primes by Fischer’s algorithm . . . 41 7.3 Dyck languages, inclusion inductive logic and linear conjunctive grammars . . . 43 8 The language of ˇCulik and the Firing Squad Synchronization Problem 47 8.1 Construction of the potential tree . . . 49 8.2 An inclusion inductive formula defining the languageCulik . . . 54

9 Conclusion 59

Preprint submitted to Elsevier February 11, 2020

(3)

versus programs of real-time cellular automata

Etienne Grandjean, Th´´ eo Grente, V´eronique Terrier

Normandie Univ, UNICAEN, ENSICAEN, CNRS, GREYC, 14000 CAEN, France

Abstract

Descriptive complexity provides intrinsic, that is,machine-independent, characterizations of the major complexity classes. On the other hand, logic can be useful for designing programs in a natural declarative way. This is particularly important for parallel computation models such as cellular automata, because designing parallel programs is considered a difficult task.

This paper establishes three logical characterizations of the three classical complexity classes modeling minimal time, called real-time, of one-dimensional cellular automata according to their canonical variants: unidirectional or bidirectional communication, input word given in a parallel or sequential way.

Our three logics are natural restrictions of existential second-order Horn logic with built-in successor andpredecessor functions. These logics correspond exactly to the three ways of deciding a language on asquare grid circuit of sidenaccording to one of the three canonical locations of an input word of lengthn: along a side of the grid, on the diagonal that contains the output cell, or on the diagonal opposite to the output cell.

The key ingredient of our results is anormalizationmethod that transforms a formula from one of our three logics into an equivalent normalized formula that faithfully mimics a grid circuit.

Then, we extend our logics by allowing a limited use ofnegationon hypotheses like inStratified Datalog. By revisiting in detail a number of representative classical problems - recognition of the set of primes by Fisher’s algorithm, Dyck language recognition, Firing Squad Synchronization problem, etc. - we show that this extension makes easier programming and we prove that it does not change the complexity of our logics in real-time.

Finally, starting from our experience in expressing those representative problems in logic, we argue that our logics are high-level programming languages: they allow to express in a natural, precise and synthetic way the algorithms of literature, based on signals, and to translate them automatically into cellular automata of the same complexity.

Keywords: computational complexity, descriptive complexity, cellular automata, real-time computation, inductive logic, programming

1. Introduction

Descriptive complexity and programming

There are two criteria for a complexity class: it contains a number of “natural” problems that arecomplete in the class; it hasmachine-independent “natural” characterizations, usually inlogic, i.e., in so-called descriptive complexity. The most famous example is Fagin’s Theorem [11, 25],

5

which characterizes NP as the class of problems definable in existential second-order logic (ESO).

Similarly, Immerman-Vardi’s Theorem [25, 21] and Gr¨adel’s Theorem [13, 14] characterize the classPbyfirst-order logic plus least fixed-point, andsecond-order logic restricted to Horn formulas, respectively.

Another interest of descriptive complexity is that it allows to automatically derive from a logical

10

description of a problem a program that solves it. This is particularly interesting for the design ofparallel programs that is considered a difficult task [24, 30]. A number of algorithmic problems (product of integers, product of matrices, sorting, etc.) are computable in linear time oncellular automata(CA), a local and massively parallel model. For each such problem, the literature presents an “ad hoc” parallel and local algorithmic strategy and gives the program of the final CA in an

15

informal way [12, 8]. However, the considered problems can be defined inductively in a natural way.

Preprint submitted to Elsevier February 11, 2020

(4)

For instance, the product of two integers in binary notation is simply defined by the usual school method and one may hope to directly derive a parallel program from such an inductive process.

Descriptive complexity and linear time on cellular automata

The present paper is a considerably extended version of the conference paper [18] which is

20

in some sense the sequel of the paper [3] (see also [19]). First, [3] observes that the inductive processes defining the considered problems (product of integers, product of matrices, sorting, etc.) are “local” and are naturally formalized by Horn formulas, that is by conjunctions of first-order Horn clauses. Therefore, the computation is nothing else than the classical resolution method on Horn clauses, as in Prolog and Datalog [25, 14, 1]. Moreover, on every concrete problem defined by

25

a Horn formula with d+ 1 first-order variables, this inductive computation by Horn rules can be geometrically modeled as the displacement of a d-dimensional hyperplane along some fixed line in a space of dimensiond+ 1. To capture these inductive behaviors, [3] defines a logic denotedmonot- ESO-HORNd(∀d+1,arityd+1) obtained from the logicESO-HORNtailored by Gr¨adel [14] to characterize P, by restricting both the number of first-order variables and the arity of second-order predicate

30

symbols. Besides, it includes an additional restriction – the “monotonicity condition” – that reflects the geometrical consideration above-mentioned. [3] proves that this logic exactly characterizes the linear timecomplexity class of cellular automata: more precisely, for each integer d≥1, a setLof d-dimensional pictures can be decided in linear time on a d-dimensional CA – writtenL∈DLINdCA – if and only if it can be expressed inmonot-ESO-HORNd(∀d+1,arityd+1). For short:

35

DLINdCA=monot-ESO-HORNd(∀d+1,arityd+1).

To summarize, expressing a concrete problem in this logic – which seems aneasy task in practice and is also anecessary and sufficient condition according to the above equality –guarantees that this problem can be solved inlinear time on a CA; moreover, the Horn formula that defines the problem can beautomatically translated into a program of CA that computes it inlinear time.

40

Logics for minimal time of cellular automata?

At this point, two natural questions arise:

1. Besides linear time, a robust and very expressive complexity class, what are the othersignif- icant androbust complexity classes of CA?

2. Can we exhibit characterizations of those complexity classes in some naturally (syntactically)

45

defined logics so that any definition of a problem in such a logic can beautomaticallytranslated into a program of the complexity considered?

Besides linear time, the main complexity notion well-studied for a long time in the literature of CA is real-time, i.e., minimal time [5, 33, 10]. A cellular automaton is said to run in real- time if it stops, i.e., gives the answer yes or no, at the minimal time sufficient for the output cell

50

(the cell that gives the answer) to have received each letter of the input. Real-time complexity appears as a sensitive/fragile notion and one generally thinks it is so for CA of dimension 2 or more [35, 15]. However, maybe surprisingly, one knows that real-time complexity is arobust notion for one-dimensional CA in the following sense: according to the many natural variants of the definition of a one-dimensional CA, which essentially rest on the choice of theneighborhood of the

55

CA and theparallel or sequential presentation of its input word,exactly three real-time classes of one-dimensional CA2 have been proved to be distinct [5, 4, 20, 31, 34, 39, 40]:

1. RealTimeCA=RealTimeOIA; 2. RealTimeIA;

3. Trellis=RealTimeOCA.

60

2By default, a CA has atwo-way communication and aparallel input mode. Any CA (resp. one-way CA or OCA) withsequential input mode is also called aniterative arrayor IA (resp.one-wayIA or OIA).

(5)

The final and decisive step to establish this classification is a nice dichotomy of [31] onadmissible neighborhoods3of CA, which can be rephrased as follows: for each neighborhoodN admissible with respect to the first cell as output cell, the real-time complexity class of one-dimensional CA with parallel input mode and neighborhoodN,

• either is equal to the real-time class for the neighborhood{−1,0,1}, i.e.,RealTimeCA(class 1

65

above),

• or is equal to the real-time class for the neighborhood{−1,0}, i.e.,Trellis(class 3 above).

Further, it issurprising to notice that

• the mutual relations between those three real-time classes are wholly elucidated: classes TrellisandRealTimeIA are mutuallyincomparable for inclusion whereas we have the strict

70

inclusionTrellis∪RealTimeIA$RealTimeCA[5, 7, 34],

• it isunknownwhether the trivial inclusionRealTimeCA⊆DLIN1CAis strict; worse, whether the inclusionRealTimeCA⊆LinSpaceis strict is an open problem!

Logics and grid circuits for real-time classes

Each of the three real-time classes 1-3 isrobust, i.e, is not modified for manyvariantsof CA (change

75

of neighborhoods, etc.) and has two or three quite different equivalent definitions. For example, RealTimeCA is equal to the linear time class of one-way CA with parallel input mode [4, 39].

Similarly, [28] has proved the surprising result that Trellis is the class of languages generated by linear conjunctive grammars (see also [29]) and [36] has established that a language L is in RealTimeIAif and only if itsreverse languageLRis recognized inreal-timeby aone-way alternating

80

automaton with one counter.

Logics have two nice and complementary properties: they are flexible, henceexpressive; they have normal forms, so can be tailored for efficient programming. The main idea that led us to conceive thedifferentlogics for real-time classes can be summarized by the following simple question:

what are thedifferent ways to decide a language on asquare grid circuit?

85

For any integern≥1 and any input wordw=w1. . . wn of lengthn, letCn be the grid circuit n×nwhere the state q∈S(for finiteS) of any site (i, j), 1≤i, j≤n, is determined by the states of its “predecessors” (i−1, j), if it exists (i >1), and (i, j−1), if it exists (j >1), and by the letter wh of the input word if this letter is placed on the site (i, j). The input wordwis accepted by the grid circuitCn if the state of the output cell (n, n) is accepting. Up to symmetries, there are three

90

canonical ways to arrange an input wordw=w1. . . wn on the gridCn, see Figure 1:

1. GRID1: place the input on anyside(or, equivalently, on both sides4) that does (do) not contain the output cell;

2. GRID2: place the input on thediagonal that contains the output cell;

3. GRID3: place the input on thediagonal opposite to the output cell.

95

Remark 1. To be complete, one should say that there is a fourth arrangement: place the input word on a side containing the output cell. In this case, the grid circuit behaves like a finite automaton (CA of dimension zero).

Remark 2. In order to get a natural logic corresponding toGRID3 (called inclusion logic) it will be convenient to rotate Figure 1 by an anticlockwise rotation of90: see Figure 11 below.

100

A simple (reversible) deformation transforms a grid circuit of GRIDi, i = 1,2,3, into a time- space diagram of a CA of the real-time classi considered (recall: 1: RealTimeCA; 2: RealTimeIA; 3: Trellis), and conversely. More precisely, to characterize the three real-time classes, we will define three sub-logics of the Horn logic that characterizes linear time of one-dimensional CA (DLIN1CA = monot-ESO-HORN1(∀2,arity2)), called respectively pred-ESO-HORN, pred-dio-ESO-HORN

105

andincl-ESO-HORN(defined in the next section), and we will prove the following equalities:

3Theneighborhood of a CA is the finite set of integers N such that the state of any cell xat any non-initial instanttis determined by the states of the cellsx+d, ford∈ N, at instantt1. A neighborhood isadmissible with respect to a fixed output cell (in general the first or the last cell) if it allows to communicate each bit of the input to the output cell.

4This equivalence is the consequence of Step 7 (folding the domain) in the proof of Lemma 1 below.

(6)

w1

w1

w2

w2

w3

w3

w4

w4

w5

w5

GRID1

w1

w2

w3

w4

w5

GRID2

w1

w2

w3

w4

w5

GRID3 Figure 1: The three ways to arrange the input on the grid

1. pred-ESO-HORN=GRID1=RealTimeCA; 2. pred-dio-ESO-HORN=GRID2=RealTimeIA; 3. incl-ESO-HORN=GRID3=Trellis.

To establish the double nature of our three logics and deduce the previous equalities 1-3, we

110

present each logic in two forms:

• we try to define itas large as possible, showing the extent of itsexpressiveness;

• we prove for it themost restricted normal form.

In each case, a formula in normal form can be translated literally into a grid program, which is essentially a CA of the consideredreal-time complexity class.

115

More flexible logics for programming real-time cellular automata

The best argument in favor of our logics is that they allow many properties to be expressed naturally and therefore to be easily programmed on a grid, or equivalent, on a cellular automaton in real time. However, the obligation to formalize everything with Horn clauses seems too strict for a natural expression of some reference languages of the literature, for example, the Dyck language (the

120

set of well-parenthesed expressions, see [28], pp 81-83, or [10]), or the set of prime integers [12, 9, 27], or the ˇCulik language (the set of words of the formaibi+jaj) [20, 6, 39]. Fortunately, we will show in this paper that all these examples are naturally expressed in slightly extended versions of our logics.

They now allow a limited use ofnegationon hypothesis computation atoms. This is comparable to the Datalog extension calledStratified Datalog, see e.g. [1].

125

An essential point should be emphasized: even if they allow more flexible expression, our ex- tended logics, calledinductive logics (they are no longerHorn logics), are equivalent to the original logics pred-ESO-HORN, pred-dio-ESO-HORN and incl-ESO-HORN, respectively, because we establish that they still characterize the same complexity classes,RealTimeCA,RealTimeIA andTrellis, re- spectively. Overall, the main new contribution of this paper compared to its conference version [18]

130

is the study of a number of reference problems of the literature that we express in our logics in a natural way. This is made possible thanks to the extensions of our Horn logics we callinductive logics.

Structure of the paper: In preliminaries, we recall the classical definitions of one-dimensional cellular automata and of their real-time classes; moreover, after defining our three Horn logics, we

135

succinctly present our main results and, as examples, we give natural expressions of some classical problems in our Horn logics ; in Subsection 3.2, a simplified version of the translation process from a logical formula to some cellular automaton is detailed for one of those examples. Section 4 formally describes the first step of this translation process, i.e., the normalization of our Horn logics, in the general case. In Section 5, we define extensions of our Horn logics with negation — so-called

140

inductive logics — and similarly describe their normalization process. Using those normal forms, we show in Section 6 that our logics exactly characterize the three real-time complexity classes of cellular automata and also – for inclusion logic – the class of linear conjunctive languages of Okhotin [28]. In Sections 7 and 8, some famous problems of the literature are programmed in our logics. Finally, Section 9 gives a conclusion with open problems and suggests some lines of research.

145

(7)

2. Preliminaries

2.1. Cellular automata and real-time complexity

A one-dimensional cellular automaton (CA) is a linear array of identical finite state automata (called cells). Each cell takes its values from a finiteset of states Sand interact with its adjacent neighbors at discrete time steps. At initial timet= 1, each cell receives a state fromS. Then the

150

computation is carried out locally: the new state of a cell is the result of atransition function f that depends on the states of itsneighborhood at the previous time step. This transition function applies synchronously to all cells at each time step. Formally said:

Definition 1. A cellular automaton (CA) is a triple(S,N,f) where:

• Sis a finite set of states

155

• N ={n1, . . . , n|N |} ⊂Z is the neighborhood

• f:S|N | →Sis the transition function.

Denoting by hc, ti the state of the cell c at time t, the state is updated in this way: hc, t+ 1i = f(hc+n1, ti, . . . ,hc+n|N |, ti)

Example 1. Consider the cellular automatonA= ({0,1},{−1,0,1},f)where f:{0,1}3→ {0,1}

160

is defined byf(x, y, z) = max(x, z)×(1−y) + min(1−x,1−z)×y. The first steps of the compu- tation on the initial configuration . . .11011010000111. . . are depicted in the following space-time diagram.

. . . .

1

. . . .

2

. . . .

3

. . . .

4

Time ... ...

Space

:0 :1

Let us look at another cellular automaton T = ({d, p, s, r},{−1,0},f) where f : {p, s, d, r}2

165

{p, s, d, r}is presented in the table below. On the right, the space-time diagram depicts the beginnings of the computation on the input . . . psspsppspss.

p s d r

p p d p p

s r s r r

d r s r p

r r s s r

. . . . . . . . . . . . . . .

p s s p s p p s p s s

r d s r d r p d r d s

r s s r s p r p p s s

r s s r s r p r p d s

p s s r s r r p r p s

One main difference between these two CA is that the information flow goes in both directions for Asince its neighborhood is {−1,0,1}, whereas the information flow is restricted from left to

170

right forT since its neighborhood is {−1,0}. Below we will refer to automata with bidirectional communication (whose canonic neighborhood is{−1,0,1}) astwo-way CA and to those with uni- directional communication (whose canonic neighborhood is{−1,0}) asone-way CA.

In what follows, we will consider CA as a language recognizer which operates on input wordw

175

and answers either “accept” or “reject”. For that, it should be made clear how the inputwis given to the CA and how the result of the computation is obtained.

First, we state some conditions on the set of states S.

• The input word letters belong to the set of states: Σ⊂S.

(8)

• A subset ofaccepting states Sacc⊂Sis identified.

180

• Two special states are also distinguished: one permanent state ]and one quiescent state λ.

A cell in the permanent state] remains in this state forever. A cell in the quiescent stateλ remains in this state as long as its neighborhood is quiescent.

Regarding on how to present the input to the array, two modes are usually considered: the parallel modeand thesequential mode. In parallel mode, the whole input is supplied at initial time:

185

thei-th symbol of the inputw=w1. . . wnis given to the celliat time 1: hi,1i=wi. In sequential mode, for an input of lengthn, all cells of index in [1, n] are initially in the quiescent stateλand theninput symbols are read one after other by a distinguished cell, the cell 1: wtis given to the cell 1 at time t. This requires a specific transition function finput : Σ×S|N | → S that applies to the distinguished cell 1: h1,1i=finput(w1, λ, . . . , λ),h1, ti=finput(wt,h1 +n1, t−1i, . . . ,h1 +

190

n|N |, t−1i), fort >1. Furthermore, in both modes, the computation is bounded by the length of the input: initialized to the permanent state], the cells of index outside [1, n] remain inactive. In the literature, a CA that reads the input word sequentially is known asiterative array (IA).

With outputs being “accept” or “reject”, one specific cell, calledoutput cell, is enough to indicate the answer of the computation. For the neighborhood{−1,0,1}that permits two-way communica-

195

tion, the output cell is usually chosen to be the cell 1. For the neighborhood{−1,0} that induces one-way communication, the output cell is the celln, the single one able to get all information of the input. Now a wordwis said to beaccepted if there is a timetsuch that the output cell reaches a state inSacc.

200

In the sequel, we will focus exclusively on minimal computation time. In minimal time, called real-time, the computation on an inputwis completed as soon as the output cell has received each letter of the input. Then a language is said to be recognized in real-time if each of its words is accepted in minimal time. It gives us four classes of real-time CA languages, according to:

• the input mode is parallel or sequential;

205

• the communication is two-way with the neighborhood{−1,0,1} or one-way with the neigh- borhood{−1,0}.

Definition 2(Real-time complexity classes). Figure 2 illustrates these classes.

1. L belongs to RealTimeCA, the class of languages recognized in real-time by two-way cellular automata with parallel input mode, if L consists of all the words for which the output cell 1

210

is in an accepting state at timen.

2. L belongs to RealTimeOIA, the class of languages recognized in real-time by one-way iterative arrays with sequential input mode, if Lconsists of all the words for which the output cellnis in an accepting state at time2n−1.

3. L belongs to RealTimeIA, the class of languages recognized in real-time by two-way iterative

215

arrays with sequential input mode, ifLconsists of all the words for which the output cell 1 is in an accepting state at timen.

4. L belongs to RealTimeOCA, the class of languages recognized in real-time by one-way cellular automata with parallel input mode, ifL consists of all the words for which the output celln is in an accepting state at timen.

220

It turns out thatRealTimeCA andRealTimeOIAcharacterize the same class of languages (see [4, 20]). Further, as illustrated in Figure 2, the time-space diagram of aRealTimeOCA is topologically equivalent to what is called aTrellis. Just to recapitulate, we have exactly three distinct real-time classes of cellular automata:

1. RealTimeCA=RealTimeOIA;

225

2. RealTimeIA;

3. Trellis=RealTimeOCA.

(9)

w1 w2 w3 w4 w5

RealTimeCA

w1

w2 w3

w4 w5

RealTimeOIA

w1 w2

w3 w4

w5

RealTimeIA

w1 w2 w3 w4 w5 RealTimeOCA

w1 w2 w3 w4 w5 Trellis

Figure 2: The space-time diagrams of the three natural real-time classes

2.2. Our logics

The “local” nature of our logics requires that the underlying structure encoding an input word w=w1. . . wn on its index interval [1, n] only uses thesuccessor andpredecessor functions and the

230

monadic predicatesminandmaxas itsonly arithmetic functions/predicates:

Definition 3 (structure encoding a word). Each nonempty word w =w1. . . wn ∈Σn on a fixed finite alphabetΣis represented by the first-order structure

hwi:= ([1, n]; (Qs)s∈Σ,min,max,suc,pred)

of domain [1, n], monadic predicates Qs, s ∈ Σ, min and max, such that Qs(i) ⇐⇒ wi = s, min(i) ⇐⇒ i = 1, and max(i) ⇐⇒ i = n, and unary functions suc and pred such that suc(i) =i+ 1fori < nandsuc(n) =n,pred(i) =i−1 fori >1 andpred(1) = 1. LetSΣdenote the signature {(Qs)s∈Σ,min,max,suc,pred} of structure hwi. The monadic predicates Qs, s∈Σ,

235

min, andmaxof SΣare called input predicates.

Notation. Let x+k and x−k abbreviate the terms suck(x) and predk(x), for a fixed integer k≥0.

Let us now define two of our logics:

Definition 4 (predecessor logics). A predecessor Horn formula (resp. predecessor Horn formula

240

with diagonal input-output) is a formula of the formΦ =∃R∀x∀yψ(x, y)whereRis a set of binary predicates called computation predicates andψ is a conjunction of Horn clauses on the variables x, y, of signatureSΣ∪R(resp. SΣ∪R∪ {=}), of the form δ1∧. . .∧δr→δ0 where the conclusion δ0 is either a computation atom R(x, y)with R∈R, or ⊥(False) and each hypothesisδi is

1. either an input literal (resp. input conjunction) of one of the forms:

245

• Qs(x−a),Qs(y−a) (resp. Qs(x−a)∧x=y), fors∈Σand an integera≥0,

• U(x−a),¬U(x−a),U(y−a)or ¬U(y−a), for U ∈ {min,max} and an integera≥0, 2. or a computation atom of the form S(x−a, y−b)or S(y−b, x−a), for S∈R and some

integers a, b≥0.

(10)

Let pred-ESO-HORN (resp. pred-dio-ESO-HORN) denote the class of predecessor Horn formulas

250

(resp. predecessor Horn formulas with diagonal input-output) and, by abuse of notation, the class of languages they define.

The formulas of the “predecessor” logics defined above use thepredecessor function butnot the successor function: both logics inductively define problems inincreasing both coordinates xand y. The inductive principle of our last logic is seemingly different: it lies oninclusions of intervals

255

[x, y].

Definition 5(inclusion logic).Aninclusion Horn formulais a formula of the formΦ =∃R∀x∀yψ(x, y) whereRis a set of binary predicates called computation predicatesandψis a conjunction of Horn clauses of signatureSΣ∪R∪ {=,≤, <}, of the formx≤y∧δ1∧. . .∧δr→δ0where the conclusion δ0 is either a computation atomR(x, y)with R∈R, or the atom ⊥(False), and each hypothesis

260

δi is

1. either an input literal of the form5 U(x+a), ¬U(x+a), U(y+a) or ¬U(y+a), for U ∈ {(Qs)s∈Σ,min,max} and an integera∈Z,

2. or an (in)equality x=y or x < y6, 3. or a conjunction of the form

S(x+a, y−b)∧x+a≤y−b forS∈Rand some integers a, b≥0.

265

Letincl-ESO-HORNdenote the class ofinclusion Horn formulasand, also, the class of languages they define.

Note that the “inclusion” meaning of logicincl-ESO-HORNis given by the hypothesesx≤yand x+a≤y−b. It means that the inductive computation of each valueR(x, y), forx≤yandR∈R, only use values of the formS(x+a, y−b), forS∈Rand anincluded interval [x+a, y−b]⊆[x, y].

270

Notation. We will freely use the intuitive abbreviationsx > a,x=a, for a constant integera≥1, andx≤n−a,x < n−a,x=n−a, for a constant integera≥0, and similarly fory. For example, x >3 is written in place of ¬min(x−2)andy ≤n−2is written in place of ¬max(y+ 1).

Remark 3. Without loss of generality, we can suppose that each clause having a hypothesis atom of the formS(x−a, y−b)or S(y−b, x−a), for a, b≥0, has alsothe hypothesesx > a(if a >0)

275

and y > b (if b > 0). The same for each hypothesis atom of the form Qs(x−a) or Qs(y−b), fora, b >0. Similarly, we assume that each clause with a hypothesis of the form Qs(x+a)(resp.

Qs(y+a)), with a >0, also contains the hypothesis x≤n−a (resp. y ≤n−a). Similarly, for each atomS(x+a, y−b), fora, b≥0.

Remark 4. The presentation of the input is more restrictivein Definition 4 of predecessor logics

280

than in that of inclusion logic (Definition 5) because we have forbidden the use of the successor function for uniformity/aesthetics. However, allowing the largest set of input literals(¬)U(x+a), (¬)U(y+a), for U ∈ {(Qs)s∈Σ,min,max} and a ∈ Z, does not modify the expressive power of predecessor logics: Steps 5 and 6 of the normalization of inclusion logic in Section 4 can be easily adapted to predecessor logics.

285

Remark 5. As usual, it is convenient to adopt the semantics of the minimal model of Horn formulas. That means that if we havehwi |= Φ for a formula Φ = ∃R∀x∀yψ(x, y) in any of our logics, then there is a model (hwi,R)|=∀x∀yψ(x, y) for which each R ∈R is minimal. We will say that the formula∀x∀yψ(x, y) defines the (minimal) predicatesR∈Ronhwi.

5Without loss of generality, we assume that there is no negation on a predicateQs.

6Then, the hypothesisxyis redundant.

(11)

2.3. Our main results

290

Much of the paper will be devoted to show that our three logics characterize the three real-time complexity classes of CA. Precisely, we will prove the following statements.

The languages accepted in real-time by two-way CA’s with input fed in a parallel way and output read on the first cell are exactly the languages defined by the predecessor logic:

Theorem 1. RealTimeCA=pred-ESO-HORN.

295

The languages accepted in real-time by IA are exactly the languages defined by the predecessor logic with diagonal input-output:

Theorem 2. RealTimeIA=pred-dio-ESO-HORN.

The languages accepted by Trellis are exactly the languages defined by the inclusion logic:

Theorem 3. Trellis=incl-ESO-HORN.

300

In order to facilitate the programming (= expression) of the problems, we will also extend our Horn logics by a limited use of negation on hypothesis computation atoms (like in Stratified Datalog) while preserving their computational complexity, i.e., extending Theorems 1, 2 and 3 to those extended logics.

3. First examples: express problems; translate formulas into automata

305

In this section, we give an illustration of our logics and their transformation techniques about three classical problems.

3.1. Three examples of problems expressed in our three Horn logics Our logics make it possible to express problems in a natural way.

Example 2. The languagePalindrome={w∈Σ+|w=wR}.

310

The languagePalindrome is defined by the formula ∃notPal∀x∀yψ of incl-ESO-HORN whereψ is the conjunction of the following clauses in which the inductively defined predicate notPal(x, y) means that the factorwx. . . wy is not a palindrome:

• x < y∧Qs(x)∧Qt(y)→notPal(x, y), fors, t∈Σ,s6=t;

• x < y∧notPal(x+ 1, y−1)→notPal(x, y);

315

• x≤y∧min(x)∧max(y)∧notPal(x, y)→ ⊥.

As a consequence of Theorem 3,Palindrome belongs toTrellis(see [10], ex. 4, pp 267-268).

Example 3. The languageUnbordered is the set of wordsw∈Σ+ with no proper prefix of length at least 2 equal to a suffix. Equivalently,

Unbordered:= Σ+\ {uvu|u, v∈Σ∧ |u| ≥2}.

The language Unbordered, which is the complement of the language L studied in [34], can be defined by the formula ΦUnbordered:=∃Border∀x∀yψofpred-ESO-HORN, whereψis the conjunction of the following clauses involving the binary predicateBorderwhose intuitive meaning is given by

320

the equivalenceBorder(x, y) ⇐⇒ 2≤x < y∧w1. . . wx=wy−x+1. . . wy, as expressed by clauses 1 and 2:

1. ¬min(x)∧min(x−1)∧ ¬min(y−1)∧Qs(x−1)∧Qs(y−1)∧Qt(x)∧Qt(y)→Border(x, y), for alls, t∈Σ (meaning: 2 =x < y∧w1w2=wy−1wy→Border(2, y));

2. ¬min(x)∧ ¬min(y) ∧Border(x−1, y −1)∧Qs(x)∧Qs(y) → Border(x, y), for s ∈ Σ

325

(meaning: 2 ≤ x − 1 < y − 1 ∧ w1. . . wx−1 = wy−x+1. . . wy−1 ∧ wx = wy → (3≤x < y∧w1. . . wx=wy−x+1. . . wy));

(12)

3. max(y)∧Border(x, y)→ ⊥(meaning: ∀x¬Border(x, n)).

Justification: We have the equivalence:

∃xBorder(x, n) ⇐⇒ ∃x(2≤x < n∧w1. . . wx=wn−x+1. . . wn) ⇐⇒ w /∈Unbordered.

330

A geometric view of the “algorithm” is given in Figure 3 where the usualxandyaxes are implicit.

a b b a a b b

a b b a a b b

Qs(x)∧Qs(y) Border(x, y)

⊥ the “false”

Figure 3: Computation of ΦUnborderedon the wordabbaabb

So, as a consequence of Theorem 1,Unborderedbelongs toRealTimeCA. In fact, we know much more: [34] has provedUnbordered∈RealTimeCA\(Trellis∪RealTimeIA).

The next example uses geometric constructions defined inductively in logic.

Example 4. The language Disjis the set of wordsw=w1. . . wn∈ {0,1}+ of even lengthn= 2k,

335

w=x1. . . xky1. . . yk, such that xiyi6= 11, for alli∈[1, k].

The languageDisj(well known in Communication Complexity [23] and studied in [40]) can be de- fined by the formula ΦDisj :=∃{D, Ix, Iy, H, T}∀x∀yψofpred-dio-ESO-HORNwhereD, Ix, Iy, H, T are binary predicates such that

• D(x, y) (intuitively) meansy= 2x,

340

• Ix(x, y) meansQ1(x)∧y≥x,

• Iy(x, y) meansQ1(y)∧x≥y,

• H(x, y) meansy is even,y≤2xandQ1(y/2),

• T(x, y) meansxis even,x/2< y≤xandQ1(y−x/2), andψis the following conjunction of clauses:

345

• for (inductively) defining D: x = 1 ∧ y = 2 → D(x, y), and x > 1 ∧ y > 2 ∧ D(x−1, y−2)→D(x, y);

• for defining Ix: x=y∧Q1(x)→Ix(x, y), andy >1∧Ix(x, y−1)→Ix(x, y), and similarly forIy;

• for definingH: 1)y= 2x∧Ix(x, y)→H(x, y), and 2)x >1∧H(x−1, y)→H(x, y);

350

• for definingT: 3)x=y∧H(x, y)→T(x, y), and 4)x >2∧y >1∧T(x−2, y−1)→T(x, y).

Justification: The definitions of D, Ix and Iy are obvious. Let us explain why the definitions of H and T are correct. The hypotheses of clause 1 mean D(x, y)∧Q1(x)∧y ≥xwhich implies y even,y ≤2x, andQ1(y/2); the hypotheses of clause 3 meanx=y,y even,y ≤2x, andQ1(y/2), which imply together x even, x/2 < y ≤ x, y −x/2 = y/2, and then Q1(y−x/2); clause 4 is

355

justified by the trivial implication (x−2)/2 < y−1 ≤x−2 → x/2 < y ≤ x and the identity (y−1)−(x−2)/2 =y−x/2.

(13)

Here are the last two clauses ofψ. First, in order to reject all words of odd lengthn, we use the clausey=n−1∧D(x, y)→ ⊥. Second, for words of even lengthn, the comparison betweenwyand

wy−n/2 with y > n/2 is handled by the clause x = n ∧

360

Iy(x, y)∧T(x, y) → ⊥, which expresses the falsity of the conjunction Iy(n, y)∧T(n, y), equiv- alent to wy = 1∧wy−n/2 = 1 by the previous clauses; hence, this clause means w /∈ Disj. See Figure 4 where the contradiction is expressed by the “signal line” in bold Ix → H → T → Iy, which connects two points of the diagonal of ordinatesy−n/2 andy withwy−n/2=wy= 1.

⊥ x=y

x=y∧Q1(x) Ix(x, y) Iy(x, y) H(x, y) T(x, y) y= 2x

⊥ the “false”

Figure 4: Computation of ΦDisjon the word 1101000110/Disj

So, Theorem 2 implies Disj∈RealTimeIA. The languageDisj is also known not to belong to

365

Trellisas it is proved in [40].

3.2. Normalizing and translating a formula into a cellular automaton: an introduction example In this subsection, we give an illustration, on an example, of the translation processes which will be presented rigorously and in their general form in the following sections. We take as example the formula ΦUnbordered ∈ pred-ESO-HORN constructed in Subsection 3.1 (to describe the language

370

Unbordered). Our first goal is to turn the formula into a normalized formula mimicking a grid circuit. Intuitively, a normalized formula meets the following contraints:

• it should only have one clause with conclusion⊥and this clause should have the hypothesis (x, y) = (n, n) to mimic the output of the grid circuit at vertex (n, n);

• in order to mimic an input on the grid circuit, all clauses using information about the input

375

word should have the hypothesisx= 1;

• the only computation atoms in the hypotheses of computation clauses should be of the form R(x−1, y) orR(x, y−1).

Our second goal will be to deduce from this normalized formula a cellular automaton recognizing the languageUnbordered.

380

Normalizing the formula definingUnbordered:

Let us detail the normalization process, i.e., the successive steps turning ΦUnbordered into a formula in normal form (= mimicking a grid circuit). First, let us define what this means.

Definition 6 (normal form). A formula Φ :=∃R∀x∀yψ of pred-ESO-HORN is in normal form if each clause ofψis of one of the following forms:

385

• an input clauseof the form, fors∈ΣandR∈R:

min(x)∧min(y)∧Qs(y)→R(x, y), ormin(x)∧ ¬min(y)∧Qs(y)→R(x, y);

• the contradiction clause, for a fixedR∈R: max(x)∧max(y)∧R(x, y)→ ⊥;

(14)

• a computation clause of the form δ1 ∧ . . . ∧ δr → R(x, y), for R ∈ R, where each hypothesis δi is a conjunction of the form S(x − 1, y) ∧ ¬min(x) or

390

S(x, y−1)∧ ¬min(y), for S∈R.

Remark 6. It will also be convenient to allow input clauses of the formmin(x)∧min(y)→R(x, y) (resp. min(x)∧¬min(y)→R(x, y)). Indeed, such a clause is obviously equivalent to the conjunction of input clausesV

s∈Σ(min(x)∧min(y)∧Qs(y)→R(x, y))(resp. V

s∈Σ(min(x)∧ ¬min(y)∧Qs(y)→ R(x, y))).

395

The main difficulty encountered in the normalization process will be to maintain or restore the constraint that no computation atom of the formR(x, y) occurs as a hypothesis of a computation clause. This will be performed in an “ad hoc” way on our example. However, in Step 10 of Subsection 4.1, we will describe and justify a general procedure to eliminate the computation atomsR(x, y) in the hypotheses of Horn clauses.

400

0: Before normalization. Recall that ΦUnbordered is the formula ∃Border∀x∀yψ where ψ is the conjunction of the following clauses:

0.a: ¬min(x)∧min(x−1)∧ ¬min(y−1)∧Qs(x−1)∧Qs(y−1)∧Qt(x)∧Qt(y)→Border(x, y), for alls, t∈Σ;

0.b: ¬min(x)∧ ¬min(y)∧Border(x−1, y−1)∧Qs(x)∧Qs(y)→Border(x, y), fors∈Σ;

405

0.c: max(y)∧Border(x, y)→ ⊥.

Remark 7. Since Border(x, y) implies2 ≤x < y≤n, hence x < n, clause (0.c) can be replaced by the equivalent clause

0.c’: max(y)∧Border(x−1, y)→ ⊥.

1: Processing the contradiction clause. In order to push the contradiction to the vertex (n, n), we

410

introduce the binary predicateRmax(y) of intuitive meaning: Rmax(y) (x, y) ⇐⇒ (max(y)→ ⊥). For this purpose, we replace clause (0.c’) by the following three clauses:

1.a: ¬min(x) ∧ Border(x − 1, y) → Rmax(y) (x, y) (of intuitive meaning:

¬min(x)∧Border(x−1, y)→(max(y)→ ⊥), equivalent to clause (0.c’));

1.b: ¬min(x)∧Rmax(y) (x−1, y)→Rmax(y) (x, y) (clause transportingRmax(y) to the sidex=n);

415

1.c: max(x)∧max(y)∧Rmax(y) (x, y)→ ⊥(clause giving the meaning ofRmax(y) ).

2: Processing the input. For eachs∈Σ, we introduce two new binary predicatesWsxandWsy(with intuitive meaningWsx(x, y) ⇐⇒ Qs(x) andWsy(x, y) ⇐⇒ Qs(y)) to replace the unary predicates Qswhenxor y is greater than 1. WsxandWsy are defined by the following clauses:

2.a: min(y)∧Qs(x)→Wsx(x, y);

420

2.b: ¬min(y)∧Wsx(x, y−1)→Wsx(x, y);

2.c: min(x)∧Qs(y)→Wsy(x, y);

2.d: ¬min(x)∧Wsy(x−1, y)→Wsy(x, y).

This justifies replacing, for any s ∈ Σ, atoms Qs(x−1) and Qs(y −1) by Wsx(x−1, y) and Wsy(x, y−1), respectively, and replacing atomsQs(x) andQs(y) byWsx(x, y−1) andWsy(x−1, y),

425

respectively. So, clauses (0.a) and (0.b) become respectively:

2.e: ¬min(x) ∧ min(x− 1) ∧ ¬min(y − 1) ∧ Wsx(x − 1, y) ∧ Wsy(x, y − 1) ∧ Wtx(x, y −1) ∧ Wty(x−1, y)→Border(x, y), fors, t∈Σ;

2.f: ¬min(x)∧ ¬min(y)∧Border(x−1, y−1)∧Wsx(x, y−1)∧Wsy(x−1, y)→Border(x, y), for s∈Σ.

430

Remark 8. Our substitutions respect the constraint that hypotheses of the formR(x, y)are forbid- den in the computation clauses of a normalized formula (Definition 6).

(15)

3: Restriction of computation atoms to the formsR(x−1, y)andR(x, y−1). A new binary predicate Borderx−1is introduced with the intuitive meaningBorderx−1(x, y) ⇐⇒ (x >1∧Border(x−1, y)).

This predicate is defined by the following clause:

435

3.a: ¬min(x)∧Border(x−1, y)→Borderx−1(x, y).

In this way, the clause (2.f)¬min(x)∧ ¬min(y)∧Border(x−1, y−1)∧Wsx(x, y−1)∧Wsy(x−1, y)→ Border(x, y), fors∈Σ, is replaced by the following clause:

3.b: ¬min(x)∧ ¬min(y)∧Borderx−1(x, y−1)∧Wsx(x, y−1)∧Wsy(x−1, y)→ Border(x, y), for s∈Σ.

440

4: Processing ofminandmax. In order to get rid of the atomsmin(x−1) and¬min(y−1) in clause (2.e)¬min(x)∧min(x−1)∧¬min(y−1)∧Wsx(x−1, y)∧Wsy(x, y−1)∧Wtx(x, y−1)∧Wty(x−1, y)→ Border(x, y), fors, t∈Σ, we introduce two binary predicates Rmin(x) and R¬min(y) (with intuitive meaning Rmin(x)(x, y) ⇐⇒ min(x) and R¬min(y)(x, y) ⇐⇒ ¬min(y)) defined by the following clauses:

445

4.a: min(x)∧min(y)→Rmin(x)(x, y);

4.b: ¬min(y)∧Rmin(x)(x, y−1)→Rmin(x)(x, y);

4.c: min(x)∧ ¬min(y)→R¬min(y)(x, y);

4.d: ¬min(x)∧R¬min(y)(x−1, y)→R¬min(y)(x, y).

After substitution, clause (2.e) becomes, fors, t∈Σ:

450

4.e: ¬min(x) ∧ Rmin(x)(x − 1, y) ∧ ¬min(y) ∧ R¬min(y)(x, y − 1) ∧ Wsx(x − 1, y) ∧ Wsy(x, y−1)∧Wtx(x, y−1)∧Wty(x−1, y)→Border(x, y).

Remark 9. We have added the hypothesis atom ¬min(y)in clause (4.e) in order that this clause fulfills the conditions of a computation clause, as given in Definition 6.

5: Defining equality and inequalities. In the next part of the normalization process, we will fold

455

the square domain [1, n]2 along the diagonal x = y on the over-diagonal triangle where x ≤ y.

Therefore, we need predicates representing the equalityx=y(R=) and the inequalitiesx < y(R<) and x≤y (R). R= is defined jointly with the predicateRpred, of intuitive meaningRpred(x, y)

⇐⇒ x=y−1, by the following clauses:

5.a: min(x)∧min(y)→R=(x, y);

460

5.b: ¬min(y)∧R=(x, y−1)→Rpred(x, y);

5.c: ¬min(x)∧Rpred(x−1, y)→R=(x, y).

The predicatesR< andR are defined by the next clauses:

5.d: ¬min(y)∧R=(x, y−1)→R<(x, y);

5.e: ¬min(y)∧R<(x, y−1)→R<(x, y);

465

5.f: min(x)∧min(y)→R(x, y);

5.g: min(x)∧ ¬min(y)→R(x, y);

5.h: ¬min(x)∧R<(x−1, y)→R(x, y).

(16)

wy0=t

wx0 =s

P0= (x0, y0)

Wty Wsy Wsx y

x

Figure 5: Behaviour ofWsxandWsyafter the folding

6: Folding the domain. We want to restrict the access to the input to the axisx= 1 with the only input clauses (i.e., the only clauses involving the input predicatesQs)min(x)∧Qs(y)→Wsy(x, y).

470

In other words, we want to get rid of the clausesmin(y)∧Qs(x)→Wsx(x, y). For this purpose, we fold the square domain [1, n]2along the diagonalx=yon the over-diagonal triangleTn={(x, y)∈ [1, n]2 |1≤x≤y ≤n} by the transformation that maps any point (y, x) such thatx≤y to the point (x, y). Observe that the computation predicates Border and Borderx−1 are included inTn

(see Figure 5) so that the only computation predicates really acting on (x, y) sites such thatx > y

475

are the (in)equality predicates R=, Rpred, R<, R, and the “transport” predicatesWsx andWsy of the input, which are the “folding” of each other. The “folded” versions onTn of the clauses defining WsxandWsy are, for alls∈Σ, the following clauses definingWsy:

• min(x)∧Qs(y)→Wsy(x, y), that will be replaced by the equivalent conjunction of the next clauses (6.a) and (6.b), which are of the allowed forms of input clauses of Definition 6:

480

6.a: min(x)∧min(y)∧Qs(y)→Wsy(x, y), 6.b: min(x)∧ ¬min(y)∧Qs(y)→Wsy(x, y), and

• 6.c:¬min(x)∧Wsy(x−1, y)∧R<(x−1, y)→Wsy(x, y) (whereR<(x−1, y) meansx≤y), and the following clauses definingWsx:

• x=y∧Wsy(x, y)→Wsx(x, y) (“rebound” of the horizontal signalWsy on the diagonal as the

485

vertical signal Wsx), which can be equivalently rewritten as the conjunction of the following two clauses:

6.d: min(x)∧min(y)∧Qs(y)→Wsx(x, y),

6.e: ¬min(x)∧Rpred(x−1, y)∧Wsy(x−1, y)→Wsx(x, y) (whereRpred(x−1, y) meansx=y), and

490

• x < y∧ ¬min(y)∧Wsx(x, y−1)→Wsx(x, y), which can be rewritten as 6.f: ¬min(y)∧R(x, y−1)∧Wsx(x, y−1)→Wsx(x, y).

Figure 5 depicts the new behaviour ofWsxand Wsy. Note that after the folding, the computation predicatesWsxandWsy are included in the upper-diagonal triangleTn.

A normalized formula describing the languageUnbordered. We recapitulate the final list of clauses

495

obtained after steps 1-6:

• the clauses of steps 4 and 5 defining the “arithmetic” computation predicatesRmin(x), R¬min(y), R=,Rpred, R< andR;

500

•the clauses defining the “input” computation predicatesWsxandWsy, fors∈Σ:

6.a: min(x)∧min(y)∧Qs(y)→Wsy(x, y);

(17)

6.b: min(x)∧ ¬min(y)∧Qs(y)→Wsy(x, y);

6.c: ¬min(x)∧Wsy(x−1, y)∧R<(x−1, y)→Wsy(x, y);

6.d: min(x)∧min(y)∧Qs(y)→Wsx(x, y);

505

6.e: ¬min(x)∧Rpred(x−1, y)∧Wsy(x−1, y)→Wsx(x, y);

6.f: ¬min(y)∧R(x, y−1)∧Wsx(x, y−1)→Wsx(x, y);

• the clauses defining the “main” computation predicates Border, Borderx−1 and Rmax(y) , i.e, describing the main computation and its output:

4.e: ¬min(x) ∧ Rmin(x)(x − 1, y) ∧ ¬min(y) ∧ R¬min(y)(x, y − 1) ∧ Wsx(x − 1, y) ∧

510

Wsy(x, y−1)∧Wtx(x, y−1)∧Wty(x−1, y)→Border(x, y) fors, t∈Σ;

3.a: ¬min(x)∧Border(x−1, y)→Borderx−1(x, y);

3.b: ¬min(y)∧ ¬min(x)∧Borderx−1(x, y−1)∧Wsx(x, y−1)∧Wsy(x−1, y)→Border(x, y), for s∈Σ;

1.a: ¬min(x)∧Border(x−1, y)→Rmax(y) (x, y);

515

1.b: ¬min(x)∧Rmax(y) (x−1, y)→Rmax(y) (x, y);

1.c: max(x)∧max(y)∧Rmax(y) (x, y)→ ⊥.

We observe that each of those clauses fulfills the conditions of Definition 6:

• clauses (4.a), (4.c), (5.a), (5.f), (5,g), (6,a), (6,b) and (6,d) are input clauses;

• the clause (1.c) max(x)∧max(y)∧R(x, y) → ⊥where R := Rmax(y) is the contradiction

520

clause;

• the other clauses are computation clauses.

Letψ0 be the conjunction of those clauses and letRbe the set of computation predicates, which areRmin(x), R¬min(y), R=, Rpred, R<, R, Wsy, Wsy, fors∈Σ, Border, Borderx−1 andRmax(y) . The formula obtained∃R∀x∀yψ0is the equivalent normal form of the formula ΦUnborderedinpred-ESO-HORN.

525

The reader may object that although we have tried to present the final list of (normalized) clauses in the least artificial way possible, it is much longer and less readable than the original (short) list of clauses (0,a), (0,b) and (0,c). It means that while the expression of a problem in pred-ESO-HORN(a high-level language) is natural and synthetic, the only interest of its normal form lies in its ability to be translated into an automaton in a straightforward way, as formally established

530

in the next sections.

A real real-timetime CA recognizingUnbordered:

Now that the formula ΦUnbordered has been normalized, we can easily deduce from it a grid circuit recognizing the languageUnbordered. A computation example on this grid circuit and its transformation into a computation of a real-time CA is shown in Figure 6.

535

(18)

Way

Wby

Wax

Wbx

Border

Borderx−1

Rmax(y)

a b b a a b b

(a) On a grid circuit

a b b a a b b

(b) On a real-time CA Figure 6: Computation of the wordabbaabb /Unbordered

After this introduction example of the normalization of a specific formula (with its final trans- formation into an automaton), let us describe and justify in the next Sections 4 and 5 how to normalize our logics in the general case.

4. Normalizing our Horn logics

The most difficult and main parts of the proofs of our descriptive complexity results, i.e., equalities

540

1-3 of Subsection 2.3, are the followingnormalization lemmas.

Lemma 1 (normalization of predecessor logics). Each formula Φ ∈ pred-ESO-HORN (resp. Φ ∈ pred-dio-ESO-HORN) is equivalent to a formulaΦ0∈pred-ESO-HORN(resp. Φ0∈pred-dio-ESO-HORN) where each clause is of one of the following forms:

• input clauseof the form, fors∈ΣandR∈R:

545

min(x)∧min(y)∧Qs(y)→R(x, y), ormin(x)∧ ¬min(y)∧Qs(y)→R(x, y) (resp. x=y∧min(x)∧Qs(x)→R(x, y), orx=y∧ ¬min(x)∧Qs(x)→R(x, y));

• the contradiction clause, for a fixedR∈R: max(x)∧max(y)∧R(x, y)→ ⊥;

• computation clause of the form δ1∧. . .∧δr→R(x, y), forR∈R, where each hypothesis δi

is a conjunction of the form S(x−1, y)∧ ¬min(x) orS(x, y−1)∧ ¬min(y), for S∈R.

550

Let normal-pred-ESO-HORN (resp. normal-pred-dio-ESO-HORN) denote the class of formulas (lan- guages) so defined.

Lemma 2 (normalization of inclusion logic). Each formulaΦ∈incl-ESO-HORN is equivalent to a formulaΦ0∈incl-ESO-HORN where each clause is of one of the following forms:

• input clauseof the form x=y∧Qs(x)→R(x, y), fors∈ΣandR∈R;

555

• the contradiction clause, for a fixedR∈R,min(x)∧max(y)∧R(x, y)→ ⊥;

• computation clauseof the form7x < y∧δ1∧. . .∧δr→R(x, y), whereR∈Rand where each hypothesisδi is a computation atom of either formS(x+ 1, y)orS(x, y−1), for S∈R.

Letnormal-incl-ESO-HORN denote the class of formulas (languages) so defined.

The normalization processes of our three logics are quite similar to each other; further, some

560

steps are exactly the same. Therefore, we choose to present here below the successive normalization steps for one logic: pred-ESO-HORN. Afterwards, we will succinctly describe how those steps should be adapted for the two other logics.

7Note that the hypothesisx < yis equivalent to the expected inequalityx+ 1yorxy1.

Références

Documents relatifs

The infinite time Turing machines (ITTM) work as a classical Turing machine with a head reading and writing on a bi-infinite tape, moving left and right in ac- cordance with

The simulated model is called oblivious multi-head one-way finite automata and is characterised by having its heads moving only forward, on a trajectory that only depends on the

We show that any complete neighborhood is sufficient to recognize in real time any language that can be recognized in real-time by a cellular automaton working on the convex hull of

Then, in Section 3, we study sets of cellular automata closed under simulation (ideals), and how our communication approach relates with them.. 1 Introduction

A cellular automaton is said to run in real-time if it stops, i.e., gives the answer yes or no, at the minimal instant when the elapsed time is sufficient for the output cell (the

Thanks to this characterization, we show that every linear-slender context-free language is recognizable by a real time one-way cellular au- tomaton..

4 Recall that RealTime2SOCA is the class of languages recognized by sequential one-way two-dimensional cellular automata in real-time: this is the minimal time, 3n − 1, for the

The maximum end-to-end latency is empirically bounded by ex- plicitly considering the time a successive frame arrives; while the PTA model does not consider frames after the target