Promise problems solved by quantum and classical finite automata
aa r X i v : . [ c s . F L ] D ec Promise problems solved by quantum and classical finite automata
Shenggen Zheng , Lvzhou Li , Daowen Qiu , ∗ , Jozef Gruska Department of Computer Science, Sun Yat-sen University, Guangzhou 510006, China Faculty of Informatics, Masaryk University, Brno 60200, Czech Republic
Abstract
The concept of promise problems was introduced and started to be systematically explored by Even,Selman, Yacobi, Goldreich, and other scholars. It has been argued that promise problems should be seen aspartial decision problems and as such that they are more fundamental than decision problems and formallanguages that used to be considered as the basic ones for complexity theory. The main purpose of this paperis to explore the promise problems accepted by classical, quantum and also semi-quantum finite automata.More specifically, we first introduce two acceptance modes of promise problems, recognizability and solvability ,and explore their basic properties. Afterwards, we show several results concerning descriptional complexityon promise problems. In particular, we prove: (1) there is a promise problem that can be recognized exactlyby measure-once one-way quantum finite automata (MO-1QFA), but no deterministic finite automata (DFA)can recognize it; (2) there is a promise problem that can be solved with error probability ǫ ≤ / one-wayfinite automaton with quantum and classical states (1QCFA), but no one-way probability finite automaton (PFA) can solve it with error probability ǫ ≤ /
3; and especially, (3) there are promise problems A ( p ) withprime p that can be solved with any error probability by MO-1QFA with only two quantum basis states, butthey can not be solved exactly by any MO-1QFA with two quantum basis states; in contrast, the minimalPFA solving A ( p ) with any error probability (usually smaller than 1 /
2) has p states. Finally, we mention anumber of problems related to promise for further study. Keywords:
Promise problems, Quantum computing, Finite automata, Quantum finite automata,Recognizability, Solvability
1. Introduction
Informally, a promise problem is the problem to decide whether an object or process has a property P or P , provided it is promised (known) to have a property P .The concept of a promise problem was introduced explicitly in [11] and it has been argued there thatpromise problems are actually more fundamental for the study of computational theory issues than decisionproblems or, more formally, formal language versions/encodings of the decision problems.Such a view on the fundamental importance of promise problems has been even more emphasized in thesurvey paper [15], where also the following basic version of the promise problems has been introduced. ∗ Corresponding author (D. Qiu).
E-mail addresses: [email protected] (D. Qiu), [email protected] (S.Zheng), [email protected](L. Li), gruska@fi.muni.cz (J. Gruska). efinition 1.
A promise problem over an alphabet Σ is a pair ( A yes , A no ) of disjoint subsets of Σ ∗ . Theunion A yes ∪ A no is then called the promise and A yes as well A no are called promise’s components.The goal is then to decide whether x ∈ A yes or x ∈ A no for a given string x from the promise set. In aspecial (trivial) case the promise is the the whole set Σ ∗ . However, in general it may be very nontrivial todecided whether an input string is in a given promise set.In spite of the fact that both papers [11, 15] have brought interesting problems and outcomes, the studyof promise problems did not get a proper momentum yet.On the other side, the results concerning several promise problems in quantum information processinghave had very large impact. They demonstrated that using quantum phenomena and processes one can solveseveral interesting promise problems with much less quantum queries (to quantum black boxes) than in thecase only classical tools and queries (to classical black boxes) are available. The initial development in thisarea was culminated by the result of Simon [37] that the promise problem he introduced can be solved withthe polynomial number of quantum and classical queries but not with polynomial number of classical queriesonly even if probabilistic tools are used. The second promise problem is the Hidden Subgroup Problem fornon-commutative groups, which took very large attention, especially its special cases, for example integerfactorization, due to Shor [36], and can be now seen as one of the most fundamental, and still open, problems.Almost all papers so far, especially papers [11, 15], dealt with promise problems in the context of suchhigh level complexity classes as P , NP , BPP , SZK and so on.In this paper we start to explore promise problems on another level, namely, using classical and quantumor even semiquantum finite automata to attack some promise problems working in various (especially twospecial) modes. The remainder of the paper is organized as follows. In Section 2, we recall the definitionsof classical and quantum finite automata that will be used in the paper, and define two acceptance modesof promise problems, recognizability and solvability of promise problems by automata. Then, in Section 3,we deal with the closure and ordering properties of promise problems. Afterwards, in Section 4, lower andupper bounds are derived concerning the state complexity in a promise problem between the promise andits two components.In particular, we study some promise problems in terms of classical and quantum finite automata inSection 5, and obtain the following results: that there is a promise problem that can be recognized exactlyby measure-once one-way quantum finite automata (MO-1QFA), but no deterministic finite automata (DFA)can recognize it (Theorem 13); there is a promise problem that can be solved with any error probabilityby one-way finite automaton with quantum and classical states (1QCFA), but no one-way probability finiteautomaton (PFA) can solve it with error probability ǫ ≤ / A ( p ) with size p that can be solved with any error probability by MO-1QFA with onlytwo quantum basis states, but they can not be solved exactly by any MO-1QFA with two quantum basisstates (Theorem 15), and in contrast, the minimal PFA solving A ( p ) with any error probability (usuallysmaller than 1 /
2) has p states (Theorem 16). However, we do not know whether there is an MO-1QFA withmore than two quantum basis states being able to solve exactly this promise problems A ( p ).In addition, the above result may give rise to a hierarchic problem for the classes solved by MO-1QFAin terms of different quantum basis states. More precisely, let C ( P ) n denote the class of promise problemssolved exactly by an MO-1QFA with n quantum basis states. Then, whether does C ( P ) m ⊂ C ( P ) n hold for m ≤ n ? Therefore, in Section 6 we mention a number of problems related for further study.2 . Preliminaries We introduce in this section some basic concepts and notations concerning classical and quantum finiteautomata. For more on quantum information processing and (quantum and semi-quantum) finite automatawe refer the reader to [16, 19, 26, 27, 29–34].
In this subsection we recall the definition of deterministic finite automata (DFA) and give the definitionof so-called promise version deterministic finite automata (pvDFA).
Definition 2.
A deterministic finite automaton (DFA) A is specified by a 5-tuple A = ( S, Σ , δ, s , S a ) , (1)where: • S is a finite set of classical states; • Σ is a finite set of input symbols; • s ∈ S is the initial state of the automaton; • S a ⊆ S is a set of accepting states; • δ is a transition function: δ : S × Σ → S. (2)For any w ∈ Σ ∗ and σ ∈ Σ, we define b δ ( s, wσ ) = b δ ( b δ ( s, w ) , σ ) (3)and if w is the empty string, then b δ ( s, wσ ) = δ ( s, σ ) . (4)To every DFA A = ( S, Σ , δ, s , S a ) we assign a language L ( A ) defined as following L ( A ) = { w | b δ ( s , w ) ∈ S a , w ∈ Σ ∗ } . (5) Definition 3.
A language L over an alphabet Σ is recognized by a DFA A if for every w ∈ Σ ∗ • w ∈ L if and only if b δ ( s , w ) ∈ S a . • w L if and only if b δ ( s , w ) S a .It is well known that a language L is recognized by a DFA if and only if L is regular. To every DFA A we assign also the (maximal) promise problem P ( A ) defined as follows P ( A ) = (cid:16) P yes ( A ) = { w | b δ ( s , w ) ∈ S a , w ∈ Σ ∗ } , P no ( A ) = Σ ∗ \ P yes ( A ) (cid:17) . (6) Definition 4.
A promise problem A = ( A yes , A no ) is solved by a DFA A if for every w ∈ A yes ∪ A no ⊆ Σ ∗ • w ∈ A yes implies that b δ ( s , w ) ∈ S a . 3 w ∈ A no implies that b δ ( s , w ) S a . Definition 5. A promise version deterministic finite automaton (pvDFA) A is specified by a 6-tuple A = ( S, Σ , δ, s , S a , S r ) , (7)where S a is a set of accepting states and S r is a set of rejecting states, respectively, and S , Σ, δ , s aredefined as in Definition 2.A DFA can be see as a special pvDFA with S a ∪ S r = S . If a pvDFA A is such that S a ∪ S r = S , thenit is equivalent to a DFA. In such a case, we say that A is a DFA. To every pvDFA we assign a promiseproblem P ( A ) defined as following P ( A ) = (cid:16) P yes ( A ) = { w | b δ ( s , w ) ∈ S a , w ∈ Σ ∗ } , P no ( A ) = { w | b δ ( s , w ) ∈ S r , w ∈ Σ ∗ } (cid:17) . (8) Definition 6.
A promise problem A = ( A yes , A no ) is recognized by a pvDFA A if for every w ∈ Σ ∗ • w ∈ A yes if and only if b δ ( s , w ) ∈ S a . • w ∈ A no if and only if b δ ( s , w ) ∈ S r . Definition 7.
A promise problem A = ( A yes , A no ) is solved by a pvDFA A if for every w ∈ A yes ∪ A no • w ∈ A yes implies that b δ ( s , w ) ∈ S a . • w ∈ A no implies that b δ ( s , w ) ∈ S r .If a language L is recognized by a DFA , then we can find efficiently the minimal DFA A such that L ( A ) = L . If a promise problem A is recognized by a pvDFA, then we can also find efficiently the minimalpvDFA A such that P ( A ) = A . More about that will be in Section 3.We will see that for pvDFA recognizability and solvability modes can be seen as much different. Quantum finite automata were introduced by Kondacs and Watrous [21] and also by Moore and Crutch-fields [25]. It has been proved that one-way quantum finite automata (1QFA) with unitary operations andprojective measurements are less powerful than one-way classical finite automata (1FA) [2, 22]. However,1QFA can be more succinct in recognizing languages or solving promise problems [2–8, 12, 18, 39, 43–45].
Definition 8.
A measure-once quantum finite automaton (MO-1QFA) M is specified by a 5-tuple M = ( Q, Σ , { U σ | σ ∈ Σ ′ } , | i , Q a ) (9)where: • Q is a finite set of orthonormal quantum (basis) states, denoted as {| i i | ≤ i < | Q |} ; • Σ is a finite alphabet of input symbols and Σ ′ = Σ ∪ {| c, $ } (where | c will be used as the left end-markerand $ as the right end-marker); • | i ∈ Q is the initial quantum state; 4 Q a ⊆ Q denotes the set of accepting basis states; • U σ ’s ( σ ∈ Σ ′ ) are unitary operators.The quantum state space of this model will be the | Q | -dimensional Hilbert space denoted H Q .Each quantum basis state | i i in H Q can be represented by a column vector with the ( i + 1)th entry being1 and other entries being 0. With this notational convenience we can describe the above model as follows:1. The initial state | i is represented as | q i = (1 , | Q |− z }| { , · · · , T .2. The accepting set Q a corresponds to the projective operator P acc = P | i i∈ Q a | i ih i | .The computation of an MO-1QFA M on an input string x = σ σ · · · σ n ∈ Σ ∗ goes as follows: M “reads” the input string from the left end-marker to the right end-marker, symbol by symbol, and theunitary matrices U | c , U σ , U σ , · · · , U σ n , U $ are applied, one by one, always on the current state, startingwith | i as the initial state. Finally, the projective measurement { P acc , I − P acc } is performed on the finalstate, in order to accept or reject the input. Therefore, for an input string w = σ σ · · · σ n , M has theaccepting probability P r [ M accepts w ] = k P acc U $ U σ n · · · U σ U σ U | c | ik (10)and the rejecting probability P r [ M rejects w ] = 1 − P r [ M accepts w ] . (11) Definition 9.
A promise version of a measure-once quantum finite automaton (pvMO-1QFA) M is specifiedby a 6-tuple M = ( Q, Σ , { U σ | σ ∈ Σ ′ } , | i , Q a , Q r ) (12)where: Q , Σ, Σ ′ , | i , Q a , U σ are as defined in an MO-1QFA, Q r ⊆ Q ( Q r ∩ Q a = ∅ ) denotes the set ofrejecting basis states. The set Q r corresponds to the projective operator P rej = P | i i∈ Q r | i ih i | .For an input string w = σ σ · · · σ n , M has the accepting probability P r [ M accepts w ] = k P acc U $ U σ n · · · U σ U σ U | c | ik (13)and the rejecting probability P r [ M rejects w ] = k P rej U $ U σ n · · · U σ U σ U | c | ik . (14)Another interesting (important) model of two-way finite automata with quantum and classical states (2QCFA)–was introduced by Ambainis and Watrous [1] and explored in [24, 39, 41–44]. If restricting theread-head in a 2QCFA to be one-way , then it is natural to get one-way finite automata with quantum andclassical states (1QCFA). That is, 1QCFA are one-way versions of 2QCFA, studied by Zheng and Qiu etal [43]. It is worth mentioning that more previously a different but more practical model called as one-way quantum finite automata together with classical states (1QFAC) was proposed and studied by Qiu etal [34]. Informally, a 1QCFA can be seen as a DFA which has an access to a quantum memory of aconstant size (dimension), upon which the automaton performs quantum transformations and projectivemeasurements. Given a finite set of quantum basis states Q , we denote by H ( Q ) the Hilbert space spannedby Q . Let U ( H ( Q )) and O ( H ( Q )) denote the sets of unitary operators and projective measurements over H ( Q ), respectively. 5 efinition 10. A one-way finite automaton with quantum and classical states (1QCFA) A is specified bya 10-tuple M = ( Q, S, Σ , Θ , ∆ , δ, | q i , s , S a , S r ) (15)where:1. Q is a finite set of orthonormal quantum states, a basis of a Hilbert space H Q spanned by states from Q .2. S is a finite set of classical states.3. Σ is a finite alphabet of input symbols and Σ ′ = Σ ∪ {| c , $ } , where | c will be used as the left end-markerand $ as the right end-marker.4. | q i ∈ Q is the initial quantum state.5. s is the initial classical state.6. S a ⊂ S and S r ⊂ S , where S a ∩ S r = ∅ , are sets of the classical accepting and rejecting states,respectively.7. Θ is a quantum transition functionΘ : S \ ( S a ∪ S r ) × Σ ′ → U ( H ( Q )) , (16)assigning to each pair ( s, γ ) ∈ S \ ( S a ∪ S r ) × Σ ′ a unitary transformation.8. ∆ is a mapping ∆ : S × Σ ′ → O ( H ( Q )) , (17)where each ∆( s, γ ) corresponds to a projective measurement (a projective measurement will be takeneach time a unitary transformation is applied; if we do not need a measurement, we denote that∆( s, γ ) = I , and we assume the result of the measurement to be a fixed c ).9. δ is a special transition function of classical states. Let the results set of the measurement be C = { c , c , . . . , c s } , then δ : S × Σ ′ × C → S, (18)where δ ( s, γ )( c i ) = s ′ means that if a tape symbol γ ∈ Σ ′ is being scanned and the projective mea-surement result is c i , then the state s is changed to s ′ .Given an input w = σ · · · σ n , the word on the tape will be seen as w = | c w $ (for convenience, we denote σ = | c and σ n +1 = $). Now, we define the behavior of 1QCFA M on any input word w . The computationstarts in the classical state s and the quantum state | q i . After that transformations associated withsymbols in the word σ σ · · · , σ n +1 are applied in succession. A transformation associated with a state s ∈ S and a symbol σ ∈ Σ ′ consists of three steps:1. The unitary transformation Θ( s, σ ) is applied to the current quantum state | φ i , yielding the new state | φ ′ i = Θ( s, σ ) | φ i .2. The observable ∆( s, σ ) = O is measured on | φ ′ i . The set of possible results is C = { c , · · · , c s } .According to quantum mechanics principles, such a measurement yields the classical outcome c k withprobability p k = || P ( c k ) | φ ′ i|| , and the quantum state of M collapses to P ( c k ) | φ ′ i / √ p k .3. The current classical state s is changed to δ ( s, σ )( c k ) = s ′ .
6n input word w is assumed to be accepted (rejected) if and only if the automaton enters at the end anaccepting (rejecting) state. It is assumed that δ is well defined so that 1QCFA M always accepts or rejectsat the end of the computation. Definition 11.
An MO-1QFA, 1QCFA M recognizes a language L with bounded error ε if for every w ∈ Σ ∗ • w ∈ L if and only if P r [ M accepts w ] ≥ − ε . • w / ∈ L if and only if P r [ M rejects w ] ≥ − ε . Definition 12.
A pvMO-1QFA M recognizes a promise problem A = ( A yes , A no ) with an error probability ε if for every w ∈ Σ ∗ • w ∈ A yes if and only if P r [ M accepts w ] ≥ − ε . • w ∈ A no if and only if P r [ M rejects w ] ≥ − ε . Definition 13.
A promise problem A = ( A yes , A no ) is solved by a pvMO-1QFA M with an error probability ε if for every w ∈ A yes ∪ A no • w ∈ A yes implies that P r [ M accepts w ] ≥ − ε , and • w ∈ A no implies that P r [ M rejects w ] ≥ − ε .If ε = 0, we say that the automaton M solves (recognizes) the promise problem A exactly.
3. Properties of pvDFA
We will now study closure properties of promise problems recognized or solved by pvDFA.
Theorem 1.
A promise problem A = ( A yes , A no ) can be recognized by a pvDFA A iff both A yes and A no are regular.Proof. ( ⇒ ) Suppose that a promise problem A can be recognized by a pvDFA A = ( S, Σ , δ, s , S a , S r ). Insuch a case, for all w ∈ Σ ∗ , w ∈ A yes if and only if b δ ( s , w ) ∈ S a . Let DFA A y = ( S, Σ , δ, s , S a ). Obviously, A yes is recognized by A y and therefore A yes is regular. Using similar argument, one can show that A no isregular.( ⇐ ) Let us assume that the set A yes can be recognized by a DFA A = ( S , Σ , δ , s , S a ) and A no can berecognized by a DFA A = ( S , Σ , δ , s , S a ). We now consider the following pvDFA A = ( S, Σ , δ, s , S a , S r )where • S = ( S × S ) \ ( S a × S a ); • s = h s , s i ; • δ ( h s , s i , σ ) = h δ ( s , σ ) , δ ( s , σ ) i ; • S a = S a × ( S \ S a ) and S r = ( S \ S a ) × S a . 7or any w ∈ Σ ∗ , we prove first that s = b δ ( s , w ) S a × S a . Let us assume that s = h s , s i ∈ S a × S a .We have b δ ( s , w ) = h b δ ( s , w ) , b δ ( s , w ) i = h s , s i . Therefore, b δ ( s , w ) = s ∈ S a and b δ ( s , w ) = s ∈ S a .This implies that w ∈ A yes and w ∈ A no , which is a contradiction.If w ∈ A yes , then s = b δ ( s , w ) ∈ S a and s = b δ ( s , w ) S a . Therefore, b δ ( s , w ) = h b δ ( s , w ) , b δ ( s , w ) i = h s , s i ∈ S a × ( S \ S a ) = S a .If w ∈ Σ ∗ is such that b δ ( s , w ) ∈ S a , then b δ ( s , w ) = h b δ ( s , w ) , b δ ( s , w ) i = h s , s i ∈ S a × ( S \ S a ).We have therefore b δ ( s , w ) ∈ S a and w ∈ A yes .With a similar argument as above, we can show that for any w ∈ Σ ∗ , w ∈ A no if and only if b δ ( s , w ) ∈ S r .Therefore the promise problem A = ( A yes , A no ) can be recognized by the pvDFA A . Remark 1.
If a promise problem A is recognized by a pvDFA A , then A is solved by the same pvDFA A . However, if a promise problem A is solved by a pvDFA A , it does not necessarily mean that A canbe recognized by a pvDFA. For example, let us consider the promise problems B l = ( B lyes , B lno ) with B lyes = { a i b i | i ≥ } and B lno = { a i b i + l | i ≥ } , where l is a fix positive integer. The promise problem B l can be solved by a DFA [18]. Therefore it can be solved by a pvDFA. However, both B lyes and B lno are nonregular languages . Therefore B l cannot be recognized by a pvDFA. The pumping lemma for pvDFA concerning recognition is similar to the classical one [19].
Lemma 1 ( Pumping Lemma I).
Let a promise problem A = ( A yes , A no ) can be recognized by a pvDFA A . Then there exists an integer p ≥ , depending only on A , such that every string w in A yes ( A no ), oflength at least p , can be written as w = xyz (i.e., w can be divided into three substrings), satisfying thefollowing conditions: • | y | ≥ ; • | xy | ≤ p ; • xy t z ∈ A yes ( A no ) for all integers t ≥ . The pumping lemma for pvDFA concerning solvability has quite a different form than the above PumpingLemma.
Lemma 2 ( Pumping Lemma II).
Let a promise problem A = ( A yes , A no ) can be solved by a pvDFA A .Then there exists an integer p ≥ , depending only on A , such that every string w in A yes ( A no ), of lengthat least p , can be written as w = xyz (i.e., w can be divided into three substrings), satisfying the followingconditions: • | y | ≥ ; • | xy | ≤ p ; • xy t z / ∈ A no ( A yes ) for all integers t ≥ .Proof. Let pvDFA A = ( S, Σ , δ, s , S a , S r ) and p = | S | be the number of the of states of A . For a word w = σ . . . σ n ∈ A yes ( A no ), we denote the computation of A on w by the following sequence of transitions: s σ −→ s σ −→ · · · σ n −−→ s n , (19)8here s n ∈ S a ( S r ).If n ≥ p , then there exist i < j such that s i = s j . Let x = σ . . . σ i , y = σ i +1 . . . σ j and z = σ j +1 . . . σ n .We have, b δ ( s , x ) = s i , b δ ( s i , y ) = s j and b δ ( s j , z ) = s n ∈ S a . Therefore b δ ( s i , y ∗ ) = s i .If there exists an integer t ≥ w = xy t z ∈ A no ( A yes ), then b δ ( s , w ) = b δ ( s , xy t z ) = b δ ( s i , y t z ) = b δ ( s i , z ) = s n ∈ S a ( S r ), which is a contradiction. Therefore, we have xy t z / ∈ A no ( A yes ) for all t ≥ Example 1.
Let us consider the promise problem C = ( C yes , C no ) with C yes = { a n b n } and C no = { a n b m | n = m } . Assume that C can be solved by a pvDFA A and p is the constant for the pumpinglemma. Choose w = a p b p ∈ A yes . Clearly, | w | > p . By the Pumping Lemma II, w = xyz for some x, y, z ∈ Σ ∗ such that (1) | xy | ≤ p , (2) | y | ≥
1, and (3) xy t z A no for all t ≥
0. By (1) and (2), we have y = a k , 1 ≤ k ≤ p . However, xy z = a p + k b p ∈ A no . Therefore, (3) does not hold. The promise problem C therefore does not satisfy the pumping property of the Pumping Lemma II. Hence, the promise problem C can not be solved by any pvDFA. Let us have promise problems A = ( A yes , A no ) and B = ( B yes , B no ) over the same alphabet . Thecomplement, intersection and union operations on such promise problems will be defined as follows. • Complement: A = ( A yes , A no ), where A yes = A no and A no = A yes . • Intersection: C = A ∩ B = ( C yes , C no ), where C yes = A yes ∩ B yes and C no = A no ∩ B no . • Union: if ( A yes ∪ B yes ) ∩ ( A no ∪ B no ) = ∅ , then the union of A and B will be undefined; otherwise theunion C = A ∪ B = ( C yes , C no ), where C yes = A yes ∪ B yes and C no = A no ∪ B no .There seems to be several other ways one could try to define intersection and union of A and B . We willnow try to argue that our definitions are reasonable. Let us assume that Alice has two subsets A yes and A no over Σ ∗ . If Alice would be asked for an x ∈ A yes ∪ A no whether x ∈ A yes or x ∈ A no , then she shouldbe able to answer “yes” or “no” (by checking whether x ∈ A yes or x ∈ A no ). Let us assume also that Bobhas two subsets B yes and B no over Σ ∗ . If Bob would be asked for an x ∈ B yes ∪ B no whether x ∈ B yes or x ∈ B no , then he should be able to give correct answer. The intersection of two promise problems shouldbe therefore such that for a given input, both Alice and Bob are able to tell whether a given input is in theyes–set or no–set.The union of two promise problems should be therefore such that for a given input, at least one of Aliceand Bob are able to tell whether it is in the yes–set or no–set, that is why union was defined in the way itwas.Let us now give several results concerning how promise problems are closed on some operations in thecase of recognizability and solvability modes. When we take the union or intersection of two promise problems, they might have different alphabets. However, if P = ( P yes , P no ) is a promise problem over alphabet Σ, then we can also think of P over any finite alphabet that is a supersetof Σ. See [19] for more details. heorem 2. If a promise problems A can be recognized (solved) by a pvDFA, then A can be recognized(solved) by a pvDFA.Proof. Suppose that a promise problem A can be recognized (solved) by a pvDFA A = ( S, Σ , δ, s , S a , S r ).Exchanging the sets of accepting states and rejecting states of the pvDFA A , we get a new pvDFA A ′ =( S, Σ , δ, s , S r , S a ). It is easy to see that A is recognized (solved) by the pvDFA A ′ . Theorem 3.
If promise problems A and B can be recognized by pvDFA, then their intersection can be alsorecognized by a pvDFA.Proof. Suppose that a promise problem A can be recognized by a pvDFA A = ( S , Σ , δ , s , S a , S r ) anda promise problem B can be recognized by a pvDFA A = ( S , Σ , δ , s , S a , S r ). We consider a pvDFA A = ( S, Σ , δ, s , S a , S r ), where • S = S × S ; • s = h s , s i ; • δ ( h s , s i , σ ) = h δ ( s , σ ) , δ ( s , σ ) i ; • S a = S a × S a and S r = S r × S r .Let the promise problem C = ( C yes , C no ) be the intersection of the promise problems A = ( A yes , A no )and B = ( B yes , B no ).If w ∈ C yes , then w ∈ A yes ∩ B yes . We have b δ ( s , w ) ∈ S a and b δ ( s , w ) ∈ S a . Therefore, we have b δ ( s , w ) = b δ ( h s , s i , w ) = h b δ ( s , w ) , b δ ( s , w ) i ∈ S a × S a = S a .If w ∈ Σ ∗ is such that b δ ( s , w ) ∈ S a , we have b δ ( s , w ) = b δ ( h s , s i , w ) = h b δ ( s , w ) , b δ ( s , w ) i ∈ S a = S a × S a . Therefore, b δ ( s , w ) ∈ S a and b δ ( s , w ) ∈ S a , i.e. w ∈ A yes and w ∈ B yes . Hence, w ∈ A yes ∩ B yes = C yes .Therefore, we have w ∈ C yes if and only if b δ ( s , w ) ∈ S a . By a similar argument, we can show that w ∈ C no if and only if b δ ( s , w ) ∈ S r . Hence, the promise problem C = A ∩ B can be recognized by thepvDFA A . Theorem 4.
If promise problems A and B can be solved by pvDFA, then their intersection can be solvedalso by a pvDFA.Proof. Let a promise problem C = ( C yes , C no ) be the intersection of the two promise problems A =( A yes , A no ) and B = ( B yes , B no ). Suppose that the promise problem A = ( A yes , A no ) can be solved bya pvDFA A . Since C yes = A yes ∩ B yes ⊂ A yes and C no = A no ∩ B no ⊂ A no , the promise problem C can besolved by A . Theorem 5.
Let promise problems A and B over an alphabet Σ can be recognized by pvDFA and their union C exists, then C can be recognized also by a pvDFA.Proof. Suppose that the promise problem A with the alphabet Σ can be recognized by a pvDFA A =( S , Σ , δ , s , S a , S r ) and the promise problem B with alphabet Σ can be recognized by a pvDFA A =( S , Σ , δ , s , S a , S r ).We consider the pvDFA A = ( S, Σ , δ, s , S a , S r ), where10 S = ( S × S ) \ (( S a × S r ) ∪ ( S r × S a )); • s = h s , s i ; • δ ( h s , s i , σ ) = h δ ( s , σ ) , δ ( s , σ ) i ; • S a = {h s , s i | s ∈ S a or s ∈ S a } and S r = {h s , s i | s ∈ S r or s ∈ S r } .Let the promise problem C = ( C yes , C no ) be the union of promise problems A = ( A yes , A no ) and B = ( B yes , B no ). Since the union C = A ∪ B exists, we have ( A yes ∪ B yes ) ∩ ( A no ∪ B no ) = ∅ .We prove now for any w ∈ Σ ∗ that s = b δ ( s , w ) S a × S r . Let us assume that s = h s , s i ∈ S a × S r .We have b δ ( s , w ) = h b δ ( s , w ) , b δ ( s , w ) i = h s , s i . Therefore, b δ ( s , w ) = s ∈ S a and b δ ( s , w ) = s ∈ S r .From that it follows that w ∈ A yes and w ∈ B no . Therefore, w ∈ ( A yes ∪ B yes ) ∩ ( A no ∪ B no ) = ∅ , which isa contradiction. By a similar argument we can prove that b δ ( s , w ) S r × S a . Hence S a ∩ S r = ∅ .If w ∈ C yes , then w ∈ A yes ∪ B yes . We have b δ ( s , w ) ∈ S a or b δ ( s , w ) ∈ S a . Therefore, b δ ( s , w ) = b δ ( h s , s i , w ) = h b δ ( s , w ) , b δ ( s , w ) i ∈ S a .If w ∈ Σ ∗ is such that b δ ( s , w ) ∈ S a , we have b δ ( s , w ) = b δ ( h s , s i , w ) = h b δ ( s , w ) , b δ ( s , w ) i ∈ S a .Therefore, b δ ( s , w ) ∈ S a and b δ ( s , w ) ∈ S a , i.e. w ∈ A yes or w ∈ B yes . Hence, w ∈ A yes ∪ B yes = C yes .Therefore, w ∈ C yes if and only if b δ ( s , w ) ∈ S a . By a similar argument, we can show that w ∈ C no ifand only if b δ ( s , w ) ∈ S r . Hence, the promise problem C = A ∪ B can be recognized by the pvDFA A . Remark 2.
If promise problems A and B can be solved by pvDFA and their union C exists, then C may notbe solved by a pvDFA. Indeed, let A = ( A yes , A no ), where A yes = { a n b n | n is odd } and A no = { a n b m | m = n and at least one of m, n is even } . If w ∈ A yes , then a ( w ) and b ( w ) are odd. If w ∈ A no , at least oneof a ( w ) and b ( w ) is even. Obviously, we can design a pvDFA to solve the promise problem A . Let B =( B yes , B no ), where B yes = { a n b n | n is even } and B no = { a n b m | m = n and at least one of m, n is odd } .Similarly, we can design another pvDFA to solve the promise problem B . Now we consider their union C = A ∪ B = ( C yes , C no ), where C yes = A yes ∪ B yes = { a n b n } and C no = A no ∪ B no = { a n b m | n = m } .According to Example 1, C can not be solved by any pvDFA. Let us start with some basic definitions concerning ordering of promise problems. Let A = ( A yes , A no )and B = ( B yes , B no ) be two promise problems over an alphabet Σ. We say that A is a subproblem of B ,denoted by A ≤ B , if A yes ⊆ B yes and A no ⊆ B no .We say also that a pvDFA A is equivalent to a pvDFA B (denoted by A = B ) if P ( A ) = P ( B ). We saythat a pvDFA B is more powerful than or equivalent to a pvDFA A (denoted by B ≥ A or A ≤ B ) if P ( A ) ≤ P ( B ). It is clear that the set of all pvDFA is a partially ordered set with the partial order ‘ ≤ ’. Wesay that a pvDFA B is more powerful than a pvDFA A (denoted by B > A or A < B ) if P ( A ) ≤ P ( B ) and P ( A ) = P ( B ).The first outcome concering the impact of ordering on solvability of promise problems follows in astraightforward way from basic definitions. Theorem 6.
If a promise problem A can be solved by a pvDFA A and A ≤ B , then the promise problem A can be solved by the pvDFA B . We say a pvDFA A is maximally powerful if there does not exist a pvDFA B such that A < B .11 heorem 7. A pvDFA A is maximally powerful if and only if it is (essentially) a DFA.Proof. If A is a DFA, then P yes ( A ) = Σ ∗ \ P no ( A ). Therefore, there does not exist a promise problem B such that P ( A ) < B . Therefore, there does exist a pvDFA B such that A < B , i.e. A is maximally powerful.Assume that a pvDFA A is maximally powerful and A is not a DFA. Suppose that the pvDFA A =( S, Σ , δ, s , S a , S r ) and it is state minimal. We have that S a ∪ S r = S and S r is a proper subset of S \ S a .Let us now consider a new pvDFA B = ( S, Σ , δ, s , S a , S \ S a ). Suppose that P ( B ) = ( B yes , B no ). Therefore,there must exist some w ∈ B no such that b δ ( s , w ) ∈ S \ S a and b δ ( s , w ) S r . Therefore, P no ( A ) is a propersubset of B no . Since P yes ( A ) = B yes . We have P ( A ) < P ( B ), which is a contradiction. Hence, A must bea DFA.We say that two pvDFA A and B are comparable if A = B or A < B or A > B . Two DFA are eitherequivalent or not comparable. If a pvDFA A is a DFA, then there does not exist a pvDFA B such that A < B . Equivalence of two DFA can be seen as a special case of the equivalence of two pvDFA.If pvDFA A = B , then A is a potential substitute for B in recognizing promise problems (languages). IfpvDFA A ≥ B , then A is a potential substitute for B in solving promise problems. Therefore, it is importantto determine the order of pvDFA.In order to study determination of equivalence and ordering of two given pvDFA, we now introduce theconcept of a bilinear machine (BLM).By [23], a BLM over an alphabet Σ is a four-tuple A = ( S, π, { M ( σ ) } σ ∈ Σ , η ), where S is a finite set ofstates with | S | = n , π ∈ C × n , η ∈ C n × and M ( σ ) ∈ C n × n for σ ∈ Σ. The word function f A : Σ ∗ → C associated to A is then defined as follows: f A ( x ) = πM ( x ) . . . M ( x n ) η, (20)where x = x . . . x n ∈ Σ ∗ . Two BLMs A and A are said to be equivalent if f A ( x ) = f A ( x ) for all x ∈ Σ ∗ .For this problem, we recall a result from [23]. Lemma 3.
There exists a polynomial-time algorithm ( running in time O (( n + n ) )) that takes two BLMs A and A as inputs and determines whether A and A are equivalent, where n and n are the numbersof states of A and A , respectively. Using this lemma we will obtain the following result.
Theorem 8.
It is decidable whether two pvDFA are comparable.Proof.
Given two pvDFA A and B , it is sufficient to prove that it is decidable whether A = B , and whether A < B .At first we prove that it is decidable whether A = B . Indeed, suppose that a pvDFA C = ( S, Σ , δ, s , S a , S r )recognizes a promise problem C = ( C yes , C no ). We construct now a BLM: C ′ = ( S, π, { M ( σ ) } σ ∈ Σ , η ), where π is an | S | -dimensional row vector with π [ s ] = 1 and π [ s ] = 1 for s = s , M ( σ ) is an | S | × | S | matrix with M ( σ )[ s, t ] = 1 if δ ( s, σ ) = t and 0 otherwise, and η is an | S | -dimensional column vector such that η [ s ] = , if s ∈ S a ;2 , if s ∈ S r ;0 , otherwise.12o such a BLM C ′ we can associate a function f C ′ : Σ ∗ → { , , } defined as follows: f C ′ ( x ) = 1 iff x ∈ C yes , f C ′ ( x ) = 2 iff x ∈ C no , and f C ′ ( x ) = 0 iff x ∈ Σ ∗ \ ( C yes ∪ C no ).Therefore, two pvDFA A and B are equivalent iff their associated BLMs A ′ and B ′ are equivalent, i.e., f A ′ ( x ) = f B ′ ( x ) for all x ∈ Σ ∗ . The latter problem is decidable by Lemma 3.As the next we show that it is decidable whether A < B . Suppose that a pvDFA C = ( S, Σ , δ, s , S a , S r )is such that P ( C ) = ( C yes , C no ). Let us now consider DFA C y = ( S, Σ , δ, s , S a ) and C n = ( S, Σ , δ, s , S r ).Clearly L ( C y ) = C yes and L ( C n ) = C no . These observations can now be used as follows. Given two pvDFA A and B , we have A < B iff L ( A y ) ⊆ L ( B y ) and L ( A n ) ⊆ L ( B n ).It is clear that L ( A ) ⊆ L ( B ) is equivalent to L ( A ) ∩ L ( B ) = L ( A ). The later problem is decidable,since it is easy to construct a DFA C recognizing L ( A ) ∩ L ( B ) and the equivalence between DFA C and A is decidable. Therefore, given two DFA A and B , it is decidable whether L ( A ) ⊆ L ( B ). Remark 3.
Note that for any given pvDFA, there exist algorithms to find an equivalent pvDFA whichhas the smallest number of states among all pvDFA equivalent to the given one, since a pvDFA can beconsidered as a special Moore automaton whose minimization problem is known to be solvable, see [9] formore details.
Remark 4.
If one of the following cases A = B , A < B or A > B holds, then we know that two pvDFA arecomparable. Otherwise, they are not comparable. Suppose that pvDFA A has n states and pvDFA B has n states, it takes polynomial time ( O (( n + n ) )) to determine whether A = B . Given two DFA C andDFA D , it takes also polynomial time to find out L ( C ) ∩ L ( D ). According to the above theorem, therefore,it takes polynomial time to determine whether two pvDFA are comparable or not.
4. State complexity
Consideration of state complexity is another way to get a deepen insight in to the power of various typesof automata [40]. In this section we will deal with the state complexity of pvDFA for promise problems withrespect to recognizability and solvability.For a regular language L , we denote by s ( L ) the number of states of the minimal DFA to recognize thelanguage L . For a promise problem A = ( A yes , A no ) that can be recognized by a pvDFA, we denote by sr ( A ) the number of states of the minimal pvDFA recognizing A . For a promise problem A = ( A yes , A no )that can be solved by a pvDFA, we denote by ss ( A ) the number of states of the minimal pvDFA solving A .In a DFA A = ( S, Σ , δ, s , S a ), a state s is said to be distinguishable from a state t if there is w ∈ Σ ∗ such that one of the states b δ ( s, w ) and b δ ( t, w ) is accepting, and the other is not. If every two states in DFA A are distinguishable from each other, then A is minimal [19]. Theorem 9.
If a promise problem A = ( A yes , A no ) with A yes = ∅ and A no = ∅ can be recognized by apvDFA, then max { s ( A yes ) , s ( A no ) } ≤ sr ( A ) ≤ s ( A yes ) s ( A no ) − . (21) Proof.
Since A can be recognized by a pvDFA, according to Theorem 1, A yes and A no are regular languages.Suppose that A is recognized by a minimal pvDFA A = ( S, Σ , δ, s , S a , S r ), we have that the regularlanguage A yes can be recognized by the DFA A y = ( S, Σ , δ, s , S a ) and the regular language A no canbe recognized by the DFA A n = ( S, Σ , δ, s , S r ). Therefore, | S | ≥ s ( A yes ) and | S | ≥ s ( A no ). Hence sr ( A ) = | S | ≥ max { s ( A yes ) , s ( A no ) } . 13et us assume that A yes is recognized by a minimal DFA A = ( S , Σ , δ , s , S a ) and A no is recognized bya minimal DFA A = ( S , Σ , δ , s , S a ). According to Theorem 1, the promise problem can be recognizedby the pvDFA A = ( S, Σ , δ, s , S a , S r ) where S = ( S × S ) \ ( S a × S a ), s = h s , s i , δ ( h s , s i , σ ) = h δ ( s , σ ) , δ ( s , σ ) i , S a = S a × ( S \ S a ) and S r = ( S \ S a ) × S a . Therefore, we have sr ( A ) ≤ | S |−| S a × S a | ≤ S × S − s ( A yes ) s ( A no ) − Theorem 10.
The left side of Inequalities (21) is tight.Proof.
We prove that sr ( A ) = max { s ( A yes ) , s ( A no ) } in some cases. Let us consider the promise problem A N, l = ( A N, lyes , A
N, lno ) with A N, lyes = { a iN | i ≥ } and A N, lno = { a iN + l | i ≥ } , where N is a fix prime and l is a fix positive integer such that 0 < l < N . It is easy to see that s ( A N, lyes ) = N and s ( A N, lno ) = N . Letus consider now an N -state pvDFA B = ( S, { a } , δ, s , S a , S r ), where S = { s , s , . . . , s N − } , S a = { s } , S r = { s l } and δ ( s i , a ) = s ( i +1) mod N . It is easy to check that the promise problem A N, l can be recognizedby the pvDFA B .Let us assume now that the promise problem A N, l can be recognized by an M -state pvDFA B ′ =( S ′ , { a } , δ ′ , s ′ , S ′ a , S ′ r ) and M < N . It is easy to see that the DFA B ′ = ( S ′ , { a } , δ ′ , s ′ , S ′ a ) can solve thepromise problem A N, l . Therefore, the minimal DFA to solve the promise problem A N, l has less than N states, contradicting the fact that the minimal DFA to solve A N, l has N states [18].Therefore, sr ( A N, l ) = max { s ( A N, lyes ) , s ( A N, lno ) } = N .For the right side, we only know the following relation. Theorem 11.
There is a promise problem A satisfying sr ( A ) = s ( A yes ) s ( A no ) .Proof. In the interest of readability, we put the proof in Appendix.
Theorem 12.
If a promise problem A = ( A yes , A no ) can be recognized by a pvDFA, then ss ( A ) ≤ min { s ( A yes ) ,s ( A no ) } .Proof. According to Theorem 1, A yes and A no are regular languages. Suppose A yes can be recognizedby a minimal DFA A = ( S , Σ , δ , s , S a ). This implies that the promise problem A can be solved bythe DFA A and therefore ss ( A ) ≤ s ( A yes ). Suppose A no can be recognized by a minimal DFA A =( S , Σ , δ , s , S a ). We get that the promise problem A can be solved by the DFA A and therefore ss ( A ) ≤ s ( A no ). Hence ss ( A ) ≤ min { s ( A yes ) , s ( A no ) } .We prove that ss ( A ) = min { s ( A yes ) , s ( A no ) } in same cases. Let us consider the promise problem A N, l = ( A N, lyes , A
N, lno ) with A N, lyes = { a iN | i ≥ } and A N, lno = { a iN + l | i ≥ } , where N is a fix prime and l is a positive integer such that 0 < l < N . It is easy to see that s ( A N, lyes ) = N and s ( A N, lno ) = N . It has beenproved in [18] that ss ( A N, l ) = N . Therefore ss ( A N, l ) = min { s ( A N, lyes ) , s ( A N, lno ) } = N . Remark 5. ss ( A ) can be very small with respect to s ( A yes ) and s ( A no ). For example, let us consider thepromise problem A N, l = ( A N, lyes , A
N, lno ) with A N, lyes = { a iN | i ≥ } and A N, lno = { a iN + l | i ≥ } , where N is a fix even integer and l is fix odd integer such that 0 < l < N . Obviously, we have s ( A N, lyes ) = N and14 ( A N, lno ) = N . However ss ( A N, l ) = 2, since the length of the input | w | is even if w ∈ A N, lyes and the length ofthe input | w | is odd if w ∈ A N, lno .
5. One-way quantum finite automata for promise problems
It has been proved that two-way quantum finite automata (2QFA) [21] and also 2QCFAs [1] are morepowerful than two-way probabilistic finite automata (2PFA) in recognizing languages. 2QCFA are also morepowerful than 2PFA in solving promise problems [35]. In the case of one-wayness, it has been proved thatone-way quantum finite automata (1QFA) are not more powerful than one-way classical finite automata(1FA) [2, 20, 22] in recognizing languages. However, we will prove that 1QFA can be more powerful thantheir classical counterparts when recognizing promise problems.We prove now that the exact 1QFA have advantages in recognizing promise problems comparing to theirclassical counterparts (DFA). Some of the proof techniques can be found in [18].Let us consider a family of promise problems A l = ( A lyes , A lno ) with A lyes = { w ∈ { a, b } ∗ | a ( w ) = b ( w ) } and A lno = { w ∈ { a, b } ∗ | a ( w ) + l = b ( w ) } , where l is a fix positive integer such that (2 πi + π ) ≤√ l ≤ (2 πi + π ) for some integer i . Theorem 13.
The promise problems A l can be recognized exactly by a pvMO-1QFA and can not be recognizedby any pvDFA.Proof. Let θ = √ π, p = cos lθ, α = r − p − p = r − cos lθ − cos lθ and β = r − p = r − cos lθ . (22)We will now construct a pvMO-1QFA M l = ( Q, { a, b } , { U σ | σ ∈ {| c, a, b, $ }} , | i , Q a , Q r ) to recognize A l exactly, where • Q = {| i , | i , | i} , Q a = {| i} , Q r = {| i , | i} . • U σ are defined as follows: U | c = α − β β α
00 0 1 , U a = θ sin θ − sin θ cos θ , U b = θ − sin θ θ cos θ , U $ = U − | c . (23)See [18] for more intuitions why we choose U | c and U $ in the way as above. Since U a U b = U b U a = I , for w = σ . . . σ | w | ∈ { a, b } ∗ , we have U w = U σ | w | . . . U σ = U a ( w ) a U b ( w ) b . (24)Let a ( w ) = n and b ( w ) = m . If w ∈ A lyes , then the quantum state before the measurement is | q i = U $ U w U | c | i = U $ ( U a ) n ( U b ) m U | c | i = U $ ( U a ) n ( U b ) n U | c | i = | i (25)and if the input w ∈ A lno , then the quantum state before the measurement is | q i = U $ U w U | c | i = U $ ( U a ) n ( U b ) m U | c | i = U $ ( U a ) n ( U b ) n + l U | c | i = U $ ( U b ) l U | c | i = γ | i + γ | i , (26)where γ and γ are amplitudes that we do not need to specify more exactly.Since the amplitude at | i in the above quantum state | q i is 0, we get the exact result after the mea-surement of γ | i + γ | i in the standard basis {| i , | i , | i} . Therefore, we have15 if w ∈ A lyes , then P r [ M l accepts w ] = 1; • if w ∈ A lno , then P r [ M l rejects w ] = 1.We now give the proof for the other direction. Namely, we show that P r [ M l accepts w ] = 1 implies that w ∈ A lyes .Assume that w A lyes , that is a ( w ) = b ( w ). The quantum state before the measurement is | q i = U $ U w U | c | i = U $ ( U a ) n ( U b ) m U | c | i = U $ ( U b ) m − n U | c | i (27)= α β − β α
00 0 1 m − n ) θ − sin( m − n ) θ m − n ) θ cos( m − n ) θ α − β β α
00 0 1 (28)= α + β cos( m − n ) θ − αβ + αβ cos( m − n ) θβ sin( m − n ) θ . (29)Since θ = √ π , there are no integers m = n such that cos( m − n ) θ = 1. Therefore α + β cos( m − n ) θ = 1and P r [ M l accepts w ] = 1.We now prove the following: If P r [ M l rejects w ] = 1, then the input w ∈ A lno .Assume that w A lno , that is a ( w ) = b ( w ) + l . The quantum state before the measurement is | q i = U $ U w U | c | i = U $ ( U a ) n ( U b ) m U | c | i = U $ ( U b ) m − n U | c | i = α + β cos( m − n ) θ − αβ + αβ cos( m − n ) θβ sin( m − n ) θ . (30)Let m − n = l ′ . Since θ = √ π and m = n + l , we have α + β cos( m − n ) θ = α + β cos l ′ θ = − cos lθ − cos lθ + 11 − cos lθ cos l ′ θ = cos l ′ θ − cos lθ − cos lθ = 0 . (31)Therefore, P r [ M l accepts w ] = 1.Hence, we have proved that the promise problem A l can be recognized exactly by the pvMO-1QFA M l .Obviously, A lyes and A lno are not regular languages. According to Theorem 1, the promise problem A l cannotbe recognized by any pvDFA. Remark 6.
From Theorem 13 it implies that there are three subsets (non-regular languages) that can bedistinguished precisely by a pvMO-1QFA, but any pvDFA cannot do it, and this result further shows astronger aspect of 1QFA than DFA.We will now consider solvability mode. Geffert and Yakaryılmaz [14] proved that the promise problemExpEQ( c ) can be solved by a one-way probability finite automaton (PFA) A ( c ), but there is no DFAsolving ExpEQ( c ). Rashid and Yakaryılmaz [35] proved that a promise problem can be solved by a LasVegas realtime rtQCFA or by an exact rational restarting rtQCFA in linear expected time, where there is ExpEQ( c ) = ( ExpEQ yes ( c ) = { ( a m b n ) c ) m + n ·⌈ ln c ⌉ | m, n ∈ N + , m = n } ExpEQ no ( c ) = { ( a m b n ) c ) m + n ·⌈ ln c ⌉ | m, n ∈ N + , m = n } , where c ≥
16o bounded-error PFA that solves the promise problem. In order to prove that 1QCFA have advantages insolving promise problems comparing to their classical counterparts (PFA), we define a new promise problemPloyEQ = ( PloyEQ yes = { ( a n b m t | n = m and t ≥ T } , PloyEQ no = { ( a n b m t | n = m and t ≥ T } , (32)where T is a polynomial of l = max { n, m } which will be specified later. Theorem 14.
For any ε ≤ , the promise problem PloyEQ can be solved by a 1QCFA with the errorprobability ε , but there is no PFA solving PloyEQ with the error probability ε .Proof. Let θ = √ π . We design a 1QCFA M = ( Q, S, Σ , Θ , ∆ , δ, | q i , s , S a , S r ) to solve the promise problemPloyEQ, where Q = {| i , | i} . The automaton M proceeds as shown in Figure 1, where U | c = U $ = I, U a = cos θ sin θ − sin θ cos θ ! , U b = cos θ − sin θ sin θ cos θ ! . (33)1. Read the left end-marker | c , perform U | c = I on the initial quantum state | i , donot change its classical state, and move the tape head one cell to the right.2. Until the currently scanned symbol σ is the right end-marker $, do the following:2.1 If σ = s , σ ) = U σ to the current quantum state, do not changeits classical state, and move the tape head one cell to the right.2.2 Otherwise, measure the current quantum state with M = {| ih | , | ih |} .If the outcome is | i , reject the input and halt. Otherwise, move the tapehead one cell to the right.3. Accept the input and halt. Figure 1: The 1QCFA solving the promise problem PloyEQ.
Let us choose T = ⌈ l log e ε ⌉ . If the input w ∈ PloyEQ yes , then the quantum state before the measure-ment in the Step 2.2 is always | i . Therefore, the input will be accepted with certainty.If the input w ∈ PloyEQ no , the quantum state before the i -th measurement in the Step 2.2 is | q i = U na U mb = cos θ sin θ − sin θ cos θ ! n cos θ − sin θ sin θ cos θ ! m (34)= cos( m − n ) θ − sin( m − n ) θ sin( m − n ) θ cos( m − n ) θ ! . (35)According to [1, 41], the rejecting probability after the i -th measurement is P ir > m − n ) + 1 > l . (36)and the overall probability that M rejects the input w is P r [ M rejects w ] = t X i ≥ P ir i − Y i =1 (1 − P r ( i − ) ! > t X i ≥ l i − Y i =1 (1 − l ) ! (37)= t X i ≥ l (1 − l ) i − = 12 l − (1 − l ) t l = 1 − (1 − l ) t . (38)17ince 1 − x ≤ e − x , we have P r [ M rejects w ] > − (1 − l ) t > − e − l t ≥ − e − l l log e ε = 1 − e − log e ε = 1 − ε. (39)Therefore, the promise problem PloyEQ can be solved by a 1QCFA M with the error probability ε .Assume now that there is a PFA A solving PloyEQ with the error probability ε . Let us consider a 2PFA M running as follows:1. M reads the input w from the left to the right – symbol by symbol;2. After reading each σ ∈ { a, b, } , M simulates the transformation of the PFA A reading σ ;3. When M reaches the right-end marker, M moves its tape head to the left most symbol of the input w and reads the input w again.If M reads the input w T times, then we have, according to the above assumption, P r [ M accepts a n b n P r [ A accepts a n b n ≥ − ǫ (40)and P r [ M accepts a n b m P r [ A accepts a n b m ≤ − P r [ A rejects a n b m ≤ ǫ (41)where n = m .Therefore, for any integers n and d >
0, it holds (cid:12)(cid:12)
P r [ M accepts a n b n − P r [ M accepts a n b n + d (cid:12)(cid:12) ≥ − ǫ ≥ ǫ. (42)Since T is a polynomial of the length of the input w , the following lemma holds (as in [10, 13]): Lemma 4.
Let ε ≤ . Suppose that M is a two-way probabilistic finite automaton (2PFA) with exp ( o ( | w | )) expected running time, where | w | is the length of the input. Then there exists, for all sufficiently large n , aninteger d such that (cid:12)(cid:12) P r [ M accepts a n b n − P r [ M accepts a n b n + d (cid:12)(cid:12) < ǫ. (43)Obviously, Equality (42) contradicts Equality(43). Therefore, there is no PFA solving PloyEQ with theerror probability ε .We now study state complexity. We consider the following promise problem A ( p ) = ( A yes ( p ) = { a ip + l | ≤ l < p, cos l θ ≥ / , i ≥ } ,A no ( p ) = { a ip + l | ≤ l < p, cos l θ ≤ / , i ≥ } , (44)where θ = π/p . Theorem 15.
For integer p ≥ , the promise problems A ( p ) can be solved with error probability ǫ ≤ / by an MO-1QFA with two quantum basis states, but can not be solved exactly by any MO-1QFA with twoquantum basis states.Proof. We will now construct an MO-1QFA M ( p ) = ( Q, { a } , { U σ | σ ∈ {| c, a, $ }} , | i , Q a ) to solve A ( p ),where • Q = {| i , | i} , Q a = {| i} . 18 U σ are defined as follows: U | c = U $ = I, U a = cos θ − sin θ sin θ cos θ ! . (45)If input w ∈ A yes ( p ), then the quantum state before the measurement is | q i = U $ U w U | c | i = U $ ( U a ) ip + l U | c | i = ( U a ) l | i = cos l θ | i + sin l θ | i . (46)The automaton M has the accepting probability P r [ M accepts w ] = cos l θ ≥ / . (47)If input w ∈ A no ( p ), then the quantum state before the measurement is | q i = U $ U w U | c | i = U $ ( U a ) ip + l U | c | i = ( U a ) l | i = cos l θ | i + sin l θ | i . (48)The automaton M has the rejecting probability P r [ M rejects w ] = 1 − P r [ M accepts w ] = 1 − cos l θ ≥ − / / . (49)Therefore, A ( p ) can be solved by the automaton M with error probability 1 / A ( p ) can be solved exactly by an MO-1QFA M ′ with two basis states.Without loss of generality, we assume that M ′ = ( Q, { a } , { U σ | σ ∈ {| c, a, $ }} , | i , Q a ), where Q = {| i , | i} and Q a = {| i} .Since p ≥
6, we have a p ∈ A yes ( p ) and a p +1 ∈ A yes ( p ). Since the probability that M ′ accepts a p is 1,we have U $ ( U a ) p U | c | i = α | i , (50)where α ∈ C and | α | = 1. Therefore, ( U a ) p U | c | i = αU † $ | i , where U † is conjugate and transpose of U . Sincethe probability that M ′ accepts a p +1 is also 1, we have also U $ ( U a ) p +1 U | c | i = α ′ | i , (51)where α ′ ∈ C and | α ′ | = 1. Therefore, we have U $ U a ( U a ) p U | c | i = U $ U a · αU † $ | i = α ′ | i , (52) ⇒ U $ U a U † $ | i = α ′ α | i . (53)It is easy to find out that U $ U a U † $ = β β ! = Λ , (54)where β = α ′ α and β ∈ C with | β | = 1. It is easy to see that | β | = 1. Therefore, we have U a = U † $ Λ U $ .Now for any integer k ≥
0, we have U $ ( U a ) p + k U | c | i = U $ ( U a ) k ( U a ) p U | c | i = U $ ( U † $ Λ U $ ) k · αU † $ | i = α Λ k | i = αβ k | i . (55)Obviously, | αβ k | = 1. Therefore, for any k ≥
0, the automaton accepts the input a p + k with probability1. If k = ⌈ p/ ⌉ , it is easy to check that cos kθ ≤ / a p + k ∈ A no ( p ). Thus, we get a contradiction.Therefore, the promise problems A ( p ) can not be solved exactly by any MO-1QFA with two quantum basisstates. 19 emark 7. In the previous theorem, the error probability ε = 1 /
3. For p ≥ π arccos √ − ε , using the samemethod as the previous theorem, we can prove that the following promise problem A ( p, ε ) = ( A yes ( p, ε ) = { a ip + l | ≤ l < p, cos l θ ≥ − ε, i ≥ } ,A no ( p, ε ) = { a ip + l | ≤ l < p, cos l θ ≤ ε, i ≥ } , (56)where θ = p/π , can be solved with error probability ε by an MO-1QFA with two quantum basis states, butcan not be solved exactly by any MO-1QFA with two quantum basis states.We consider now the minimal PFA to solve the promise problem A ( p ) with p is prime. Theorem 16.
For any prime p > , the minimal PFA solving the promise problem A ( p ) with error proba-bility (smaller than / ) has p states.Proof. We consider now a p -state DFA A = ( S, { a } , δ, s , S a ), with the set of states S = { s , s , . . . , s p − } ,the set of accepting states S a = { s l | ≤ l < p, cos l θ ≥ / } , and the transition function δ ( s i , a ) = s ( i +1) mod p . Obviously, the promise problem A ( p ) can be solved by the automaton A . A DFA is also aPFA. Therefore, there is a PFA with p states solving the promise problem A ( p ). The minimal PFA thatsolving the promise problem A ( p ) has not more than p states.Since p >
6, there must be fix integers r , r such that cos r θ ≥ / r θ ≤ /
3. We considerthe following promise problem [18]. Namely, A N,r ,r = ( A N,r yes , A N,r no ) with A N,r yes = { a n | n ≡ r mod N } and A N,r no = { a n | n ≡ r mod N } , where N , r and r are fixed positive integers such that r r mod N .Let N = p and l = ( r − r ) mod p . According to Subsection 3.3, we have A p,r ,r ≤ A ( p ). Any PFAthat solving the promise problem A ( p ) can also solve the promise problem A p,r ,r . According to [8] (seeTheorem 4), the minimal PFA solving the promise A p,r ,r with error probability has d states, where d is thesmallest positive integer such that d | p and d ∤ l . Since p is prime, we have d = p . Therefore, the minimalPFA that solving the promise problem A ( p ) has at least p states. Thus, the theorem has been proved.
6. Conclusions and problems
In order to make clear the difference between recognizability and solvability of quantum and classicalfinite automata, we have introduced several promise versions finite automata and discussed their properties.We have explored some basic properties of promise problems recognized and solved by pvDFA, and we haveshowed the state complexity for several promise problems concerning recognizability and solvability. Inparticular, we have proved that one-way quantum finite automata can be more powerful than their classicalcounterparts when recognizing and solving some promise problems. More specifically, we have proved: • There is a promise problem that can be recognized exactly by measure-once one-way quantum finiteautomata (MO-1QFA), but no deterministic finite automata (DFA) can recognize it. Indeed, this resultimplies that there are three subsets (non-regular languages) that can be distinguished precisely by apvMO-1QFA, but any pvDFA cannot do it. • There is a promise problem that can be solved with error probability ǫ ≤ / one-way finiteautomaton with quantum and classical states (1QCFA), but no one-way probability finite automaton (PFA) can solve it with error probability ǫ ≤ / Especially, there are promise problems A ( p ) with size p that can be solved with any error probability byMO-1QFA with only two quantum basis states, but they can not be solved exactly by any MO-1QFAwith two quantum basis states; in contrast, the minimal one-way probability finite automaton (PFA)solving A ( p ) with any error probability (usually smaller than 1 /
2) has p states.However, there are still some problems to be considered for future research, and we list them in thefollowing.1. First we concern a problem related to recognizability : Suppose that a promise problem A can berecognized by a quantum (or probabilistic) finite automaton with error probability ǫ < /
2. Then,for any ǫ ′ < ǫ , whether is there a quantum (or probabilistic) finite automaton recognizing A witherror probability ǫ ′ ? For solvability, this problem can be verified positively by using the idea of thelanguages accepted by PFA with bounded error (e.g., [28]).2. Second is a hierarchic problem for the classes solved by quantum finite automata mentioned in Section1. Namely, let C ( P ) n denote the class of promise problems solved exactly by an MO-1QFA with n quantum basis states. Then, whether does C ( P ) m ⊂ C ( P ) n hold for m ≤ n ?3. For any given regular language L , there is, according to the Myhill-Nerode theorem, a method to findout a minimal DFA A to recognize L [40] . For some specific promise problems, it is possible to findout minimal DFA (pvDFA) to solve the promise problems [4, 8, 14, 18]. However it is not clear yetwhether there is a general way to find out a minimal pvDFA to solve a given promise problem thatcan be solved by a pvDFA?4. We have proved that for any ε ≤ , the promise problem PloyEQ can be solved by a 1QCFA withthe error probability ε , but there is no PFA solving PloyEQ with the error probability ε (Theorem14). However, whether is there no PFA solving PloyEQ with the error probability 1 / < ε < / Acknowledgements
This work was partly supported by the National Natural Science Foundation of China (Nos. 61272058,61472452, 61572532).
Appendix. The proof of Theorem 11
Proof.
Let A yes = { ( a p ) ∗ } and A no = { ( a q ) ∗ a } , where p, q > p, q ) = 2. We firstprove that A yes ∩ A no = ∅ . Since gcd( p, q ) = 2, there exist integers k and k such that p = 2 k and q = 2 k .Assume that A yes ∩ A no = ∅ . There must exist integers i and j such that ( a p ) i = ( a q ) j a , i.e. ip = jq + 1.We have 1 = ip − jq = i k − j k = 2( ik − jk ), which is a contradiction. Therefore, A yes ∩ A no = ∅ .Let us consider now the promise problem A = ( A yes , A no ). Since A yes and A no are regular lan-guages, the promise problem A can be recognized by a pvDFA. Let us consider the following pvDFA A = ( S, { a } , δ, s , S a , S r ), where • S = {h s k mod p , s k mod q i | k ≥ } ; 21 s = h s , s i ; • δ ( h s i , s j i , a ) = h s i +1 mod p , s j +1 mod q i ; • S a = {h s k mod p , s k mod q i | k ≡ mod p } and S r = {h s k mod p , s k mod q i | k ≡ mod q } .At first, we prove that | S | = pq . Let us assume that there exist 0 ≤ k < k < pq − h s k mod p , s k mod q i = h s k mod p , s k mod q i . This implies k ≡ k mod p and k ≡ k mod q . Therefore, p | ( k − k ) and q | ( k − k ). Since gcd( p, q ) = 2, we have pq | ( k − k ), which is a contradiction. Hence, | S | ≥ pq . For any h ≥ pq , let h = i × pq + k where 0 ≤ k < pq . Since p | pq and q | pq , we have h s h mod p , s h mod q i = h s k mod p , s k mod q i . Therefore | S | = pq .Secondly, we prove that S a ∩ S r = ∅ . Since gcd( p, q ) = 2, we have 2 | p and 2 | q . Assume that S a ∩ S r = ∅ .In such a case, there must exist integers i and j such that k = ip and k = jq + 1. Therefore, we have ip = jq + 1 and 2 | ( ip − jq ) = 1, which is a contradiction.Moreover, it is easy to see that the promise problem A can be recognized by the pvDFA A . Therefore, sr ( A ) ≤ | S | = pq .Finally, we prove that the pvDFA A = ( S, { a } , δ, s , S a , S r ) is minimal. Let us consider DFA A ′ =( S, { a } , δ, s , S a ∪ S r ). Obviously, the DFA A ′ recognizes the language A yes ∪ A no . We prove now that theDFA A ′ is minimal. Let F = S a ∪ S r and n = pq . For any 0 ≤ i < j < n , we prove that the states s i = h s i mod p , s i mod q i and s j = h s j mod p , s j mod q i are distinguishable. Since s i = s j , at most one ofthe following two conditions (1) j − i ≡ p and (2) j − i ≡ q holds. We have therefore thefollowing three cases to consider:1. The condition (1) holds and (2) does not hold. In such a case we have b δ ( s i , a n − i +1 ) = h s n +1 mod p ,s n +1 mod q i = h s , s i ∈ F and b δ ( s j , a n − i +1 ) = h s j + n − i +1 mod p , s j + n − i +1 mod q i = h s , s j − i +1 mod q i .Since j − i mod q , we have j − i + 1 mod q . Therefore, b δ ( s j , a n − i +1 ) F . Hence s i and s j are distinguishable.2. The condition (2) holds and (1) does not hold. The proof is similar to the one in the case 1.3. Neither the condition (1) nor (2) holds. In such a case we have b δ ( s i , a n − i ) = h s n mod p , s n mod q i = h s , s i ∈ F and b δ ( s j , a n − i ) = h s n + j − i mod p , s n + j − i mod q i = h s j − i mod p , s j − i mod q i . If b δ ( s j , a n − i ) F , then s i and s j are distinguishable. Otherwise, we have j − i ≡ mod q since j − i mod p .There are now two subcases to consider.(a) j − i ≡ mod p . We have p | ( j − i −
1) and q | ( j − i − p, q ) = 2 and 0 ≤ i < j < n = pq ,we have j − i − j = i + 1. Therefore, b δ ( s i , a n − i +1 ) = h s n +1 mod p , s n +1 mod q i = h s , s i ∈ F and b δ ( s j , a n − i +1 ) = b δ ( s i +1 , a n − i +1 ) = h s n +2 mod p , s n +2 mod q i = h s , s i 6∈ F .Hence, s i and s j are distinguishable.(b) j − i mod p . We have b δ ( s j , a n − j +1 ) = h s n +1 mod p , s n +1 mod q i = h s , s i ∈ F and b δ ( s i , a n − j +1 ) = h s n − j +1+ i mod p , s n − j +1+ i mod q i = h s − j +1+ i mod p , s − j +1+ i mod q i . Since j − i mod p , we have − j + 1 + i mod p . Since i j mod q , we have ( − j + 1 + i ) mod q .Therefore, b δ ( s i , a n − j +1 ) F . We have again that s i and s j are distinguishable.We have therefore shown that the DFA A ′ is minimal and has pq states. Let us assume that there is apvDFA B with less than pq states recognizing the promise problem A . We can then get a DFA with lessthan pq states recognizing the language A yes ∪ A no . This would implies that the DFA A ′ is not minimal.A contradiction.Obviously, s ( A yes ) = p and s ( A no ) = q . Therefore, we have proved that sr ( A ) = pq = s ( A yes ) s ( A no ).22 eferences [1] A. Ambainis, J. Watrous, Two-way finite automata with quantum and classical states, Theoretical Computer Science (2002) 299–311.[2] A. Ambainis, R. Freivalds, One-way quantum finite automata: strengths, weaknesses and generalizations, in Proceed-ings of the 39th FOCS (1998) 332–341.[3] A. Ambainis, N. Nahimovs, Improved constructions of quantum automata, Theoretical Computer Science (2009)1916–1922.[4] A. Ambainis, A. Yakaryılmaz, Superiority of exact quantum automata for promise problems, Information ProcessingLetters (2012) 289–291.[5] A. Bertoni, C. Mereghetti and B. Palano, Golomb rulers and difference sets for succinct quantum automata, Interna-tional Journal of Foundations of Computer Science (2003) 871–888.[6] A. Bertoni, C. Mereghetti and B. Palano, Small size quantum automata recognizing some regular languages, Theo-retical Computer Science (2005) 394–407.[7] A. Bertoni, C. Mereghetti and B. Palano, Some formal tools for analyzing quantum automata, Theoretical ComputerScience (2006) 14–25.[8] M.P. Bianchi, C. Mereghetti and B. Palano, Complexity of Promise Problems on Classical and Quantum Automata,Gruska Festschrift, LNCS (2014) 161–175.[9] F. Bonchi, M.M. Bonsangue, H.H. Hansen, P. Panangaden, J.J.M.M. Rutten, A. Silva, Algebra-coalgebra duality inBrzozowski’s minimization algorithm, ACM Transactions on Computational Logic (2014), Article No. 3.[10] C. Dwork, L. Stockmeyer, Finite state verifiers I: The power of interaction, J. ACM (4) (1992) 800–828.[11] S. Even, A.L. Selman and Y. Yacobi, The Complexity of Promise Problems with Applications to Public-Key Cryp-tography, Information and Control (1984) 159–173.[12] R. Freivalds, M. Ozols and L. Mancinska, Improved constructions of mixed state quantum automata, TheoreticalComputer Science (2009) 1923–1931.[13] A.G. Greenberg, A. Weiss, A lower bound for probabilistic algorithms for finite state machines, Journal of Computerand System Sciences (1986) 88–105.[14] V. Geffert, A. Yakaryılmaz, Classical automata on promise problems, In DCFS’14, LNCS (2014) 126–137. AlsoarXiv:1405.6671.[15] O. Goldreich, On promise problems: A survey, Shimon Even Festschrift, LNCS (2006) 254–290.[16] J. Gruska, Quantum Computing, McGraw-Hill, London (1999).[17] J. Gruska, D.W. Qiu, S.G. Zheng, Generalizations of the distributed Deutsch-Jozsa promise problem, Mathemat-ical Structures in Computer Science, DOI:http://dx.doi.org/10.1017/S0960129515000158, 21 pages (2015). AlsoarXiv:1402.7254.[18] J. Gruska, D.W. Qiu, S.G. Zheng, Potential of quantum finite automata with exact acceptance, International Journalof Foundation of Computer Science (2015) 381–398. Also arXiv:1404.1689.[19] J.E. Hopcroft, J.D. Ullman, Introduction to Automata Theory, Languages, and Computation, Addision-Wesley, NewYork (1979).[20] M. Hirvensalo, Quantum automata with open time evolution, Int. J. Nat. Comput. Res. (2010) 70–85.[21] A. Kondacs, J. Watrous, On the power of quantum finite state automata, in Proceedings of the 38th FOCS (1997)66–75.[22] L.Z. Li, D.W. Qiu, X.F. Zou, L.J. Li, L.H. Wu and P. Mateus, Characterizations of one-way general quantum finiteautomata, Theoretical Computer Science (2012) 73–91.[23] L. Z. Li, D. W. Qiu, Determining the equivalence for one-way quantum finite automata, Theoretical Computer Science (2008) 42-51.[24] L.Z. Li, Y. Feng, On hybrid models of quantum finite automata, Journal of Computer and System Science (2015)1144–1158. Also arXiv:1206.2131.[25] C. Moore, J.P. Crutchfield, Quantum automata and quantum grammars, Theoretical Computer Science (2000)275–306.[26] M.A. Nielsen, I.L. Chuang, Quantum Computation and Quantum Information, Cambridge University Press, Cam-bridge (2000).[27] P. Mateus, D.W. Qiu, L.Z. Li, On the complexity of minimizing probabilistic and quantum automata,Informationand Computation (2012) 36-53.[28] A. Paz, Introduction to Probabilistic Automata, Academic Press, New York (1971).
29] D.W. Qiu, Characterization of quantum sequential machines, International Journal of Theoretical Physics (5)(2002) 811-822.[30] D.W. Qiu, M.S. Ying, Characterizations of Quantum Automata, Theoretical Computer Science (2-3) (2004)479-489.[31] D.W. Qiu, S. Yu, Hierarchy and equivalence of multi-letter quantum finite automata, Theoretical Computer Science (30-32) (2009) 3006-3017.[32] D.W. Qiu, L.Z. Li, X. Zou, P. Mateus, J. Gruska, Multi-letter quantum finite automata: decidability of the equivalenceand minimization of states, Acta Informatica (2011) 271-290.[33] D.W. Qiu, L.Z. Li, P. Mateus, J. Gruska, Quantum finite automata, in: Finite State Based Models and Applications(Edited by Jiacun Wang), CRC Handbook, 2012, pp. 113-144.[34] D.W. Qiu, L. Li, P. Mateus, A. Sernadas, Exponentially more concise quantum recognition of non-RMM languages,Journal of Computer and System Sciences (2) (2015) 359-375.[35] J. Rashid, A. Yakaryılmaz, Implications of quantum automata for contextuality, In CIAA’14, LNCS (2014)318–331. Also arXiv:1404.2761.[36] P.W. Shor, Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer, SIAMJournal on Computing (1997) 1484–1509. Earlier version in FOCS’94.[37] D. Simon , On the power of quantum computation, SIAM Journal on Computing, (1997) 1474–1483. Earlier versionin FOCS’94.[38] J. Watrous, Quantum computational complexity, R.A. Meyers, Editor, Encyclopedia of Complexity and SystemsScience, Springer, 2009, pp. 7174–7201.[39] A. Yakaryılmaz, A.C. Cem Say, Succinctness of two-way probabilistic and quantum finite automata, Discrete Math-ematics and Theoretical Computer Science (2010) 19–40.[40] S. Yu, Regular Languages, In: G. Rozenberg, A. Salomaa (Eds.), Handbook of Formal Languages, Springer-Verlag,Berlin, 1998, pp. 41–110.[41] S.G. Zheng, D.W. Qiu, J. Gruska, L.Z. Li and P. Mateus, State succinctness of two-way finite automata with quantumand classical states, Theoretical Computer Science (2013) 98–112.[42] S.G. Zheng, D.W. Qiu, J. Gruska, Power of the interactive proof systems with verifiers modeled by semi-quantumtwo-way finite automata, Information and Computation, (2015) 197-214.[43] S.G. Zheng, D.W. Qiu, L.Z. Li and J. Gruska, One-way finite automata with quantum and classical states, DassowFestschrift, LNCS (2012) 273–290.[44] S.G. Zheng, J. Gruska and D.W. Qiu, On the state complexity of semi-quantum finite automata, RAIRO-TheoreticalInformatics and Applications (2014) 187–207. Earlier version in LATA’14.[45] S.G. Zheng, D.W. Qiu, From quantum query complexity to state complexity, Gruska Festschrift, LNCS (2014)231–245. Also arXiv:1407.7342.(2014)231–245. Also arXiv:1407.7342.