Succinctness of two-way probabilistic and quantum finite automata
We prove that two-way probabilistic and quantum finite automata (2PFA's and 2QFA's) can be considerably more concise than both their one-way versions (1PFA's and 1QFA's), and two-way nondeterministic finite automata (2NFA's). For this purpose, we dem…
Authors: Abuzer Yakaryilmaz, A. C. Cem Say
Succinctness of t w o-w a y probabilistic and quan tum fin ite automata ⋆ Abuzer Y ak aryılmaz and A.C. Cem Sa y Bo˘ gazi¸ ci Universit y , Department o f Computer Engineering, Bebek 34342 ˙ Istanbul, T urkey abuzer,say @boun.edu.tr December 22, 2009 Abstract. W e pro ve th at t wo-w ay probabilistic and quantum finite automata (2PF A’s and 2QF A’s) can be considerably more concise than both their one-wa y versions (1P F A’s and 1QF A’s), and t wo-w ay nondeterministic finite automata (2NF A’s). F or this purp ose, we demonstrate sev eral infinite families of regular languages whic h can b e recognized with some fixed probabilit y grea ter than 1 2 by j ust tun ing the transition amplitudes of a 2QF A (and, in one case, a 2PF A) with a constant n umber of states, whereas the sizes of th e corresp onding 1PF A’s, 1QF A’s and 2NF A’s grow without b oun d. W e also show that 2QF A’s with mixed states can supp ort highly efficient probabilit y amplification. The weak est known mod el of comput ation where quantum computers recognize more languages with b ounded error than their classical counterparts is introduced. 1 In tro duct ion In recen t ye ars, th e researc h effo rt on quan tu m v ersions of finite automata has mainly fo cus ed on one- w a y mo dels, with th e study of tw o-wa y quant um finite automata (2QF A’s), wh ich are synon ymous with constan t space qu an tum T uring mac h ines, receiving relativ ely less atten tion. In their seminal pap er, Kondacs and W atrous [KW97] prov ed that 2QF A’ s recognize all r egular languages with zero error, and the language L eq = { a n b n | n ≥ 0 } w ith an y desired error b ound ǫ > 0, in time O ( 1 ǫ | w | ), using O ( 1 ǫ 2 ) states, where w is the inpu t string. Since t wo -wa y pr obabilistic finite automata (2PF A’s) can decide L eq only in exp onen tial time [F re81,K F90,DS92], this established the s u p eriority of 2QF A’s o v er 2PF A’s. Pa rallelling w ork b y Aharono v et al. [AKN98 ] on quantum ci rcuits with mixed states, Am bainis and W atrous [A W02] introd uced an alte rn ativ e mo del, the t wo- wa y fin ite automaton with quan tum and classical states (2QCF A), whic h includ es a co nstant-siz e quan tum part whic h ma y b e in a mixed state, but requ ir es the tape h ead p osition to b e cla ssical. Y ak ary ılmaz and Sa y [YS09a] n oted that conv entio nal metho ds of p robabilit y amplification give significan tly inefficien t resu lts when app lied to 2QF A’s, and presente d metho ds whic h can b e u sed to decide L eq with error b ound ǫ in as lo w as O ( | w | ) steps (i.e. w ith runtime in dep end en t of ǫ ), and w ith as lo w as O (log 2 ( 1 ǫ ) log log( 1 ǫ )) states. Issues of succinctness, as exemplified ab o v e, constitute a rich subtopic of automata theory [DS90,KF90,AF98,MPP01,ANTSV02,F OM09,YS 09a]. In this pap er, w e examine ho w the com bi- nation of t w o-w a yness and (quant um or classical) probabilistic transitions a ffects su ccinctness. As our main result, w e demonstr ate seve ral infinite families of regular languages whic h ca n b e recog- nized with some fixed pr ob ab ility grea ter than 1 2 b y ju s t tuning the transition amplitudes of a 2QF A ⋆ A p reliminary version of this p ap er w as presented at t he Au toMathA Plenary Conference 2009, in Li` ege, Belgium and this work w as partially supp orted b y the Scien tific and T echnolog ical Research Co uncil of T u rkey (T ¨ UB ˙ IT AK) with grant 108142 and the Bo˘ gazi¸ ci Universit y Research F u nd with gran t 08A102. (and, in one case, a 2PF A) with a constan t n umb er of states, w hereas the sizes of the corresp onding one-w a y machines, an d tw o-wa y nondeterministic finite automata (2NF A’s) grow w ith ou t b ound. The Kondacs-W atrous mod el of quan tum fin ite automaton (to b e called, from no w on, KW QF A), whic h allo ws measuremen ts of a restricted type, rather th an the full set sanctioned b y quantum theory , has b een prov en to be we ak er in terms of language recognition p o w er [KW97 ], probabilit y amplification capabilit y [AF98 ], and, in some cases at least, succinctness [ANTSV02], than the corresp ondin g classical mo del, in th e one-wa y case. More general mo dels, suc h as the 2QCF A, emplo ying mixed states, are able to s imulate the corresp onding classical probabilistic automata efficien tly in b oth the one-wa y and tw o-wa y settings, and to recognize some languages th at 2PF A’s cannot [A W02]. W e sh ow that 2QF A’s with mixed states can supp ort highly efficien t probabilit y amplification, surpassing the b est kno wn metho ds for 2KW QF A’s recognizing these languages. W e in tro du ce a new mo d el of quan tum automaton, named the t wo -wa y quan tum finite automa- ton w ith reset. T h is is an enhancemen t to the 2KW QF A, end o wing it w ith the capabilit y of resetting the p osition of th e tap e head to the left end of the tap e in a single mo v e dur ing the compu tation. W e u se this mo del b oth in the pro of of our main r esult, and in the demonstration of our pr obabilit y amplification tec hniqu es. W e mostly f o cus on a r estricted form of these mac hines, called the one–w a y quan tum fin ite automaton with r estart (1QF A ), whic h can sw itc h only to the in itial state durin g left r esets, and cannot p erform single-st ep left or stationary mo v es. W e giv e evidence that this is the w eak est kn own mo del of computation where quantum co mp u ters recognize more languages with b ound ed error than their classical coun terparts. The rest of this pap er is structured as follo ws: S ection 2 conta ins the definitions and some basic facts ab out our new mod el that will be used throughout the pap er. In Section 3, w e pro ve s ome k ey lemmata ab out the relationship b et w een on e–wa y quan tum finite automata w ith and without restart, and examine th e class of languages recognized with b ounded error by 1QF A ’s. Our main succinctness result is p resen ted in Section 4 . In Secti on 5, we present sev eral algorithms that impro ve previous results ab out the efficiency of pr ob ab ility amplificati on in 2KW Q F A’s and 2QCF A’s. In Section 6, we inv estigate the computational p o wer of prob ab ilistic finite automata with restart. Section 7 is a conclusion. 2 Preliminaries W atrous [W at97 ] notes that a 2KW Q F A algorithm he presen ts for recognizing a nonregular language is remark ably costly in terms of probabilit y amplification, and states that this problem stems fr om the fa ct that 2KW QF A’s cannot “reset” themselv es during exe cution to rep eatedly c arry out the same computation. The 2QCF A mo d el pro vid es one wa y of solving this problem, b y ha ving a classical part, in addition to the quantum register. W e present an alternativ e 2 QF A mo del, employing only quan tum s tates, whose only difference from the 2KW QF A is the existence o f an additional “reset mo v e” in its rep er tory . Section 2.1 con tains the definitions of this and the other mo dels that will b e examined in the pap er. S ection 2.2 describ es some facts whic h will make the analyses of the algorithms in later sectio ns easier. 2.1 Definitions Let Σ b e an in put alphab et, not con taining the end–marker sym b ols ¢ and $, and let Γ = Σ ∪ { ¢ , $ } b e the tap e alphab et. A 2-way qu antum finite automaton with r eset (2QF A x ) is a 7-tuple M = ( Q, Σ , δ, q 0 , Q acc , Q r ej , Q r eset = ∪ q ∈ Q non Q x q ) , (1) where 1. Q = { q 0 , . . . , q n } is the finite set of states; 2. δ is the transition fun ction, d escrib ed b elo w; 3. q 0 ∈ Q is the initial state; 4. Q acc is the set of accepting states; 5. Q r ej is the set of r ejecting states; 6. Q non = Q \ ( Q acc ∪ Q r ej ∪ Q r eset ) is the set of n onhalting and nonresetting states; 7. Q r eset is the un ion of d isjoin t reset sets, i.e., eac h Q x q ∈ Q non con tains reset states that cause the computation to restart with state q , as describ ed b elo w. W e assume that the states in Q non ha v e smaller indices than other memb ers of Q ; q i ∈ Q non for 0 ≤ i < | Q non | . The configurations of a 2QF A x are pairs of th e form ( s t at e, head position ). Initially , the head is on th e left end -mark er ¢ , and so the mac h in e starts computation in the sup erp osition | q 0 , 0 i . The transition fun ction of a 2QF A x w orking on an in p ut string w ∈ Σ ∗ , (that is, a tap e con taining w = ¢ w $,) is required to indu ce a un itary op er ator U w δ on the Hilb ert space ℓ 2 ( Q × Z | w | ), since quan tum mac hines can exist in sup erp ositions of more th an one configur ation. In all 2QF A x ’s d escrib ed in this pap er, eve ry transition en tering the same state in volv es the tape head mo v in g in the same direction (left, righ t, or stationary). With this simp lification, considering the Hilb er t space ℓ 2 ( Q ), a synta ctically correct 2QF A x (that is, one where U w δ is un itary for ev ery w ,) can b e sp ecified easily by jus t p ro viding a unitary op erator U σ : ℓ 2 ( Q ) → ℓ 2 ( Q ) f or eac h sym b ol σ ∈ Γ . More formally , δ ( q , σ, q ′ , d q ′ ) = h q ′ | U σ | q i (2) is the amplitud e with which the mac hine currently in state q and scanning sym b ol σ will j ump to state q ′ and mo v e the h ead in direction d q ′ . Here, d q ′ ∈ {− 1 , 0 , 1 } is the direction of the tap e h ead determined b y q ′ . F or the remaining directions, all transitions with target q ′ ha v e amplitude zero. Apart from the left reset capabilit y , 2QF A x ’s are iden tical to 2KWQF A’s. In the follo wing, we fo cus on this new capability , and refer the r eader to [KW97] for detailed cov erage of the tec hnical prop erties of 2KW Q F A’s. In eac h step of its executio n, a 2QF A x undergo es t wo linear op erations: The first one is a unitary transformation of the cur ren t sup erp osition acco rdin g to δ , and the second one is a measurement. The observ able describing th is measurement pr o cess is designed so that the outcome of an y obser- v ation is one of “ac cept”, “reject”, “con tinue without resetting”, or “reset with state q ”, for an y q ∈ Q non . F ormally , we us e the observ able O , corresp ondin g to the decomp osition E = E acc ⊕ E r ej ⊕ E non ⊕ E r eset − 0 ⊕ E r eset − 1 ⊕ · · · ⊕ E r eset − ( k − 1) , (3) where k = | Q non | , and f or a giv en inpu t w , 1. the set of all configurations of th e 2QF A x is Q × Z | w | ; 2. E = span {| c i | c ∈ Q × Z | w | } ; 3. E acc = span {| c i | c ∈ Q acc × Z | w | } ; 4. E r ej = span {| c i | c ∈ Q r ej × Z | w | } ; 5. E non = span {| c i | c ∈ Q non × Z | w | } ; 6. E r eset − i = span {| c i | c ∈ Q x q i ∈ Q non × Z | w | } (0 ≤ i ≤ k − 1). The probabilit y of eac h outcome is determined by the amplitudes of the relev ant configurations in the presen t sup erp osition. The con tribution of eac h configuration to this probabilit y is the mod ulus squared of its amplitude. F or instance, the outcome “reset with state q i ” will b e measur ed with probabilit y P c ∈ Q x q i × Z | w | | α c | 2 , where α c is the amplitude of configur ation c . If “accept” or “reject” is measured, the computation h alts. If “con tin ue without resetting” is measured, the mac hine co ntin ues runn in g fr om a su p erp osition of the nonhalting and nonr esetting configurations, obtained b y normal- izing the pro jection of th e su p erp osition b efore the measuremen t on to span {| c i| c ∈ Q non × Z | w | } . If “reset with state q i ” is measured, the tape head is reset to p oint to the left end-mark er, and the mac hine contin ues from the sup erp osition | q i , 0 i in the next step. Note that the decoherence asso ciated with this measuremen t means that the system allo ws mixed states. A 2QF A x M i s said to recognize a language L with err or b ounded b y ǫ if M ’ s computation results in “accept” b eing m easur ed for all memb ers of L with prob ab ility at least 1 − ǫ , and “reject” b eing measured for all other inputs with probabilit y at least 1 − ǫ . A 2- way quantum finite automa ton with r estart (2QF A ) is a restricted 2QF A x in wh ic h the “reset mo ves” can target only the original s tart state of the machine, that is, in terms of Equation 1, all the Q x q of a 2QF A are emp t y , w ith the exception of Q x q 0 , represente d as Q r estart . The two-way pr ob abilistic finite automat on (2PF A) is the classical p robabilistic counte rpart of 2KW QF A’s; see [Ka ¸ n91] for t he d etails. A one-way pr ob abilistic finite automato n (1PF A) [Rab63] is a 2PF A in which the head mo v es only to the righ t in ev ery step. A r ational 1PF A [T u r 69] is a 1PF A where all en tries in the transition matrices are rational n umb ers. Other v arian ts of t wo -wa y automata with reset that will b e examined in this pap er are 1. A one-way (Kondacs-Watr ous) quantum finite automato n with r eset (1QF A x ) is a restricted 2QF A x whic h u ses neither “mo ve one square to the left” nor “sta y put” transitions, and whose tap e head is therefore classical, 2. A one-way (Kondacs-Watr ous) quantum finite automaton with r estart (1QF A ) is a 1QF A x where the reset mo ves can target on ly the original start state, and, 3. A one-way pr ob abilistic finite automaton with r estart (1PF A ) is a 1PF A whic h has been en- hanced with the ca pabilit y of resetting th e tap e h ead t o the le ft end-marke r and swapping to the original start state. A one- way (Kondacs-Watr ous) quantum finite automaton (1KWQF A) [KW97] is a 2KW QF A whic h mo ve s its tap e head only to the r igh t in ev ery step. A w ell–kno wn tw o-w a y mixed–state mo del is the 2QCF A [A W02 ]. F ormally , a 2-way finite a u- tomaton with qu antum and classic al sta tes (2QCF A) is a 9-tuple M = ( Q, S, Σ , Θ , δ , q 0 , s 0 , S acc , S r ej ) , (4) where 1. Q = { q 0 , . . . , q n 1 } is the finite set of the qu an tum states; 2. S = { s 0 , . . . , s n 2 } is the finite set of the classica l states; 3. Θ and δ go v ern th e mac h ine’s b eh a vior, as describ ed b elo w; 4. q 0 ∈ Q is the initial quant um state; 5. s 0 ∈ S is the in itial quan tum state; 6. S acc ⊂ S is the set of classical accepting states; 7. S r ej ⊂ S is the set of classical rejecting states. The functions Θ and δ sp ecify the evolutio n of the quan tu m a nd classical p arts of M , resp ectiv ely . Both functions take th e curren tly scann ed symbol σ ∈ Γ and current classical state s ∈ S as argumen ts. Θ ( s, σ ) is either a unitary tr ansformation, or an orthogonal measuremen t. In the first case, the new classical state a nd tap e h ead direction (left, righ t, or sta tionary) are determined by δ , dep ending on s and σ . In the second case, w h en an orthogonal measuremen t i s applied o n the quan tum part, δ dete rmin es the new classical state and the tap e head d ir ection using the result of that measuremen t, as w ell as s and σ . Th e q u an tum and classical parts are initialized with | q 0 i and s 0 , resp ectiv ely , and the tap e h ead starts on the fi rst cell of th e tap e, on wh ic h ¢ w $ is w ritten for a giv en inp ut string w ∈ Σ ∗ . Durin g th e compu tation, if an accepting or r ejecting state is entered, the mac hin e halts with the relev an t resp onse to the inp ut string. Note that like the 1QF A x , and u nlik e the 2QF A and the 2QF A x , the tap e h ead p osition of a 2QCF A is classic al, (that is, t here are n o sup erp ositions with t he head in more th an one p osition sim ultaneously ,) meaning that th e mac hine can b e imp lemen ted u sing a qu an tum part of constan t size. 2.2 Basic facts W e start b y stating some basic facts concerning automata with restart, wh ic h will b e used in later sections. A segmen t of compu tation whic h b egins with a (re)start, and en ds with a halting or restarting configuration will b e called a r ound . Clearly , every automato n with restart wh ic h make s n on trivial use of its restarting capabilit y will run f or in finitely man y rounds on s ome inpu t strings. Throughout this pap er, we mak e the assump tion that our t wo -wa y automata do n ot con tain infinite lo ops within a round , that is, th e computation restarts or h alts with probabilit y 1 in a fi nite num b er steps for eac h round. Ev erywhere in this section, R will stand for a finite state automaton with restart, and w ∈ Σ ∗ will represen t an input string using the alphab et Σ . Definition 1. • p acc ( R , w ) , p r ej ( R , w ) , and p r estart ( R , w ) denote the pr ob abilities that R wil l ac c ept, r eje ct, or r estart, r esp e c tively, on input w , in the first r ound. • P acc ( R , w ) and P rej ( R , w ) denote t he o ver al l ac c eptanc e and r eje ction pr ob abilities of w by R , r esp e ctively. Mor e over, p halt ( R , w ) = p acc ( R , w ) + p r ej ( R , w ) . Lemma 1. P acc ( R , w ) = 1 1 + p r ej ( R ,w ) p acc ( R ,w ) ; P rej ( R , w ) = 1 1 + p acc ( R ,w ) p r ej ( R ,w ) . (5) Pr o of. P acc ( R , w ) = ∞ X i =0 (1 − p acc ( R , w ) − p r ej ( R , w )) i p acc ( R , w ) = p acc ( R , w ) 1 1 − (1 − p acc ( R , w ) − p r ej ( R , w )) = p acc ( R , w ) p acc ( R , w ) + p r ej ( R , w ) = 1 1 + p r ej ( R ,w ) p acc ( R ,w ) . P rej ( R , w ) is calculated in the same w a y . Lemma 2. The language L ⊆ Σ ∗ is r e c o gnize d b y R with err or b ound ǫ > 0 if and only if p r ej ( R ,w ) p acc ( R ,w ) ≤ ǫ 1 − ǫ when w ∈ L , a nd p acc ( R ,w ) p r ej ( R ,w ) ≤ ǫ 1 − ǫ when w / ∈ L . F urthermor e, if p r ej ( R ,w ) p acc ( R ,w ) ( p acc ( R ,w ) p r ej ( R ,w ) ) is a t mo st ǫ , then P acc ( R , w ) ( P rej ( R , w )) is at le ast 1 − ǫ . Pr o of. T h is follo ws from Lemma 1, since, for all p ≥ 0, ǫ ∈ [0 , 1 2 ), 1 1 + p ≥ 1 − ǫ ⇔ p ≤ ǫ 1 − ǫ , and (6) p ≤ ǫ ⇒ 1 1 + p ≥ 1 − ǫ. (7) Lemma 3. L et p = p halt ( R , w ) , and let s ( w ) b e t he ma ximum nu mb er of step s in any br anch of a r ound of R o n w . The worst-c ase exp e cte d runtime of R on w is 1 p ( s ( w )) . (8) Pr o of. T h e w orst-case exp ected run ning time of R on w is ∞ X i =0 ( i + 1)( 1 − p ) i ( p )( s ( w )) = ( p )( s ( w )) 1 p 2 = 1 p ( s ( w )) . (9) Lemma 4. Any one-way automaton with r estart with e xp e cte d runtime t c an b e simulate d by a c orr esp onding two-way autom aton w ithout r estart in exp e cte d time no mor e than 2 t . Pr o of. T h e pr ogram of the tw o-w a y mac hine ( R 2 ) is ident ical to th at of the one-w ay machine with restart ( R 1 ), except for the fact that eac h r estart mov e of R 1 is imitated by R 2 b y mo ving the head one s q u are p er step all the w a y to the left end-mark er. This causes the runtimes of the i nonhalting rounds in th e summation in Equation (9) in L emm a 3 to increase b y a factor of 2. W e will now give a quic k review of the technique of probabilit y amplification. Supp ose that we are giv en a mac hin e (with or w ithout reset) A , whic h recognizes a language L with error b ound ed b y ǫ , and we wish to constru ct another mac hine w hic h recognizes L w ith a m uch smaller, bu t still p ositiv e, probabilit y of err or, sa y , ǫ ′ . It is well known 1 that one can ac hieve this b y runnin g A O (log( 1 ǫ ′ )) times on the same inp ut, and then giving the ma jority answ er as our ve rd ict ab out the mem b ers hip of the inp ut s tring in L . Supp ose that the original machine A needs to b e run 2 k + 1 times for th e o ve rall p ro cedure to w ork with the desired correctness probabilit y . Two coun ters can b e u sed to coun t the acc eptance and rejection resp onses, and the ov erall computation accepts (rejects) when th e num b er of recorded acceptances (rejections) r eac hes k + 1. T o implement these coun ters in the fin ite automaton setting, w e n eed to “connect” ( k + 1) 2 copies of A , {A i,j | 0 ≤ i, j ≤ k } , wh ere the su bscripts ind icate the v alues of the t wo counters, i.e., the states of A i,j enco de the inform ation that A has accepted i times an d r ejected j times in its pr evious runs. The new mac hine M is constructed from th e A i,j as follo ws: – The start state of M is the s tart state of A 0 , 0 ; – Up on r eac hin g any accept state of A i,j (0 ≤ i, j < k ), M mov es the head bac k to the left end-mark er and then switc hes to the start state of A i +1 ,j ; – Up on r eac hin g any reject states of A i,j (0 ≤ i, j < k ), M mo v es the head bac k to the left end-mark er and then switc hes to the start state of A i,j +1 ; – The accept states of M are the accept s tates of A k ,j (0 ≤ j < k ); – The reject states of M are the reject states of A i,k (0 ≤ i < k ). Lemma 5. If language L ⊆ Σ ∗ is r e c o gnize d by R with a fixe d err or b ound ǫ > 0 , then for any p ositive err or b ound ǫ ′ < ǫ , ther e exists a finite automato n with r eset, R ′ , r e c o gnizing L . Mor e over, if R has n states and its (exp e cte d) runtime is O ( s ( | w | )) , then R ′ has O (log 2 ( 1 ǫ ′ ) n ) states, and its (exp e cte d) runtime is O (log( 1 ǫ ′ ) s ( | w | )) , wh er e w is the input string. Pr o of. F ollo ws easily from the ab ov e descrip tion. Finally , we note the follo wing relationship b et we en the computational p o wers of the 2QCF A and the 1QF A x . Lemma 6. F or any 1 QF A x M 1 with n states and exp e cte d runtime t ( | w | ) , ther e exists a 2QCF A M 2 with n qu antum states, O ( n ) classic al states, and exp e cte d runtime O ( t ( | w | )) , such that M 2 ac c epts ev e ry input string w with the same pr ob ability tha t M 1 ac c epts w . Pr o of. W e utilize th e 2QCF A’s ab ility of m aking arbitrary orthogonal measurements. Giv en a 1QF A x M 1 , we construct a 2QCF A M 2 with the same set of quan tum states. On eac h tap e square, M 2 first p erforms the unitary transformation asso ciated with the curren t symbol by the program of M 1 . It then mak es a measuremen t (ov er th e sp ace spanned by the set of qu an tum states) using an observ able O ′ , whic h is formed by replacing eac h subsp ace of the form E r eset − i in the observ able O (Equation 3) of M 1 2 b y its subsp aces { E r eset − i − q i 1 ⊕ E r eset − i − q i 2 ⊕ · · · ⊕ E r eset − i − q i m } , 1 See, for instance, pages 369-370 of [Sip06]. 2 Since the head is classical, th e observ able is red efined to b e a decomp osition of the space spann ed by just the set of states. where { q i 1 , q i 2 , · · · , q i m } = Q x q i , and E r eset − i − q i j = span {| q i j i} . T he outcome asso ciated w ith E r eset − i − q i j is simply the name of q i j . M 2 tak es the action sp ecified b elo w according to the result of this observ ation: 1. “con tinue without resetting”: mo ve the head one square to the right, 2. “accept”: accept, 3. “reject”: reject, 4. “ q i j ”: en ter a classical state that mo v es the h ead left un til the left end-mark er ¢ is seen, and p erform a unitary transformation that transforms the quan tum register from state q i j to q i . 3 Computational p ow er of 1QF A ’s In this section, w e fo cus on the 1QF A , which turns out to b e the simplest and most restricted kno wn m o del of quantum computation th at is strictly su p erior in terms of b ounded-error language recognition to its classical coun terpart. Our fir s t result sho ws that 1QF A ’s can sim ulate an y 1PF A with small state cost, alb eit with great slo wdown. Note that no su c h relation is kn o wn b et w een the 2KW QF A and its classical coun terpart, the 2PF A. Theorem 1. Any language L ⊆ Σ ∗ r e c o g ni ze d b y an n -state 1PF A with err or b ound ǫ c an b e r e c o g ni ze d by a 2 n + 4 -state 1QF A with the same err or b ound. Mor e over, if the exp e cte d runtime of the 1PF A is O ( s ( | w | )) , then the exp e cte d runtime of the 1QF A is O ( l 2 | w | s 2 ( | w | )) for a c onstant l > 1 dep ending on n , wher e w is the input string. Pr o of. Let P b e an n -state 1PF A recognizing L with err or b ound ǫ . W e will construct a 2 n + 4-state 1QF A M recognizing the same language with error b ound ǫ ′ ≤ ǫ . By adding tw o more states, s acc and s r ej , to P , we obtain a new 1PF A , P ′ , where the halting of th e computation in eac h round is p ostp oned to the last symb ol, $, on whic h the o v erall accepting and r ejecting probabilities are summed up in to s acc and s r ej , resp ectiv ely . T herefore, for an y giv en input string w ∈ Σ ∗ , th e v alue of s acc and s r ej are p acc ( P , w ) and p r ej ( P , w ), resp ectiv ely , at the end of the fi r st round. By using the metho d describ ed in [YS09b], eac h sto chasti c matrix can b e con v erted to a unitary one with twice the size as sho wn in the template U = 1 l ( A | B ) D , where A is th e original sto chastic matrix; the columns of B , corresp ond ing to newly add ed states, are filled in to ensure that eac h row of ( A | B ) is pairwise orthogonal to the o thers, and has t he same length l , whic h d ep ends only on the d im en sion of A , and the en tries of D are then selected to mak e U a unitary matrix. Eac h transition matrix of P ′ can b e conv erted to a (2 n + 4) × (2 n + 4)-dimensional u nitary matrix according to this template. These are th e transition matrices of M . The state set of M can b e sp ecified as follo ws : 1. Th e s tates corresp ondin g to s acc and s r ej are the accepting and rejecti ng stat es, q acc and q r ej , resp ectiv ely , 2. the states corresp onding to the n on -h alting and non-restarting states of P ′ are non-halting and non-restarting states, and, 3. all remaining states are restarting states. The in itial state of M is the state corresp onding to the initial state of P . When M run s on input strin g | w | , the amplitudes of q acc and q r ej , th e only halting states of M , at the end of the first roun d are 1 l | w | +2 p acc ( P , w ) and 1 l | w | +2 p r ej ( P , w ), resp ectiv ely . Th erefore, when w ∈ L , p r ej ( M , w ) p acc ( M , w ) = p 2 r ej ( P , w ) p 2 acc ( P , w ) ≤ ǫ 2 (1 − ǫ ) 2 , and s imilarly , when w / ∈ L , p acc ( M , w ) p r ej ( M , w ) = p 2 acc ( P , w ) p 2 r ej ( P , w ) ≤ ǫ 2 (1 − ǫ ) 2 . By solving th e equation ǫ ′ 1 − ǫ ′ = ǫ 2 (1 − ǫ ) 2 , w e obtain ǫ ′ = ǫ 2 1 − 2 ǫ + 2 ǫ 2 ≤ ǫ. The exp ected runt ime of P is 1 p acc ( P , w ) + p r ej ( P , w ) ∈ O ( s ( | w | )) , and s o the exp ected runti me of M is ( l ) 2 | w | +4 1 p 2 acc ( P , w ) + p 2 r ej ( P , w ) < 3 ( l ) 2 | w | +4 1 p acc ( P , w ) + p r ej ( P , w ) 2 ∈ O ( l 2 | w | s 2 ( | w | )) . Corollary 1. 1QF A ’s c an r e c o gnize a l l r e gular languages with zer o err or. T o establish the s tr ict sup eriorit y of 1QF A ’s o ver 1PF A ’s, we will mak e use of the f ollo wing concepts. An automaton M is said to recognize a language L with p ositive one-side d unb ounde d err or if ev ery inp ut str in g w ∈ L is accepted b y M with nonzero probability , and every w / ∈ L is rejected by M with probabilit y 1. An automaton M is said to recognize a language L with ne gative one-side d unb ounde d err or if every input strin g w ∈ L is accepted b y M with probabilit y 1, and every w / ∈ L is rejected b y M with nonzero probabilit y . F or an a utomaton M recog nizing a language L , w e define the ga p f unction , g M : N → [0 , 1], suc h that g M ( n ) is the differen ce betw een the minim u m acceptance probabilit y of a mem b er of L with length at most n and the maxim um acceptance p robabilit y of a n on-mem b er of L with length at most n 3 . 3 The defin ition of g M is d u e to Bertoni and Carpentieri [BC01], who call it the “error fun ction.” Lemma 7. If a language L is r e c o gnize d by a 1KWQF A M with p ositive (ne gative) one-side d unb ounde d err or such that g M ( n ) ≥ c − n for some c > 1 , then for al l ǫ ∈ (0 , 1 2 ) , L is r e c o gnize d by some 1QF A having thr e e mor e states than M with p ositive (ne gative) one-si de d err or ǫ in e xp e cte d time O ( 1 ǫ c | w | | w | ) . Pr o of. W e consider the case of p ositiv e one-sided error. Th e adaptation to th e other case is trivial. M is con v erted in to a 1QF A M ′ ǫ as follo ws. M ′ ǫ starts b y branc h in g to t wo equiprobab le paths, path 1 and path 2 , at the b eginning of th e compu tation. path 1 imitates th e computation of M , except that all reject stat es that app ear in its subpaths are replaced by restart states. Reg ardless of the form of the input, pat h 2 mo v es righ t with amplitude 1 √ c , (and so restarts the computation with the remaining probability ,) on ev ery input sym b ol. When it arrive s at the right end-mark er, path 2 rejects with amplitude √ ǫ , and restarts the compu tation with amplitude √ 1 − ǫ . When w / ∈ L , p acc ( M ′ ǫ , w ) = 0 , an d p r ej ( M ′ ǫ , w ) = ǫ 2 c | w | , and s o the input is r ejected with probabilit y 1. When w ∈ L , p acc ( M ′ ǫ , w ) ≥ 1 2 c | w | , and p r ej ( M ′ ǫ , w ) = ǫ 2 c | w | , and s o the input is accepted with error b ound ǫ > 0 due to Lemma 2, since p r ej ( M ′ ǫ , w ) p acc ( M ′ ǫ , w ) ≤ ǫ. Since p halt ( M ′ ǫ , w ) is alw a ys greater than ǫ 2 c | w | , the exp ected runtime of M ′ ǫ is O ( 1 ǫ c | w | | w | ). Lemma 8. If a language L is r e c o gnize d by a 1KWQF A M with p ositive (ne gative) one-side d b ounde d err or such that g M ( n ) ≥ c − 1 for some c > 1 , then for al l ǫ ∈ (0 , 1 2 ) , L is r e c o gnize d b y some 1QF A having thr e e mor e states than M with p ositive (ne gative) one- side d err or ǫ in exp e cte d time O ( 1 ǫ c | w | ) . Pr o of. T h e construction is almost ident ical to th at in Lemma 7, except that path 2 rejects with amplitude √ ǫ , a nd restarts the compu tation with amp litude √ 1 − ǫ immediately on th e left end- mark er, thereb y causin g ev ery inpu t to b e rejected with the constant prob ab ility ǫ 2 c . Hence, the exp ected runt ime of M ′ ǫ turns out to b e O ( 1 ǫ c | w | ). Lemma 7 is a useful step to wa rds an eve ntual c haracterization of the class of languages that are r ecognized with one-sided b ound ed err or b y 1QF A ’s, since full classical c haracterizations are kno wn [YS09c] for the classes of languages recognized by one-sided unb ounded error by sev eral 1QF A mo dels, including the 1KW QF A. A language L is said to b elong to the class S = r at [T ur69,Mac93] if there exists a rational 1PF A that accepts all and only the mem b ers of L with probabilit y 1 2 . Theorem 2. F or every language L ∈ S = r at , ther e exists a numb er n such that for al l err or b ounds ǫ > 0 , ther e exist n - state 1QF A ’s that r e c o gnize L and L with one- si de d err or b ounde d by ǫ . Pr o of. F or a language L in S = r at , let P b e the rational 1PF A asso ciated b y L as describ ed ab o ve. T urak ainen [T ur 69] sho wed th at there exists a constant b > 1 such that for any strin g w / ∈ L , the probabilit y that P accepts w cannot b e in the in terv al ( 1 2 − b −| w | , 1 2 + b −| w | ). By usin g th e metho d describ ed in [YS09c], we can con v ert P to a 1KW QF A M recognizing L with one-sided u n b ounded error, so that M accepts any w ∈ L with probabilit y g reater than c −| w | , for a constan t c > b . W e can conclude with Lemma 7. S = r at con tains many wel l-known languages, suc h as, L eq , L pal = { w | w = w R } , L twin = { w cw | w ∈ { a, b } ∗ } , L mult = { x # y # z | x, y , z are natural num b ers in binary notatio n and x × y = z } , L sq uar e = { a n b n 2 | n > 0 } , L pow er = { a n b 2 n } , and all p olynomial languages , [T ur82] defin ed as { a n 1 1 · · · a n k k b p 1 ( n 1 , ··· ,n k ) 1 · · · b p r ( n 1 , ··· ,n k ) r | p i ( n 1 , · · · , n k ) ≥ 0 } , where a 1 , · · · , a k , b 1 , · · · , b r are distinct symbols, and eac h p i is a p olynomial with integ er coefficien ts. Note that Theorem 2 and Lemma 6 answer a question p osed b y Ambainis and W atrous [A W02] ab out whether L sq uar e and L pow er can b e r ecognized with b ounded error b y 2QCF A’s affirmativ ely . Corollary 2. The class of la nguages r e c o gnize d by 1 QF A ’s w ith b ounde d err or pr op e rly c ontains the c lass of languages r e c o gnize d by 1PF A ’s. Pr o of. T h is follo ws fr om Theorems 1 and 2, Lemma 4, and the fact [DS92] that L pal cannot b e recognized with b ounded error b y 2PF A’s. Since general 1QF A’s are kn o wn to b e equiv alent in language recogniti on p o we r to 1PF A’s, one has to consider a tw o-wa y mo del to demonstrate the su p eriorit y of quan tu m computers o ver classical ones. The 2QCF A is known [A W02] to b e su p erior to its classical coun terpart, the 2PF A, al so b y virtue of L pal . Recall that, by Lemma 6, 2QCF A’s can simulat e 1QF A ’s easily , and w e do not kno w of a sim u lation in the other direction. 4 Conciseness of 2QF A ’s with mixed states and 2PF A’s In this sect ion, w e demonstrate sev eral infinite families of regular languag es whic h can b e recognize d with some fixed probabilit y greater than 1 2 b y just tu ning the transition amplitudes of a 1QF A with a constant num b er of state s, whereas the sizes of the corresp onding 1QF A’s, 1PF A’s, a nd 2 NF A’s gro w without b ound. One of our constru ctions can b e adapted easily to sho w that 1PF A ’s, (and, equiv alen tly , 2PF A’s), also p ossess the same adv an tage ov er those machines. Definition 2. F or an alpha b et Σ c ontaining symb ol a , and m ∈ Z + , the family of languages A m is define d as A m = { ua | u ∈ Σ ∗ , | u | ≤ m } . Note that Am b ainis et al. [ANTSV02] r ep ort that an y Na yak one-w a y quantum finite automa ton 4 that recognizes A m with some fi xed probabilit y greater than 1 2 has 2 Ω ( m ) states. 4 This is a 1QF A model of intermediate p ow er, subsuming th e 1KWQF A, b ut strictly weak er than the most general mod els ([Pas 00 ,Cia01], and one-wa y versions of 2QCF A’s,) whic h recognize any regular language with at most the same state cost as t he correspond ing DF A. Theorem 3. A m is r e c o gnize d by a 6-state 1QF A M m,ǫ for any err or b ound ǫ > 0 . Mor e over, the exp e cte d runtime of M m,ǫ on input w is O ( 1 ǫ 2 m | w | ) . Pr o of. Let M m,ǫ = { Q, Σ , δ, q 0 , Q acc , Q r ej , Q r estart } b e a 1QF A with Q non = { q 0 , q 1 } , Q acc = { A } , Q r ej = { R } , Q r estart = { I 1 , I 2 } . M m,ǫ con tains the transitions U ¢ | q 0 i = ǫ | q 1 i + ǫ 2 m +5 2 | R i + p 1 − ǫ 2 − ǫ 2 m +5 | I 1 i U a | q 0 i = ǫ | q 0 i + r 1 2 − ǫ 2 | I 1 i + 1 √ 2 | I 2 i U a | q 1 i = ǫ | q 0 i + r 1 2 − ǫ 2 | I 1 i − 1 √ 2 | I 2 i U Σ \{ a } | q 0 i = ǫ | q 1 i + r 1 2 − ǫ 2 | I 1 i + 1 √ 2 | I 2 i U Σ \{ a } | q 1 i = ǫ | q 1 i + r 1 2 − ǫ 2 | I 1 i − 1 √ 2 | I 2 i U $ | q 0 i = | A i U $ | q 1 i = | R i and the transitions n ot mentioned ab o v e can b e completed easily , by extending eac h U σ to b e unitary . On the left end-marker, M m,ǫ rejects with pr obabilit y ǫ 2 m +5 , go es on to s can th e in put string with amplitude ǫ , and r estarts immediately with the r emainin g probab ility . States q 0 and q 1 imple- men t the c heck for the regular expression Σ ∗ a , bu t the mac hine restarts with probabilit y 1 − ǫ 2 on all input sym b ols durin g this chec k. If w = uσ ′ for u ∈ Σ ∗ , and σ ′ 6 = a , the inp ut is rejected with probabilit y 1, sin ce p acc ( M m,ǫ , w ) = 0. If w = ua for u ∈ Σ ∗ , p acc ( M m,ǫ , w ) = ǫ 2 | w | +2 , p r ej ( M m,ǫ , w ) = ǫ 2 m +5 . Hence, if w ∈ A m , p acc ( M m,ǫ , w ) ≥ ǫ 2 m +4 , and if w / ∈ A m , p acc ( M m,ǫ , w ) ≤ ǫ 2 m +6 . In b oth cases, the corresp onding ratio p r ej ( M m,ǫ ,w ) p acc ( M m,ǫ ,w ) or p acc ( M m,ǫ ,w ) p r ej ( M m,ǫ ,w ) is not greate r than ǫ . Thus, by Lemma 2, we conclude that M m,ǫ recognizes A m with error b ounded b y ǫ . Since p halt ( M m,ǫ , w ) is alw a ys greater than ǫ 2 m +5 , the exp ected runtime of M m,ǫ is O ( 1 ǫ 2 m | w | ). By a theorem of Rabin [Rab63], for any fixed error b ound , if a language L is recog nized with b ound ed error by a 1PF A with n states, then th ere exists a deterministic finite automaton (DF A) that r ecognizes L with 2 O ( n ) states. P arallelly , F reiv alds et al. [F O M09] note that one-wa y quan tum finite automata with mixed states are no more than su p erexp onen tially more concise than DF A’s. These facts can b e u sed to conclude that a collection of 1PF A’s (or 1QF A’s) with a fixed common n umb er of sta tes that r ecognize a n infinite family of languages with a fixed common error b ound less than 1 2 , ` a la the t wo -wa y quan tum automata of Theorem 3, cannot exist, since that w ould imply the existence of a similar family of DF A’s of fixed size. By the same reasoning, the existence of suc h families of 2NF A’s can also b e o v erru led. The r eader should note that there exists a b ounded -err or 1PF A (and therefore, a 2PF A 5 ,) for A m , whic h one can obtain simp ly b y replacing eac h transitio n amp litud e of 1QF A M m,ǫ defined in T h eorem 3 b y the square of its mo d ulus. Th is establishes the fact that 2PF A’s also p ossess the succinctness adv an tage discussed ab o ve ov er 1PF A’s, 1QF A’s and 2NF A’s. W e pro ceed to presen t t wo more examples. Definition 3. F or m ∈ Z + , the language family B m ⊆ { a } ∗ is define d as B m = { a i | i mo d ( m ) ≡ 0 } . Theorem 4. F or any err or b ound ǫ > 0 , ther e exists a 7-state 1QF A M m,ǫ which ac c epts any w ∈ B m with c ertainty, and r eje cts any w / ∈ B m with pr ob ability at le ast 1 − ǫ . Mor e over, the exp e cte d runtime of M m,ǫ on w is O 1 ǫ sin − 2 ( π m ) | w | . Pr o of. W e will construct a 4-state 1KW QF A r ecognizing B m with p ositiv e one-sided unboun ded error, as describ ed in [AF98]. Let M m = ( Q, Σ , δ, q 0 , Q acc , Q r ej ) b e 1KW QF A with Q non = { q 0 , q 1 } , Q acc = { A } , Q r ej = { R } . M m con tains the transitions U ¢ | q 0 i = | q 0 i U a | q 0 i = cos( π m ) | q 0 i + sin( π m ) | q 1 i U a | q 1 i = − s in( π m ) | q 0 i + c os( π m ) | q 1 i U $ | q 0 i = | R i U $ | q 1 i = | A i , and th e tr ansition amplitudes not listed ab o ve are filled in to satisfy u n itarit y . M m b egins compu- tation at the | q 0 i -axis, and p erform s a rotatio n b y angle π m in the | q 0 i - | q 1 i plane for eac h a it reads. Therefore, the v alue of th e gap fu nction, g M m , is not less th an sin 2 ( π m ) f or | w | > 0. By Lemma 8, there exists a 7-stat e 1QF A M m,ǫ recognizing B m with p ositiv e one-sided b oun ded error and whose exp ected r unt ime is O 1 ǫ sin − 2 ( π m ) | w | . By s wapping the accepting an d rejecting states of M m,ǫ , w e can get the desired mac h ine. Definition 4. F or an alphab et Σ , and m ∈ Z + , the language family C m is define d as C m = { w ∈ Σ ∗ | | w | = m } . Theorem 5. F or any err or b ound ǫ > 0 , ther e exists a 7-state 1QF A M m,ǫ which ac c epts any w ∈ C m with c ertainty, and r eje cts any w / ∈ C m with pr ob ability at le ast 1 − ǫ . Mor e over, the exp e cte d runtime of M m,ǫ on w is O ( 1 ǫ 2 m | w | ) . 5 See Section 6 for an examination of the relatio nship betw een the comp u tational p ow ers of the 1PF A and the 2PF A. Pr o of. W e w ill contruct a 4-state 1KW QF A r ecognizing C m with p ositiv e one-sided u n b ounded error. Let M m = ( Q, Σ , δ, q 0 , Q acc , Q r ej ) b e 1KWQF A with Q non = { q 0 , q 1 } , Q acc = { A } , Q r ej = { R } . M m con tains the transitions U ¢ | q 0 i = 1 √ 2 | q 0 i + 1 √ 2 m +1 | q 1 i + s 1 2 − 1 2 m +1 | R i U σ ∈ Σ | q 0 i = 1 √ 2 | q 0 i + 1 √ 2 | R i U σ ∈ Σ | q 1 i = | q 1 i U $ | q 0 i = 1 √ 2 | A i + 1 √ 2 | R i U $ | q 1 i = − 1 √ 2 | A i + 1 √ 2 | R i with the amplitudes of the transitions n ot men tioned ab ov e filled in to ensu r e un itarit y . M m enco des the length of the input string in the amplitude of state q 0 , w hic h equals 1 √ 2 | w | +1 just b efore th e pro cessing of the righ t end-mark er. The desired length m is “hardwired” in to the amplitudes of q 1 . F or a given in put string w ∈ Σ ∗ , if w ∈ C m , then the amplitudes of states q 0 and q 1 are equal, and the quantum F our ier transform (QFT) [KW97] p erformed on the righ t end-marker sets the amplitude of A to 0. T herefore, w is rejected w ith certain t y . I f w ∈ C m , then the accepting probabilit y is equal to 1 √ 2 | w | +2 − 1 √ 2 m +2 ! 2 , and it is minimized when | w | = m + 1, whic h giv es us the inequalit y g M m ( w ) > 1 2 m +6 . By Lemma 8, there exists a 7-stat e 1QF A M m,ǫ recognizing C m with p ositiv e one-sided b ounded error and whose exp ected run time is O 1 ǫ 2 m | w | . By sw ap p ing the accepting and rejecting states of M m,ǫ , w e can get the desired mac h ine. Note that, unlik e what w e had with Theorem 3, the QF A’s of Theorems 4 and 5 cannot b e con v erted s o easily to 2PF A’s. In fact, we can pro v e that there exist n o 2PF A families of fixed size whic h recognize B m and C m with fixed one-sided error less than 1 2 , lik e those QF A’s: Assume that suc h a 2PF A family exists. Switc h the accept and r eject states to obta in a family for the complements of the languages. The 2PF A’s thus ob tained op er ate with cu tp oin t 0. Obtain an equiv alen t 2NF A with the same n umber of states b y con verting all transitions with non zero w eight to nond eterministic transitions. But there are only finitely many 2NF A’s of this size, meanin g that they cannot recognize our in finite family of languages. 5 Efficien t Probability Amplification Man y automaton descriptions in this pap er, and elsewhere in the theory of probabilistic and quan- tum automata, describ e not a single algorithm, but a general template whic h one can use for building a mac hin e M ǫ that op erates with a desired error b oun d ǫ . Th e d ep endences of the runtime and num b er of sta tes of M ǫ on 1 ǫ are measures of the co mplexity of the probabilit y amplificati on pro cess inv olv ed in the construction metho d used. Viewe d as such, th e constructions describ ed in the theorems in Section 4 are maximally efficien t in terms of the state cost, with no dep endence on the error b ound . In this section, w e present impr ov ements o ver previous results ab out the efficiency of probabilit y amplification in 2QF A’s. 5.1 Impro v ed algorithms f or L e q In classical computation, one only needs to sequence O (log ( 1 ǫ )) iden tical copies of a given p rob- abilistic automaton with one sided error p < 1 to ru n on the same in put in ord er to obtain a mac h ine with error b ound ǫ . Y ak aryılmaz and Say [YS09a] note d that this metho d o f probabilit y amplification do es not yield efficien t results for 2KW QF A’s; the num b er of mac hine copies required to reduce the error to ǫ ca n b e as high as ( 1 ǫ ) 2 . The most succinct 2KW QF A’s for L eq pro du ced b y alternativ e metho ds devel op ed in [YS09a] hav e O (log 2 ( 1 ǫ ) log log( 1 ǫ )) states, and runtime linear in the size of the inp ut w . In App endix A , w e present a construction which yields (exp onential time) 1QF A ’s that r ecognize L eq within any desired error b oun d ǫ , with n o d ep endence of the state set size o n ǫ . Ambainis and W atrous [A W02] presen t a method wh ic h can b e used t o bu ild 2QCF A’s that r ecognize L eq also with constant state set size, wh ere the “tunin g” of the automaton for a particular error boun d is ac hieve d by setting some transition amp litudes appropriately , and the exp ected r unt ime of those mac h in es is O ( | w | 4 ). W e no w sho w that the 2QF A formalism allo ws more efficien t probabilit y amplifi cation. Theorem 6. Ther e exists a c onstant n , su ch tha t, for any ǫ > 0 , an n - state 2QF A which r e c o gnizes L eq with one-side d err or b ound ǫ within O ( 1 ǫ | w | ) exp e cte d runtime c an b e c onstructe d, wher e w is the i nput string. Pr o of. W e start with Kondacs and W atrous’ original 2KW QF A [KW97] M N , whic h r ecognizes L eq with one-sided err or 1 N , for a ny inte ger N > 1. After a d eterministic test f or mem b ership o f a ∗ b ∗ , M N branc hes to N computational p aths, eac h of whic h p erform a QFT at the end of the computation. Set N = 2. M 2 accepts all memb ers of L eq with probabilit y 1. Non-mem b ers of L eq are rejected with p robabilit y at least 1 2 . W e con vert M 2 to a 2QF A M ′ ǫ b y c han ging the target states of the QFT as f ollo ws: path 1 → 1 √ 2 | Reject i + r ǫ 2 | Accept i + r 1 − ǫ 2 | Restart i path 2 → − 1 √ 2 | Reject i + r ǫ 2 | Accept i + r 1 − ǫ 2 | Restart i where th e amplitude of eac h path is 1 √ 2 . F or a giv en inp ut w ∈ Σ ∗ , 1. if w is not of the form a ∗ b ∗ , then p r ej ( M ′ ǫ , w ) = 1; 2. if w is of the form a ∗ b ∗ and w / ∈ L , then p r ej ( M ′ ǫ , w ) = 1 2 , and p acc ( M ′ ǫ , w ) = ǫ 2 ; 3. if w ∈ L , then p r ej ( M ′ ǫ , w ) = 0 and p acc ( M ′ ǫ , w ) = ǫ . It is ea sily seen that th e error is on e-sided . Since p acc ( M ′ ǫ ,w ) p r ej ( M ′ ǫ ,w ) = ǫ , w e ca n conclude with Lemma 2. Moreo ver, the min im um halting probab ility o ccur s in the thir d case ab o v e, and so the exp ected runtime of M ′ ǫ is O ( 1 ǫ | w | ). Theorem 7. F or any ǫ ∈ (0 , 1 2 ) , ther e exists a 2QF A x with O (log ( 1 ǫ )) states that r e c o gnize s L eq with one-side d err or b ound ǫ in O (log( 1 ǫ ) | w | ) steps, wher e w is the input string. Pr o of. Let M 2 b e the 2KW QF A recognizing L eq with one-sided er r or b oun d 1 2 men tioned in the pro of of Th eorem 6. Then, a 2QF A x that is constructed b y sequen tially connecting O (log ( 1 ǫ )) copies of M 2 , so that the input is accepted only if it is accepted by all the copies, and rejected otherwise, can recog nize L eq with one-sided error b oun d ǫ . 5.2 An impro v ed algorithm for L p a l Am bainis and W atrous [A W02] p resen t a 2QCF A construction whic h decides L pal in exp ected time O ( 1 ǫ | w | | w | ) with error b oun ded by ǫ > 0, where w is the input string. (W atrous [W at98] d escrib es a 2KWQF A whic h a ccepts all member s of the complemen t of L pal with probability 1, and f ails to halt f or all p alindromes; it is not kno w n if 2KW QF A’s can r ecognize this language by halting for all inputs.) W e will now presen t a 1QF A construction, w hic h, by Lemma 6, can b e adapted to yield 2QCF A’s with the same complexit y , w hic h red uces the d ep endence of the Ambainis-W atrous metho d on the desired error b ound considerably . Theorem 8. F or any ǫ > 0 , ther e exists a 15-state 1QF A M ǫ which a c c epts any w ∈ L pal with c ertainty, and r eje cts any w / ∈ L pal with pr ob ability at le ast 1 − ǫ . Mor e over, the exp e cte d runtime of M ǫ on w is O ( 1 ǫ 3 | w | | w | ) . Pr o of. W e will first construct a mo d ifi ed v ersion of the 1KW QF A algorithm of L¯ ace et al. [LSDF09] for reco gnizing the nonpalind rome la nguage. Th e idea b ehind the constru ction is that w e enco de b oth the input str ing and its reve rse in to t he amplitudes of tw o of the sta tes of th e mac hine, a nd then p erform a substraction b et ween these amplitudes using the QFT [LSDF09]. If the input is not a palindr ome, the tw o a mplitud es do n ot cancel eac h other completely , and th e n onzero difference is transferred to an accept state. Otherwise, the acce pting probability will b e zero. Let M = ( Q, Σ , δ, q 0 , Q acc , Q r ej ) b e 1KW QF A w ith Q non = { p 1 , p 2 , q 0 , q 1 , q 2 , q 3 } , Q acc = { A } , Q r ej = { R i | 1 ≤ i ≤ 5 } . The transition f unction of M is sh own in Figure 1 . As b efore, w e assu me that the transitions not sp ecified in the figure are filled in to ensure that the U σ are unitary . path 2 and path 1 enco de the input string and its reverse [Rab63,Paz 71 ] in to the amplitudes of states q 2 and p 2 , resp ectiv ely . If the inp ut is w = w 1 w 2 · · · w l , then the v alues of these a mplitud es just b efore the transition asso ciated with the righ t end-marke r in the firs t r ound are as f ollo ws: – State p 2 has amplitude 1 √ 2 q 2 3 | w | (0 .w l w l − 1 · · · w 1 ) 2 , and – state q 2 has amplitude 1 √ 2 q 2 3 | w | (0 .w 1 w 2 · · · w l ) 2 . The factor of q 2 3 is due to the “loss” of amp litud e necessitated by the fact that the originally n on- unitary en co d ing matrices of [Rab63,Pa z71 ] h av e to b e “em b edded” in a u nitary matrix [YS09b]. Note that th e sym b ols a and b are enco ded by 0 and 1, resp ectiv ely . If w ∈ L pal , the acceptance probabilit y is zero. If w ∈ L pal , the acceptance probability is minimized by strings whic h are almost palindr omes, except for a single d efect in th e m id dle, that is, when | w | = 2 k for k ∈ Z + , w i = w 2 k − i + 1 , where 1 ≤ i ≤ k − 1, and w k 6 = w k +1 , so, g M ( w ) ≥ 1 8 1 3 | w | . Fig. 1. Sp ecification of the transition function of M P aths U ¢ , U a U b U ¢ | q 0 i = 1 √ 2 | p 1 i + 1 √ 2 | q 1 i path 1 U a | p 1 i = q 2 3 | p 1 i − 1 √ 3 | R 1 i U a | p 2 i = 1 √ 6 | p 1 i + 1 √ 6 | p 2 i + 1 √ 3 | R 1 i + 1 √ 3 | R 2 i U b | p 1 i = 1 √ 6 | p 1 i + 1 √ 6 | p 2 i + 1 √ 3 | R 1 i + 1 √ 3 | R 2 i U b | p 2 i = q 2 3 | p 2 i − 1 √ 3 | R 1 i path 2 U a | q 1 i = 1 √ 6 | q 1 i + 1 √ 6 | q 3 i − 1 √ 3 | R 3 i + 1 √ 3 | R 4 i U a | q 2 i = q 2 3 | q 2 i + 1 √ 3 | R 5 i U a | q 3 i = q 2 3 | q 3 i + 1 √ 3 | R 3 i U b | q 1 i = 1 √ 6 | q 1 i + 1 √ 6 | q 2 i − 1 √ 3 | R 3 i + 1 √ 3 | R 4 i U b | q 2 i = q 2 3 | q 2 i + 1 √ 3 | R 3 i U b | q 3 i = q 2 3 | q 3 i + 1 √ 3 | R 5 i U $ path 1 U $ | p 1 i = | R 1 i U $ | p 2 i = 1 √ 2 | A i + 1 √ 2 | R 2 i path 2 U $ | q 1 i = | R 3 i U $ | q 2 i = − 1 √ 2 | A i + 1 √ 2 | R 2 i U $ | q 3 i = | R 4 i By Lemma 7, there exists a 15-sta te 1QF A M ǫ recognizing L pal with p ositiv e one-sided b oun d ed error, w h ose exp ected runtime is O ( 1 ǫ 3 | w | | w | ). By sw apping accepting and rejecting states of M m , w e can get the desired mac h ine. Note that the tec hniqu e used in the pr o of ab o ve can b e extended easily to handle bigger inp ut alphab ets by using the matrices d efined on Pa ge 169 of [P az71], and the metho d of sim ulating sto c hastic matrices by unitary matrices describ ed in [YS 09b]. 6 1PF A vs. 2PF A It is in teresting to examine the p o w er of th e r estart mov e in classic al compu tation as well. Any 1PF A whic h runs in exp ected t steps can b e simulated b y a 2PF A w hic h r uns in exp ected 2 t steps (see Lemma 4). W e ask in this section whether the restart mo ve can sub stitute the “left” and “stationary” mo v es of a 2PF A without loss of co mpu tational p o w er. Since eve ry p olynomial- time 2PF A recognizes a r egular language, whic h can of cours e b e recognized b y u s ing only “right” mo v es, we fo cus on th e b est-kno w n example of a nonregular language that can b e recognized by an exp onenti al-time 2PF A. Theorem 9. Ther e exists a natur al numb er k , such that for any ǫ > 0 , ther e exists a k -state 1PF A P ǫ r e c o g ni zi ng language L eq with err or b ound ǫ and exp e cte d runtime O (( 2 ǫ 2 ) | w | | w | ) , wher e w is the input string. Pr o of. W e will construct the 1PF A P ǫ as follo ws: Let x = ǫ 2 2 . The compu tation splits in to t hr ee paths called path 1 , path 2 , and path 3 with equal probabilities on symbol ¢ . All three paths, while p erformin g their main tasks, parallelly chec k whether the input is of the form a ∗ b ∗ , if not, all paths simply reject. The main tasks of the p aths are as follo ws: • path 1 mo v es on with pr obabilit y x and restarts with p robabilit y 1 − x when reading symb ols a and b . After reading the righ t end-marker $, it accepts with probab ility with 1. • path 2 mo v es on with pr obabilit y x 2 and restarts with pr ob ab ility 1 − x 2 when reading symbol a . On b ’s, it con tin ues with the “syn tax” c hec k. After reading the $, it r ejects with probabilit y ǫ 2 and restarts with probabilit y 1 − ǫ 2 . • path 3 is similar to path 2 , except that the transitions of sym b ols a and b are in terc hanged. If th e inpu t is of the form a m b n , then th e accept and reject pr obabilities of the first round are calculate d as p acc ( P ǫ , w ) = 1 3 x m + n , and p r ej ( P ǫ , w ) = ǫ 6 x 2 m + x 2 n . If m = n , then p r ej ( P ǫ , w ) p acc ( P ǫ , w ) = ǫ. If m 6 = n (assume without loss of generalit y that m = n + d for some d ∈ Z + ) , then p acc ( P ǫ , w ) p r ej ( P ǫ , w ) = 2 ǫ x 2 n + d x 2 n +2 d + x 2 n = 2 ǫ x d x 2 d + 1 < 2 ǫ x d ≤ 2 ǫ x By replacing x = ǫ 2 2 , w e can get p acc ( P ǫ , w ) p r ej ( P ǫ , w ) < ǫ. By using Lemma 2, w e can conclude that P ǫ recognizes L eq with error b ound ǫ . Since p halt ( P ǫ , w ) is alw a ys grea ter th an 1 3 x | w | , the expected runtime of the algorithm is O (( 2 ǫ 2 ) | w | | w | ), where w is the inpu t string. 7 Concluding remarks By a theorem of Dw ork and Sto c kmeye r [DS90], for a fix ed ǫ < 1 2 , if L is recognized by a O ( n )–time 2PF A with c states within err or probabilit y ǫ , then L is also recognize d by a DF A with c bc 2 states, where the n umb er b dep ends on the constan t hidd en in the big- O . The t w o-w a y mac hin es of Section 4 can b e seen to ha ve such factors that grow with m in the expressions for their time complexities; this is ho w the machines describ ed in that sectio n ac hieve their huge sup eriorit y in terms of the state cost o ver the other mo dels that they are compared w ith . It is kno wn [YS09b] that 2KWQF A’s can recognize s ome nonsto c hastic languages (i.e. those whic h cannot b e recognized b y 2PF A’s) in the unb ounded error setting. On the other hand, we conjecture th at 2QF A’s with classical h ead p osition, suc h as the 2QCF A, cannot recognize any non- sto c hastic language. Therefore, it is an in teresting question whether 2QF A x ’s (or p ossibly an eve n more general 2QF A mo del allo win g head su p erp osition) can recognize any nons to c hastic language with b ound ed error or not. Some other op en q u estions related to this w ork are: 1. Can 1QF A ’s sim ulate 2QCF A’s? 2. Are 1PF A ’s (with j ust “restart” an d “righ t” mo ves) equiv alen t in p o wer to 2PF A’s in th e b ound ed-error setting, as hinte d b y Section 6? 3. Do es there exist an analogue of the Dwork-Stoc kmeyer theorem men tioned ab o v e for t wo -wa y quan tum fin ite automata? Ac kno wledgemen ts W e are grateful to Andris Ambainis and John W atrous for their helpful commen ts on earlier versions of this pap er. W e also thank R ¯ usi ¸ n ˇ s F r eiv alds for kindly provi din g us a copy of reference [LSDF09]. References AF98. Andris Ambainis and R ¯ usi ¸ n ˇ s F reiv alds. 1-wa y quantum fi nite automata: strengths, w eakn esses and gener- alizations. In FOCS’98: Pr o c e e dings of the 39th Annual Symp osium on F oundations of Computer Scienc e , pages 332–341, P alo A lto, California, 1998 . AKN98. Dorit Ah aronov, Alexei Kitaev, and Noam N isan. Quantum circuits with mixed states. In Pr o c e e dings of the Thirtieth Annual A CM Symp osium on The ory of Computing , pages 20–30, New Y ork, NY, USA , 1998. ACM. ANTSV02. Andris Ambainis, A shwin Nay ak, Amnon T a-Shma, and Umesh V azirani. Dense q uantum co ding and quantum finite automata. J ournal of the ACM , 49(4):496– 511, 2002 . A W02. Andris Ambainis and John W atrous. Tw o–wa y fin ite automata with quantum and classical states. The- or etic al Computer Scienc e , 287(1):299–311, 2002. BC01. Alb erto Bertoni and Ma rco Carpentieri. Regular languages acce pted by quantum automata. Inf ormation and Computation , 165(2):174–18 2, 2001. Cia01. Massimo Pica Ciamarra. Quantum rev ersibilit y and a new model of quantum automaton. In FCT ’01: Pr o c e e dings of the 13th I nternational Symp osium on F undamentals of Computation The ory , pages 376–379 , London, UK, 2001. S pringer-V erlag. DS90. Cynthia Dwork and Larry Stockmeye r. A time complexit y gap for t wo -wa y probabilistic fin ite-state automata. SIAM Journal on Computing , 19(6):1011 –1123, 1990. DS92. Cynthia Dwork and Larry Sto ckmey er. Finite state verifiers I: The pow er of interac tion. Journal of the ACM , 39(4):80 0–828, 1992. FOM0 9. R¯ usi ¸ n ˇ s F reiv alds, M¯ aris Ozols, and Laura Manˇ cinsk a. Impro ved constru ctions of mixed state quantum automata. The or etic al Computer Scienc e , 410(20):1 923–1931, 2009. F re81. R ¯ usi ¸ nˇ s F reiv alds. Probabilistic t wo-w ay machines. In Jozef Gru ska and Mic hal Chytil, editors, Pr o c e e dings of the International Symp osium on Mathematic al F oundations of C omputer Scienc e , volume 118 of L e ctur e Notes in Computer Scienc e , pages 33–45. Springer, 1981. Ka ¸ n91. J¯ anis Ka ¸ neps. Stochasticit y of th e languages acceptable by tw o-wa y finite p robabilistic automata. Discr ete Mathematics and Applic ations , 1:405–421, 1991. KF90. J¯ anis Ka ¸ neps and R ¯ usi ¸ n ˇ s F reiv alds. Minimal nontrivial space complexit y of probabilistic one-w a y Turing mac hines. In Pr o c e e dings on Mathematic al F oundations of Computer Scienc e , volume 452 of L e ctur e Notes in Computer Scienc e , pages 355–361, 1990. KW97. Attila Kondacs and John W atrous. On the p ow er of qu antum fi nite state automata. In FOCS’97: Pr o c e e dings of the 38th Annual Symp osium on F oundations of Computer Scienc e , p ages 66–75, Miami, Florida, 1997. LSDF09. Lelde L¯ ace, Ok sana Scegulna ja-Dub ro vska , and R ¯ usi ¸ nˇ s F reiva lds. Languages recognizable by quantum finite automata with cut-p oin t 0. presented at the 35th International Conference on Curren t T rends in Theory and Practice of Computer Science, SOFS EM, 2009. Mac93. Ioan Macarie. Clo sure prop erties of stoc hastic languages. T echnical report, Universi ty of Rochester, Ro c hester, NY, USA, 1993. MPP01. Carlo Mereghetti, Beatrice Palano, and Gio v an n i Pighizzini. Note on the succinctness of deterministic, nondeterministic, probabilistic and q uantum fin ite automata. The or etic al Informatics and Applic ations , 35(5):477– 490, 2001. P as00. Kathrin Pas chen. Quantum fin ite aut omata using ancil la qubits. T ec hnical report, U niversit y of Karls ruh e, 2000. P az71. Azaria Paz. Intr o duction to Pr ob abilistic Automat a . Academic Press, New Y ork, 1971. Rab63. Michael O. R abin. Probabilistic aut omata. Information and Contr ol , 6:230–2 43, 1963. Sip06. Michael Sipser. Intr o duction to the The ory of Computation, 2nd e dition . Thomson Course T ec hnology , United States of America, 2006. T u r69. Paa vo T urak ainen. O n languages rep resen table in rational probabilistic automata. Annales A c ademiae Scientiarum F ennic ae, Ser.A , (439):4–10, 1969. T u r82. Paa vo T urak ainen. Discr ete Mathematics , volume 7 of Banach Center Public ations , chapter Ratio nal stochastic automata in formal language th eory , pages 31–4 4. PWN-P olish Scientific Publishers, W arsaw, 1982. W at97. John W atrous. O n the p ow er of 2-wa y q uantum finite state automata. T ec hnical Rep ort CS- TR-1997- 1350, U n iversi ty of Wisconsin, 1997. Also a v ailable at citeseer.is t.psu.edu/article/w atrous97p ow er.html. W at98. John W atrous. Sp ac e-b ounde d quantum c omputation . PhD th esis, Un iversit y of Wisconsin - Madison, USA, 1998. YS09a. Abuzer Y ak aryılmaz and A. C. Cem Sa y . Efficien t probability amplification in tw o-wa y quantum finite automata. The or etic al Computer Scienc e , 410(20):1 932–1941, 2009. YS09b. Abuzer Y ak aryılmaz and A. C. Cem Sa y . Languages recognized with unbounded error b y quantum fi n ite automata. In CSR’09: Pr o c e e dings of the F ourth I nternational Computer Scienc e Symp osium in Rus sia , vol ume 5675 of L e ctur e Notes in Computer Scienc e , pages 356–367, 2009. YS09c. Abuzer Y ak aryılmaz and A. C. Cem Sa y . Qu antum finite automata with one-sided unb ounded error. T echnical rep ort, 2009. A A 1QF A algorithm for L e q Theorem 10. F or any ǫ > 0 , ther e exists a 15-state 1QF A M ǫ , which ac c epts any w ∈ L eq with c ertainty, and r eje c ts any w / ∈ L eq with pr ob ability at le ast 1 − ǫ . Mor e over, the e xp e cte d runtime of M ǫ on w is O ( 1 ǫ (2 √ 2) | w | | w | ) . Pr o of. W e will con truct a 12-state 1KWQF A recognizing L eq with p ositive one-sided unboun ded error. Let M = ( Q, Σ , δ, q 0 , Q acc , Q r ej ) b e 1KWQF A with Q non = { p 0 , p 1 , p 2 , q 0 , q 1 , q 2 } , Q acc = { A 1 , A 2 , A 3 } , Q r ej = { R 1 , R 2 , R 3 } . The transition function of M is shown in Figure 2. As b efore, we assume that the trans itions not sp ecified in the figure are filled in to ensure th at the U σ are u nitary . Fig. 2. Sp ecification of the transition function of M P aths U ¢ , U a U b U $ U ¢ | q 0 i = 1 √ 2 | p 0 i + 1 √ 2 | q 0 i path 1 U a | p 0 i = 1 2 | p 1 i + 1 2 | R 1 i + 1 √ 2 | R 2 i U a | p 1 i = 1 2 | p 1 i + 1 2 | R 1 i − 1 √ 2 | R 2 i U a | p 2 i = | A 1 i U b | p 0 i = | A 1 i U b | p 1 i = 1 √ 2 | p 2 i + 1 √ 2 | R 1 i U b | p 2 i = 1 √ 2 | p 2 i − 1 √ 2 | R 1 i U $ | p 0 i = | R 1 i U $ | p 1 i = | A 1 i U $ | p 2 i = 1 √ 2 | R 2 i + 1 √ 2 | A 2 i path 2 U a | q 0 i = 1 √ 2 | q 1 i + 1 √ 2 | R 3 i U a | q 1 i = 1 √ 2 | q 1 i − 1 √ 2 | R 3 i U a | q 2 i = | A 2 i U b | q 0 i = | A 2 i U b | q 1 i = 1 2 | q 2 i + 1 2 | R 2 i + 1 √ 2 | R 3 i U b | q 2 i = 1 2 | q 2 i + 1 2 | R 2 i − 1 √ 2 | R 3 i U $ | q 0 i = | R 3 i U $ | q 1 i = | A 3 i U $ | q 2 i = 1 √ 2 | R 2 i − 1 √ 2 | A 2 i As seen in the figure, M branches to t wo paths on th e left end -mark er. All paths rejects imm e- diately if the inp ut w ∈ { a, b } ∗ is the emp ty string, and accepts with n onzero probabilit y , s a y α , if it is of the form ( { a, b } ∗ \ a ∗ b ∗ ) ∪ a + ∪ b + . Otherwise, w = a m b n ( m, n > 0), and th e amp litudes of the paths just b efore the transition asso ciated with th e r igh t end -mark er in the first r ound are a s follo ws : – State p 2 has amplitude 1 √ 2 ( 1 2 ) m ( 1 √ 2 ) n , – state q 2 has amplitude 1 √ 2 ( 1 √ 2 ) m ( 1 2 ) n . If m = n , then th e accepting p robabilit y is zero. If m 6 = n (assume that m = n + d for some d ∈ Z + ), then the acc epting probabilit y is equ al to 1 2 m + n +1 1 √ 2 m − 1 √ 2 n 2 = 1 2 m +2 n +1 | {z } > ( 1 2 ) 3 | w | 2 +1 1 − 1 √ 2 d − 2 + 1 2 d ! | {z } > 1 16 Since α is alw ays greater than this v alue, g M ( | w | ) > 1 2 3 | w | 2 +5 , for | w | > 0. By Lemma 7, there exists a 15-state 1QF A M ǫ recognizing L eq with p ositive one- sided b ounded err or and whose exp ected runtime is O ( 1 ǫ (2 √ 2) | w | | w | ). By sw appin g accepting and rejecting states of M m , w e can get the desired mac h ine.
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment