• No se han encontrado resultados

Prèstec interbibliotecar

In document Memòria del curs acadèmic 1999 2000 (página 158-162)

Donacions i compres bibliogràfiques

7. Prèstec interbibliotecar

Given a functionf:X→2Y and a set of inputsx X, the lifting of function f to a set of inputs x is defined asf(x) def= Sxxf(x). Given two lifted functionsf:X2Y and g:Y→2Z, we define their compositionfg(x)def

= g(f(x)). This definition follows the

convention from Fülöp et al. [FV98], i.e., applies first f, then g, contrary to how is used for standard function composition. The intuition is that f corresponds to the relation Rf:X×Y, Rf

def

= {(x,y) | y f(x)}, so that fg corresponds to the binary relation compositionRf◦Rg

def

={(x,z)| ∃y(Rf(x,y)∧Rg(y,z))}.

Definition 2.28. A class of transducersC is closed under composition iff for everyT1 andT2 that areC-definableT1◦T2is alsoC-definable.

Theorem 2.29. The composition of two Cartesian S-EFTs is not S-EFT-definable.

Proof. We show two Cartesian S-EFTs whose composition cannot be expressed by any

S-EFT. LetAbe following S-EFT overIntInt

A= ({q},q,{q true/[x1,x0]

andBbe following S-EFT overIntInt

B= ({q0,q1},q0,{q0 −−−−→true/1[x0] q1,q1−−−−−−→true/[x21,x0] q1,q1−−−−→true/1[x0] •}).

The two transformations behave as in the following examples:

TA([a0,a1,a2,a3,a4,a5,a6, . . .]) = [a1,a0,a3,a2,a5,a4,a7, . . .], TB([b0,b1,b2,b3,b4,b5, . . .]) = [b0,b2,b1,b4,b3,b6,b5, . . .].

When we composeTAandTB we get the following transformation:

TAB([a0,a1,a2,a3,a4,a5,a6, . . .]) = [a1,a3,a0,a5,a2,a7,a4,a9,a6,a8, . . .].

Intuitively, looking atTABwe can see that no finite look-ahead seems to suffice for this function. Formally, for eachaisuch thati≥0,TA◦Bis the following function:

• ifi=1,ai is output at position 0;

• ifiis even and greater than 1,ai is output at positioni−2;

• ifiis equal tok−2 wherekis the length of the input,aiis output at positionk−1; • ifiis odd and different fromk−2,ai is output at positioni+2.

It is easy to see that the above transformation cannot be computed by any S-EFT. Let’s assume by contradiction that there exists an S-EFT that computes TAB. We consider the S-EFTCwith minimal look-ahead (let’s sayn) that computesTAB.

We now show that on an input of length greater thann+2,Cwill misbehave. The first

transition ofC that will apply to the input will have a look-ahead of sizel ≤ n. We now have three possibilities (the casen=k−2 does not apply due to the length of the input):

l=1: before outputtinga0(at position 2) we need to outputa1anda3which we have

not read yet; this is a contradiction;

l is odd: position l+1 is receiving al−1 therefore C must output also the elements at

positionl; positionlshould receiveal+2which is not reachable with a look-ahead

of justl; this is a contradiction;

l is even and greater than1: sincel> 1, positionlis receivingal2. This meansCis also

outputting positionl1; positionl1 should receiveal+1which is not reachable with a look-ahead of justl; this is a contradiction.

Thus, we have shown thatncannot be the minimal look-ahead which contradicts our initial hypothesis. ThereforeTABis not S-EFT-definable.

Corollary 2.30. S-EFT are not closed under composition.

We now show that in general the composition of two S-EFTs cannot be effectively con- structed.

Theorem 2.31 (Composition is not constructible). Given two S-EFTs with look-ahead 2

over quantifier free successor arithmetic and tuples, A and B, such that composition f =TAB

is S-EFT definable, we cannot effectively construct an S-EFT that defines the transformation f .

Proof. Given a Minsky machine M, we construct two S-EFTsA andB such that their

compositionABis definable by an S-EFTCsuch that:

• ifMhalts on input(0, 0)with a non-zero output inr1,Cis defined exactly on the

run ofM, and

• otherwiseCis the empty transducer that is undefined on any input.

The proof is analogous to that of Theorem 2.11 and we use the composition of S-EFTs to simulate the intersection of two S-EFAs. Consider the predicates defined in the proof of Theorem 2.11. Let A = ({p0},p0,{p0 ϕ step/[x0,x1] −−−−−−→2 p0, p0−−−→true0/• }), B = ({q0,q1},q0,{q0 ϕ ini/[x0] −−−−→1 q1, q1 ϕ step/[x0,x1] −−−−−−→2 q1, q1 ϕ fin/[x0] −−−−→1 •}).

This construction ensures that α ∈ D(AB)iff αis a valid run of M, i.e.,α[0]is the

initial configuration,α[i+1]is a valid successor configuration ofα[i](this follows from

Afor all oddi < |α|and from Bfor all even i < |α|), andα[|α| −1]is a halting con-

figuration. Since Mis deterministic and we fix the initial configuration, we have that

D(A◦B) ={α}iff there existsα, such thatMhalts onαorD(A◦B) =∅otherwise. In

the first case we will haveTAB(α) =αand undefined on any input different fromα. In

the second caseTAB is always undefined. In both casesTAB is S-EFT definable. Let’s callCthe S-EFT that implementsTAB. Since emptiness of S-EFT is a decidable prob- lem, we can decide if M halts on input(0, 0)with a non-zero output inr1. Since, the

latter is an undecidable problem we have a contradiction and therefore the composition of two S-EFTs cannot be computed.

Composition of symbolic finite transducers with look-back In this section we dis- cuss how SLTs compare to S-EFTs regarding composition. Recall that symbolic finite transducers with look-back k(k-SLTs) [BB13] have a sliding window of sizek that al- lows, in addition to the current input character, references of up tok−1 previous char- acters (using predicates of arityk). All the states of an SLT are final and are associated with a constant output. Botinˇcan et al. [BB13] incorrectly claimed that SLTs are closed under composition. We briefly explain SLTs are not closed under composition using two SLTs over the sortσ = N. Consider an SLT Athat echoes the first element of the input, then deletes all the subsequent elements that are smaller or equal than 5, and finally outputs the first element that is greater than 5. For example on the input se- quence [1, 2, 4, 2, 5, 6], the SLT Aoutputs the sequence [1, 6]. We observe that on any

input sequence of the forma1. . .ansuch that for every 1 < i ≤ n, ai ≤ 5, andan > 5, the SLT A outputs the sequence a1an. Next consider the SLT Bthat given a sequence

a1a2outputs the sequencea2a1 (this can be implemented by an SLT with look-back 2).

On any input sequence of the forma1. . .ansuch that for every 1 < i ≤ n,ai ≤ 5, and

an>5, the function resulting by composingAwithBshould output the sequenceana1.

But this function can’t be implemented using finite look-back. In particular, in order to output the symbola1to the right ofan, the symbola1must be read by a transition that

also reads the symbol an. Sincen can be arbitrarily large, no finite look-backk would suffice.

In document Memòria del curs acadèmic 1999 2000 (página 158-162)