Quantum Finite Multitape Automata - Springer Link

3 downloads 0 Views 188KB Size Report
multitape automata we generalize a more elaborated definition [3]. We are using ..... 3 words x1,x2,x3, then it is possible to ensure that it takes the same time to.
Quantum Finite Multitape Automata Andris Ambainis1? , Richard Bonner2 , R¯ usi¸ nˇs Freivalds3?? , Marats 3? ? ? Golovkins , and Marek Karpinski4† 1

Computer Science Division, University of California, Berkeley, CA 94720-2320 [email protected] 2 Department of Mathematics and Physics, M¨ alardalens University [email protected] 3 Institute of Mathematics and Computer Science, University of Latvia Rai¸ na bulv. 29, Riga, Latvia [email protected] [email protected] 4 Department of Computer Science, University of Bonn 53117, Bonn, Germany [email protected]

Abstract. Quantum finite automata were introduced by C. Moore, J. P. Crutchfield [4], and by A. Kondacs and J. Watrous [3]. This notion is not a generalization of the deterministic finite automata. Moreover, in [3] it was proved that not all regular languages can be recognized by quantum finite automata. A. Ambainis and R. Freivalds [1] proved that for some languages quantum finite automata may be exponentially more concise rather than both deterministic and probabilistic finite automata. In this paper we introduce the notion of quantum finite multitape automata and prove that there is a language recognized by a quantum finite automaton but not by deterministic or probabilistic finite automata. This is the first result on a problem which can be solved by a quantum computer but not by a deterministic or probabilistic computer. Additionally we discover unexpected probabilistic automata recognizing complicated languages.

1

Introduction

The basic model, i.e., quantum finite automata (QFA), were introduced twice. First this was done by C. Moore and J. P. Crutchfield [4]. Later in a different and non-equivalent way these automata were introduced by A. Kondacs and J. Watrous [3]. ? ?? ??? †

Supported by Berkeley Fellowship for Graduate Studies. Research supported by Grant No. 96.0282 from the Latvian Council of Science Research supported by Grant No. 96.0282 from the Latvian Council of Science Research partially supported by the International Computer Science Institute, Berkeley, California, by the DFG grant KA 673/4-1, and by the ESPRIT BR Grants 7079 and ECUS030

J. Pavelka, G. Tel, M. Bartoˇ sek (Eds.): SOFSEM’99, LNCS 1725, pp. 340–348, 1999. c Springer-Verlag Berlin Heidelberg 1999

Quantum Finite Multitape Automata

341

The first definition just mimics the definition of 1-way finite probabilistic only substituting stochastic matrices by unitary ones. To define quantum finite multitape automata we generalize a more elaborated definition [3]. We are using these notations in the following definition: z ∗ is the complex conjugate of a complex number z. M =def {1, 2, . . . , m}. The k-th component of an arbitrary vector s will be defined as sk . We shall understand by I an arbitrary element from the set P(M ) \ {∅}.  {↓, →}, if i ∈ /I RI =def A1 × A2 × · · · × Am , where Ai = {“nothing”}, if i ∈ I.  {↓, →}, if i ∈ I TI =def B1 × B2 × · · · × Bm , where Bi = {“nothing”}, if i ∈ / I. d

I The function Ri × Ti −→ {↓, →}m is defined as follows:

dI (r, t)

=def (d1I (r, t), d2I (r, t), . . . , dm I (r, t)),

where

diI (r, t)

 =

/I ri , if i ∈ ti , if i ∈ I.

Definition 1. A quantum finite multitape automaton (QFMA) A = (Q; Σ; δ; q0 ; Qa ; Qr ) is specified by the finite input alphabet Σ, the finite set of states Q, the initial state q0 ∈ Q, the sets Qa ⊂ Q, Qr ⊂ Q of accepting and rejecting states, respectively, with Qa ∩ Qr = ∅, and the transition function δ : Q × Γ m × Q × {↓, →}m −→ C[0,1] , where m is the number of input tapes, Γ = Σ ∪ {#, $} is the tape alphabet of A and #,$ are end-markers not in Σ, which satisfies the following conditions (of well-formedness): 1. Local probability condition. ∀(q1 , σ) ∈ Q × Γ m :

X

|δ(q1 , σ, q, d)|2 = 1.

(q,d)∈Q×{↓,→}m

2. Orthogonality of column vectors condition. X ∀q1 , q2 ∈ Q, q1 6= q2 , ∀σ ∈ Γ m :

δ ∗ (q1 , σ, q, d)δ(q2 , σ, q, d) = 0.

(q,d)∈Q×{↓,→}m

3. Separability condition. ∀I ∈ P(M ) \ {∅} ∀q1 , q2 ∈ Q ∀σ1 , σ2 ∈ Γ m , where ∀i ∈ / I σ1i = σ2i X

∀t1 , t2 ∈ TI , where ∀j ∈ I tj1 6= tj2 δ ∗ (q1 , σ1 , q, dI (r, t1 ))δ(q2 , σ2 , q, dI (r, t2 )) = 0.

(q,r)∈Q×RI

States from Qa ∪Qr are called halting states and states from Qnon = Q\(Qa ∪Qr ) are called non-halting states.

342

Andris Ambainis et al.

To process an input word vector x ∈ (Σ ∗ )m by A it is assumed that the input is written on every tape k with the end-markers in the form wxk = #xk $ and that every such a tape, of length |xk | + 2, is circular, i. e., the symbol to the right of $ is #. For the fixed input word vector x we can define n ∈ INm to be an integer vector which determines the length of input word on every tape. So for every n we can define Cn to be the set of all possible configurations of A where |xi | = ni . m Q |Cn | = |Q| (ni + 2). Every such a configuration is uniquely determined by i=1

a pair |q, si, where q ∈ Q and 0 ≤ si ≤ |xi | + 1 specifies the position of head on the i-th tape. Every computation of A on an input x, |xi | = ni , is specified by a unitary evolution in the Hilbert space HA,n = l2 (Cn ). Each configuration c ∈ Cn corresponds to the basisPvector in HA,n . Therefore a global state of A in the space P HA,n has a form αc |ci, where |αc |2 = 1. If the input word vector is c∈Cn c∈Cn P x and the automaton A is in its global state |ψi = αc |ci, then its further c∈Cn

step is equivalent to the application of a linear operator Uxδ over Hilbert space l2 (Cn ). Definition 2. The linear operator Uxδ is defined as follows: X Uxδ |ψi = αc Uxδ |ci. c∈Cn

If a configuration c = |q 0 , si, then X Uxδ |ci =

δ(q 0 , σ(s), q, d) | q, τ (s, d)i,

(q,d)∈Q×{↓,→}m

where σ(s) = (σ 1 (s), . . . , σ m (s)), σ i (s) specifies the si -th symbol on the i-th tape, and τ (s, d) = (τ 1 (s, d), . . . , τ m (s, d)),  i (s + 1) mod (ni + 2), if di = ‘ →0 i τ (s, d) = si , if di = ‘ ↓0 . Lemma 1. The well-formedness conditions are satisfied iff for any input x the mapping Uxδ is unitary. Language recognition for QFMA is defined as follows. For each input x with the corresponding vector n, ni = |xi |, and a QFMA A = (Q; Σ; δ; q0 ; Qa ; Qr ) we define Cna = {(q, s) | (q, s) ∈ Cn , q ∈ Qa }, Cnr = {(q, s) | (q, s) ∈ Cn , q ∈ Qr }, Cnnon = Cn \ (Cna ∪ Cnr ). Ea , Er , Enon are the subspaces of l2 (Cn ) spanned by Cna , Cnr , Cnnon respectively. We use the observable O that corresponds to the orthogonal decomposition l2 (Cn ) = Ea ⊕ Er ⊕ Enon . The outcome of each observation is either “accept” or “reject” or “non-halting”.

Quantum Finite Multitape Automata

343

The language recognition is now defined as follows: For an x ∈ (Σ ∗ )m we consider as the input ωx , ωxk = #xk $, and assume that the computation starts with A being in the configuration |q0 , {0}m i. Each computation step consists of two parts. At first the linear operator Uωδ x is applied to the current global state and then the resulting superposition, i.e., global state, is observed using the P observable O as defined above. If the global state before the observation is αc |ci, then the probability that the subspace Ei , i ∈ {a, r, non}, will be c∈Cn P |αc |2 . The computation continues until the result of an observation chosen is i c∈Cn

is “accept” or “reject”. Definition 3. A QFMA A = (Q; Σ; δ; q0 ; Qa ; Qr ) is simple if for each σ ∈ Γ m there is a linear unitary operator Vσ over the inner-product space l2 (Q) and a function D : Q −→ {↓, →}m , such that  hq|Vσ |q1 i, if D(q) = d m δ(q1 , σ, q, d) = ∀q1 ∈ Q ∀σ ∈ Γ 0, otherwise. Lemma 2. If the automaton A is simple, then conditions of well-formedness are satisfied iff for every σ Vσ is unitary. We shall deal only with simple multitape automata further in the paper.

2

Quantum vs. Probabilistic Automata

Definition 4. We shall say that an automaton is deterministic reversible finite multitape automaton (RFMA), if it is a simple QFMA with δ(q1 , σ, q, d) ∈ {0, 1}. Definition 5. We say that a language L is [m, n]-deterministically recognizable if there are n deterministic automata A1 , A2 , An such that: a) if the input is in the language L, then all n automata A1 , . . . , An accept the input; b) if the input is not in the language L, then at most m of the automata A1 , . . . , An accept the input. Definition 6. We say that a language L is [m, n]-reversibly recognizable if there are n deterministic reversible automata A1 , A2 , An such that: a) if the input is in the language L, then all n automata A1 , . . . , An accept the input; b) if the input is not in the language L, then at most m of the automata A1 , . . . , An accept the input.

344

Andris Ambainis et al.

Lemma 3. If a language L is [1, n]-deterministically recognizable by 2-tape finite automata, then L is recognizable by a probabilistic 2-tape finite automaton with n probability n+1 . Proof. The probabilistic automaton starts by choosing a random integer 1 ≤ r ≤ (n + 1). After that, if r ≤ n, then the automaton goes on simulating the deterministic automaton Ar , and, if r = n + 1, then the automaton rejects the n , and the inputs not in input. The inputs in L are accepted with probability n+1 n . t u the language are rejected with a probability no less than n+1 Lemma 4. If a language L is [1, n]-reversibly recognizable by 2-tape finite automata, then L is recognizable by a quantum 2-tape finite automaton with n probability n+1 . Proof. In essence the algorithm is the same as in Lemma 3. The automaton 1 . (It is possible starts by taking n + 1 different actions with amplitudes √n+1 to construct a unitary matrix to make such a choice feasible.) After that the automaton simultaneously goes on simulating all the deterministic reversible automata Ar , 1 ≤ r ≤ (n + 1), where the automaton An+1 rejects an input. The simulation of each deterministic reversible automaton uses its own accepting and rejecting states. (Hence the probabilities are totaled, not the amplitudes.) t u First, we discuss the following 2-tape language L1 = {(x1 ∇x2 , y) | x1 = x2 = y}, where the words x1 , x2 , y are unary. Lemma 5. (Proved by R. Freivalds [2].) For arbitrary natural n, the language L1 is [1, n]-deterministically recognizable. Lemma 6. For arbitrary natural n, the language L1 is [1, n]-reversibly recognizable. Proof. By Lemma 5, the language L1 is [1, n]-deterministically recognizable. However it is easy enough to make the construction of the automata A1 , . . . , An in the following manner: a) every automaton is reversible; b) if a word pair is in the language L1 , then every automaton consumes the same number of steps to accept the word pair. The last requirement will be essential further in the paper. If at least the first requirement is met, then the language is [1, n]-reversibly recognizable. t u Theorem 1. The language L1 can be recognized with arbitrary probability 1 −  by a probabilistic 2-tape finite automaton but this language cannot be recognized by a deterministic 2-tape finite automaton.

Quantum Finite Multitape Automata

345

Theorem 2. The language L1 can be recognized with arbitrary probability 1 −  by a quantum 2-tape finite automaton. t u

Proof. By Lemmas 4 and 6.

In an attempt to construct a 2-tape language recognizable by a quantum 2-tape finite automaton but not by probabilistic 2-tape finite automata we consider a similar language L2 = {(x1 ∇x2 ∇x3 , y) | there are exactly 2 values of x1 , x2 , x3 such that they equal y}, where the words x1 , x2 , x3 , y are unary. Theorem 3. A quantum automaton exists which recognises the language L2 9 with a probability 16 −  for arbitrary positive . Proof. This automaton takes the following actions with the following amplitudes: √

– compares x1 = x2 = y, a) √43 · 1 2π b) √43 · (cos 2π + i sin ) 3 3 – compares x2 = x3 = y, 3 4π 4π c) √4 · (cos 3 + i sin 3 ) – compares x1 = x3 = y, d) 47 – says “accept”. By Theorem 2 comparison in actions a), b), c) can be accomplished. By construction in Lemma 4 the comparison in each action a), b), c) is implemented by starting n + 1 different branches. Therefore in any action i), i ∈ {a, b, c}, if a comparison is successful, the automaton will come respectively into non-halting states qa,1 , . . . , qa,n , qb,1 , . . . , qb,n , qc,1 , . . . , qc,n , reaching the symbol pair ($, $) on the tapes. The transition ($, $) for every k = 1, . . . , n is as follows: qa,k qb,k qa1,k √13 qr,k √13 qa2,k √13

√1 3 √1 (cos 3 √1 (cos 3

qc,k 4π 3 2π 3

+ i sin + i sin

4π 3 ) 2π 3 )

√1 3 √1 (cos 3 √1 (cos 3

2π 3 4π 3

+ i sin 2π 3 ) 4π + i sin 3 )

Here qa1,k , qa2,k are accepting states and qr,k are rejecting states. If y equals all 3 words x1 , x2 , x3 , then it is possible to ensure that it takes the same time to reach the end-marking symbol pair in every action on every branch. Therefore 7 +  (since the amplitudes of the actions the input is accepted with probability 16 a), b), c) total to 0). If y equals 2 out of 3 words x1 , x2 , x3 , then the input is 9 − . If y equals at most one of the words x1 , x2 , x3 , accepted with probability 16 7 then the input is accepted with probability 16 +  (only if the action d) is taken). t u Unfortunately, the following theorem holds. Theorem 4. A probabilistic automaton exists which recognizes the language L2 with a probability 21 40 .

346

Andris Ambainis et al.

Proof. The probabilistic automaton with probability

1 2

takes an action A or B:

A) Choose a random j and compare xj = y. If yes, accept with probability 19 20 . 1 If no, accept with probability 20 . B) Choose a random pair j, k and compare xj = xk = y. If yes, reject. If no, accept with probability 12 20 . If y equals all 3 words x1 , x2 , x3 and the action A is taken, then the input is accepted with relative probability 19 20 . If y equals all 3 words x1 , x2 , x3 and the action A is taken, then the input is accepted with relative probability 0. This gives the acceptance probability in the case if y equals all 3 words x1 , x2 , x3 , to 21 be 19 40 and the probability of the correct result “no” to be 40 . If y equals 2 words out of x1 , x2 , x3 and the action A is taken, then the input is accepted with relative probability 13 20 . If y equals 2 words out of x1 , x2 , x3 and the action B is taken, then the input is accepted with relative probability 8 20 . This gives the acceptance probability in the case if y equals 2 words out of x1 , x2 , x3 , to be 21 40 . If y equals only 1 word out of x1 , x2 , x3 and the action A is taken, then the 7 input is accepted with relative probability 20 . If y equals only 1 word out of x1 , x2 , x3 and the action B is taken, then the input is accepted with relative probability 12 20 . This gives the acceptance probability in the case if y equals only 1 word out of x1 , x2 , x3 , to be 19 40 and the probability of the correct result “no” . to be 21 40 If y equals no word of x1 , x2 , x3 and the action A is taken, then the input is 1 accepted with relative probability 20 . If y equals no word of x1 , x2 , x3 and the action B is taken, then the input is accepted with relative probability 12 20 . This gives the acceptance probability in the case if y equals no word of x1 , x2 , x3 , to 27 be 13 t u 40 and the probability of the correct result “no” to be 40 . Now we consider a modification of the language L2 which might be more difficult for a probabilistic recognition: L3 = {(x1 ∇x2 ∇x3 , y1 ∇y2 ) | there is exactly one value k such that there are exactly two values j such that xj = yk } Theorem 5. A quantum finite 2-tape automaton exists which recognizes the language L3 with a probability 36 67 −  for arbitrary positive . However this language also can be recognized by a probabilistic 2-tape finite automaton. Theorem 6. A probabilistic finite 2-tape automaton exists which recognizes the language L3 with a probability 13 25 −  for arbitrary positive . Proof. The probabilistic automaton with probability 7 takes action D: C or with probability 25

6 25

takes action A or B or

A) Choose a random k and two values of j. Then compare xj = yk . If yes, accept. If no, reject.

Quantum Finite Multitape Automata

347

B) Chose a random k and compare x1 = x2 = x3 = yk . If yes, reject. If no, accept. C) Choose two values j and m. Then compare xj = xm = y1 = y2 . If yes, reject. If no, accept. D) Says “reject”. Notice that the actions A, B, C are probabilistic, and they can be performed only with probability 1 −  (actions A and B are described in the proof of Theorem 1 and action C is similar). The acceptance probabilities equal: no yk equals 2 or 3 one yk equals 2 one yk equals 3 two yk equal 2 all yk equal all

A B C total 12 xj 0 1 1 25 13 xj 16 1 1 25 1 1 12 xj 2 2 1 25 12 xj 13 1 23 25 6 xj 1 0 0 25

t u

Finally we consider a modification of the languages above which recognition indeed is impossible by probabilistic automata: L4 = {(x1 ∇x2 , y) | there is exactly one value j such that xj = y} where the words x1 , x2 , y are binary. Theorem 7. A quantum finite 2-tape automaton exists which recognizes the language L4 with a probability 47 . Proof. The automaton has two accepting qa1 , qa2 and three rejecting states qr1 , qr2 , qr3 and starts the following actions by reading the pair (#, #) with the following amplitudes: q a) with an amplitude 27 compares x1 to y, q b) with an amplitude − 27 compares x2 to y, q c) with an amplitude 37 immediately goes to the state qa1 . Actions a) and b) use different non-halting states to process the word pair. All these actions the automaton processes simultaneously. In actions a) and b), if no (not equal), it goes accordingly to the states qr1 or qr2 , if yes, then reaches correspondent non-halting states qα or qβ , while the symbol pair on the tapes is ($, $). The transition for ($, $) and states qα , qβ , qa2 , qr3 is as follows: qa2 qr3

qα √1 2 √1 2

qβ √1 2 − √12

348

Andris Ambainis et al.

If all the words are equal, it is possible to ensure that it takes the same time to reach the end-markers onqboth tapes, therefore the automaton reaches the q superposition

2 7 |qα , s, ti −

2 7 |qβ , s, ti,

where s and t specify the place of $ on

each tape, and the input is accepted with probability 37 . (Since the amplitudes of the actions a) and b) equal to 0.) If one of the words xi equals y, then the input is accepted with probability 47 . If none of the words xi equals y, then the input is accepted with probability 37 . t u

References 1. Andris Ambainis and R¯ usi¸ nˇs Freivalds. 1-way quantum finite automata: strengths, weaknesses and generalizations. Proc. 39th FOCS, 1998, pp. 332–341. http://xxx.lanl.gov/abs/quant-ph/9802062. 340 2. R¯ usi¸ nˇs Freivalds. Fast probabilistic algorithms. Lecture Notes in Computer Science, 1979, Vol. 74, pp. 57–69. 344 3. Attila Kondacs and John Watrous. On the power of quantum finite state automata. In Proc. 38th FOCS, 1997, pp. 66–75. 340, 340, 340, 341 4. Christopher Moore, James P. Crutchfield Quantum automata and quantum grammars. http://xxx.lanl.gov/abs/quant-ph/9707031. 340, 340