Acceptance Ambiguity for Quantum Automata
AAcceptance Ambiguity for Quantum Automata
Paul C. Bell
Department of Computer Science, Byrom Street, Liverpool John Moores University, Liverpool,L3-3AF, [email protected]
Mika Hirvensalo
Department of Mathematics and Statistics, University of Turku, FIN-20014 Turku, Finlandmikhirve@utu.fi
Abstract
We consider notions of freeness and ambiguity for the acceptance probability of Moore-CrutchfieldMeasure Once Quantum Finite Automata (MO-QFA). We study the distribution of acceptanceprobabilities of such MO-QFA, which is partly motivated by similar freeness problems for matrixsemigroups and other computational models. We show that determining if the acceptance probabilitiesof all possible input words are unique is undecidable for 32 state MO-QFA, even when all unitarymatrices and the projection matrix are rational and the initial configuration is defined over realalgebraic numbers. We utilize properties of the skew field of quaternions, free rotation groups,representations of tuples of rationals as a linear sum of radicals and a reduction of the mixedmodification Post’s correspondence problem.
Theory of computation → Quantum computation theory
Keywords and phrases
Quantum finite automata; matrix freeness; undecidability; Post’s corres-pondence problem, quaternions.
Digital Object Identifier
Funding
Mika Hirvensalo : Supported by Väisälä Foundation
Measure-Once Quantum Finite Automata (MO-QFA) were introduced in [25] as a naturalquantum variant of probabilistic finite automata. The model is defined formally in Section 3,but briefly a MO-QFA over an alphabet Σ is defined by a three tuple Q = ( P, { X a | a ∈ Σ } , u )where P is a projection matrix, X a is a complex unitary matrix for each alphabet letter a ∈ Σ and u is a unit length vector with respect to the Euclidean ( ‘ ) norm. Given an inputword w = w · · · w k ∈ Σ ∗ , then the acceptance probability f Q : Σ ∗ → R of w under Q isgiven by f Q ( w ) = || P X w k · · · X w u || . The related model of Probabilistic Finite Automata (PFA) with n states over an alphabetΣ is defined as P = ( x , { M a | a ∈ Σ } , y ) where y ∈ R n is the initial probability distribution(unit length under ‘ norm); x ∈ { , } n is the final state vector and each M a ∈ R n × n is astochastic matrix. For a word w = w w · · · w k ∈ Σ ∗ , we define the acceptance probability f P : Σ ∗ → R of P as: f P ( w ) = x T M w k M w k − · · · M w y . For any λ ∈ [0 ,
1] and automaton A (either PFA or QFA) over alphabet Σ, we define acut-point language to be: L ≥ λ ( A ) = { w ∈ Σ ∗ | f A ( w ) ≥ λ } , and a strict cut-point language L >λ ( A ) by replacing ≥ with > . The (strict) emptiness problem for a cut-point language isto determine if L ≥ λ ( A ) = ∅ (resp. L >λ ( A ) = ∅ ).The MO-QFA model is very restricted due to unitarity constraints and can recognizeonly group languages (those regular languages whose syntactic monoid is a group [10]). © Paul C. Bell, M. Hirvensalo;licensed under Creative Commons License CC-BYLeibniz International Proceedings in InformaticsSchloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl Publishing, Germany a r X i v : . [ c s . F L ] J u l X:2 Acceptance Ambiguity for Quantum Automata
Whereas the emptiness question for a strict cut-point stochastic languages is undecidable,it surprisingly becomes decidable for MO-QFA [9]. The decidability is established via thecompactness of the group generated by unitary matrices: a compact algebraic group hasa finite polynomial basis, and the decision procedure is then based on Tarski’s quantifierelimination theorem [9].Another surprising undecidability result was already manifested in [9]: The emptinessproblem for non-strict (allowing equality) cut-point languages is undecidable. The sizesof the automata exhibiting undecidability were subsequently improved in [18]. As theaforementioned examples illuminate, the border between decidability and undecidability maybe crossed with a minor modification to the model or premises.Underlying each linear automata model are matrices, which represent the dynamics of thecomputational model as input symbols are read. For deterministic/nondeterministic finiteautomata, the underlying matrices are binary matrices; for weighted automata, the matricesare integer; for probabilistic automata the matrices are stochastic (the set of columns of eachmatrix should be a probability distribution); and for quantum finite automata, the matricesare unitary (the set of columns of each matrix should be orthonormal).Reachability problems for matrix semigroups have attracted a great deal of attentionover the past few years. Typically in such problems we are given a finite set of generatingmatrices G forming a semigroup S = hGi and we ask some question about S . As an example,it was shown even back in 1970 by M. Paterson that the mortality problem for integer matrixsemigroups is undecidable in dimension three [26]. In this problem, G ⊆ Z × and we askwhether the zero matrix belongs to S = hGi . It was later shown that the similar identityproblem (does the identity matrix belong to the semigroup generated by a given set ofgenerating matrices) is also undecidable for four-dimensional integral matrices [5].A related problem is the freeness problem for integer matrices — given a set G ⊆ F n × n ,where F is a semiring, determine if G is a code for the semigroup generated by G (i.e., if everyelement of hGi has a unique factorization over elements of G ). It was proven by Klarner et al.that the freeness problem is undecidable over N × in [21] and this result was improved byCassaigne et al. to hold even for upper-triangular matrices over N × in [11].There are many open problems related to freeness in 2 × H × is undecidable [4], where H is the skew-fieldof quaternions (in fact the result even holds when all entries of the quaternions are rationals).The freeness problem for two upper-triangular 2 × bounded language was recentlystudied. Given a finite set of matrices { M , . . . , M k } ⊆ Q n × n , we define a bounded languageof matrices to be of the form: { M j · · · M j k k | j i ≥ ≤ i ≤ k } .The freeness problem for such a bounded language of matrices asks if there exists a choiceof these variables such that j , . . . , j k , j , . . . , j k ≥
0, where at least one j i = j i such that M j · · · M j k k = M j · · · M j k k in which case the bounded language of matrices is not free. Thisproblem was shown to be decidable when n = 2, but undecidable in general [14].In a similar vein, we may study the vector freeness and ambiguity problems, where weare given a finite set of matrices G ⊆ F n × n and a vector u ∈ F n . The ambiguity problem is to determine whether there exists two matrices M , M ∈ S = hGi with M = M suchthat M u = M u and the freeness problem is to determine the uniqueness of factorizationsof { M u | M ∈ S} i.e., does M i · · · M i k u = M j · · · M j k u , where each M t ∈ G , imply that k = k and M i r = M j r for 1 ≤ r ≤ k ? It should be noted that these (related but distinct)problems are more difficult to solve than freeness for matrix semigroups, since by multiplying . C. Bell and M. Hirvensalo XX:3 matrix M and M with u , some information may be lost. The motivation for such a problemis that many linear dynamic systems/computational models are defined in this way. Thefreeness question now asks whether starting from some initial point, we have two separatecomputational paths which coincide at some later point, or else whether every configurationstarting from u is unique. Such vector ambiguity and freeness questions were studied in [3]and the problems were shown to be undecidable when S ⊆ Z × , or when S ⊆ Q × . TheNP-completeness of the vector ambiguity and freeness problems for SL(2 , Z ) was recentlyshown in [22] (where SL(2 , Z ) is the special linear group of 2 × scalar reachability (also known as half-space reachability [16]),which may be defined in terms of two vectors, u and v , where we now study the set ofscalars { u T M v | M ∈ S} . The scalar ambiguity question then asks whether or not this setof scalars is unique i.e., does there exist two matrices M , M ∈ S with M = M suchthat u T M v = u T M v ? The difficulty with extending the undecidability result for vectorreachability is that all information about each matrix M needs to be stored within a singlescalar value u T M v in a unique way.In [1], the freeness problem (defined formally in Section 3.1) for 4-state weighted and6-state probabilistic automata was shown to be undecidable together with results concerningthe related ambiguity problem. The undecidability result was shown to hold even whenthe input words come from a bounded language, thus the matrices appear in some fixedorder, and are taken to an arbitrary power. The problem can also be stated in terms of formal power series : given a formal power series r , determine if r has two equal coefficients.This problem was studied in [23] and Theorem 3.4 of [19]. As mentioned above, severalreachability problems for PFA (such as emptiness of cut-point languages) are known to be undecidable [27], even in a fixed dimension [8, 18]. The reachability problem for PFA definedon a bounded language (i.e., where input words are from a bounded language which is givenas part of the input) was shown to be undecidable in [2]. We may note that the scalarfreeness and ambiguity problems are a similar concept to the threshold isolation problem which asks whether a given cutpoint may be approached arbitrarily closely and which isknown to be undecidable [6, 8].It is therefore natural to ask whether the freeness and ambiguity problems are undecidablefor MO-QFA. This problem appears more difficult to prove than for weighted/probabilisticautomata, since the acceptance probability of a MO-QFA Q has the form f Q ( w ) = (cid:12)(cid:12)(cid:12)(cid:12) P X R u (cid:12)(cid:12)(cid:12)(cid:12) and it is thus difficult to encode sufficient information about the matrix X within f Q ( w )to guarantee uniqueness of matrices from G . We show that freeness and ambiguity areundecidable for 32 (resp. 33) state MO-QFA by using an encoding of the mixed modificationPost’s Correspondence Problem and a result related to linear independence of rationals ofa basis of squarefree radicals as well as techniques from linear algebra and properties ofquaternions. Let Σ = { x , x , . . . , x k } be a finite set of letters called an alphabet . A word w is a finitesequence of letters from Σ, the set of all words over Σ is denoted Σ ∗ and the set of nonemptywords is denoted Σ + . The empty word is denoted by ε . We use | u | to denote the length X:4 Acceptance Ambiguity for Quantum Automata of a word u and thus | ε | = 0. For two words u = u u · · · u i and v = v v · · · v j , where u, v ∈ Σ ∗ , the concatenation of u and v is denoted by u · v (or by uv for brevity) such that u · v = u u · · · u i v v · · · v j . Word u R = u i · · · u u denotes the mirror image or reverse ofword u . A subset L of Σ ∗ is called a language . A language L ⊆ Σ ∗ is called a boundedlanguage if and only if there exist words w , w , . . . , w m ∈ A + such that L ⊆ w ∗ w ∗ · · · w ∗ m .Given an alphabet Σ as above, we denote by Σ − the set { x − , . . . , x − k } , where each x − i isa new letter with the property that x i x − i = x − i x i = ε are the only identities of the group h Σ ∪ Σ − i . A word w = w w · · · w i ∈ (Σ ∪ Σ − ) ∗ is called reduced if there does not exist1 ≤ j < i such that w j +1 = w − j ; i.e., no two consecutive letters are inverse.Given any two rings R and R we use the notation R , → R to denote a monomorphism i.e., an injective homomorphism between R and R . Given a finite set G , we use the notation hGi (resp. hGi gp ) to denote the semigroup (resp. group) generated by G . Semirings and quaternions
We denote by N the natural numbers, Z the integers, Q the rationals, C the complex numbersand H the quaternions. We denote by C ( Q ) the complex numbers with rational parts, by H ( Q ) the quaternions with rational parts and by A R the real algebraic numbers.Given any semiring F we denote by F i × j the set of i × j matrices over F . We denote by e i the i ’th basis vector of some dimension (which will be clear from the context).In a similar style to complex numbers, a rational quaternion ϑ ∈ H ( Q ) can be written ϑ = a + b i + c j + d k where a, b, c, d ∈ Q . To ease notation let us define the vector: µ = (1 , i , j , k )and it is now clear that ϑ = ( a, b, c, d ) · µ where · denotes the inner or ‘dot’ product.Quaternion addition is simply the componentwise addition of elements. It is well knownthat quaternion multiplication is not commutative (hence they form a skew field). Multiplic-ation is completely defined by the equations i = j = k = − ij = k = − ji , jk = i = − kj and ki = j = − ki . Thus for two quaternions ϑ = ( a , b , c , d ) µ and ϑ = ( a , b , c , d ) µ ,we can define their product as ϑ ϑ = ( a a − b b − c c − d d ) + ( a b + b a + c d − d c ) i + ( a c − b d + c a + d b ) j + ( a d + b c − c b + d a ) k . In a similar way to complex numbers, we define the conjugate of ϑ = ( a, b, c, d ) · µ by ϑ = ( a, − b, − c, − d ) · µ . We can now define a norm on the quaternions by || ϑ || = √ ϑϑ = √ a + b + c + d . Any non zero quaternion has a multiplicative (and obviously an additive)inverse [24]. The other properties of being a skew field can be easily checked.A unit quaternion (norm 1) corresponds to a rotation in three dimensional space [24]. Linear Algebra
Given A = ( a ij ) ∈ F m × m and B ∈ F n × n , we define the direct sum A ⊕ B and Kroneckerproduct A ⊗ B of A and B by: A ⊕ B = (cid:20) A m,n n,m B (cid:21) , A ⊗ B = a B a B · · · a m Ba B a B · · · a m B ... ... . . . ... a m B a m B · · · a mm B , where i,j denotes the zero matrix of dimension i × j . Note that neither ⊕ nor ⊗ arecommutative in general. Given a finite set of matrices G = { G , G , . . . , G m } ⊆ F n × n , hGi isthe semigroup generated by G . We will use the following notations: m M j =1 G j = G ⊕ G ⊕ · · · ⊕ G m , m O j =1 G j = G ⊗ G ⊗ · · · ⊗ G m . . C. Bell and M. Hirvensalo XX:5 Given a single matrix G ∈ F n × n , we inductively define G ⊗ k = G ⊗ G ⊗ ( k − ∈ F n k × n k with G ⊗ = G as the k -fold Kronecker power of G . Similarly, G ⊕ k = G ⊕ G ⊕ ( k − ∈ F n k × n k with G ⊕ = G . The following properties of ⊕ and ⊗ are well known; see [20] for proofs. (cid:73) Lemma 1.
Let
A, B, C, D ∈ F n × n . We note that: ( A ⊗ B ) ⊗ C = A ⊗ ( B ⊗ C ) and ( A ⊕ B ) ⊕ C = A ⊕ ( B ⊕ C ) , thus A ⊗ B ⊗ C and A ⊕ B ⊕ C are unambiguous.Mixed product properties: ( A ⊗ B )( C ⊗ D ) = ( AC ) ⊗ ( BD ) and ( A ⊕ B )( C ⊕ D ) =( AC ) ⊕ ( BD ) .If A and B are unitary matrices, then so are A ⊕ B and A ⊗ B . Given two vectors u ∈ F n and v ∈ F n , we define u ⊕ v ∈ F n + n as u ⊕ v =( u , . . . , u n , v , . . . , v n ). (cid:73) Definition 2.
A measure-once n -state quantum automaton (MO-QFA) over a k -letteralphabet Σ is a triplet ( P, { X a | a ∈ Σ } , u ) , where P ∈ C n × n is a projection, each X a ∈ C n × n is a unitary matrix (where rows form an orthonormal set), and u ∈ C n is a unit-length vector.A morphism Σ ∗ → h X a i is defined as w = a i . . . a i t X w def = X i . . . X i t and the acceptance probability of a MO-QFA Q is defined as f Q ( w ) = || P X w R u || . We use thereverse of the word w , denoted w R , so that w is applied first, then w etc. Consider a finite set of unitary matrices G = { X , X , . . . , X k } ⊂ C n × n , a projection matrix P ∈ Z n × n and a unit column vector u ∈ C n . Let Q = ( P, G , u ) be a QFA and define Λ( Q )be the set of scalars such that Λ( Q ) = {|| P Xu || ; X ∈ hGi} . If for λ ∈ Λ( Q ) there existsa unique matrix X ∈ hGi such that λ = || P Xu || , then we say that λ is unambiguous withrespect to Q . We call Λ( Q ) unambiguous if every λ ∈ Λ( Q ) is unambiguous.An acceptance probability λ ∈ Λ( Q ) is called free with respect to Q if λ = || P X i X i · · · X i m u || = (cid:12)(cid:12)(cid:12)(cid:12) P X j X j · · · X j m u (cid:12)(cid:12)(cid:12)(cid:12) , where each X i k , X j k ∈ G for 1 ≤ k ≤ m and 1 ≤ k ≤ m implies that m = m and each i k = j k for 1 ≤ k ≤ m . We call Λ( Q ) free if every λ ∈ Λ( Q ) is free. (cid:73) Problem 3 (QFA Scalar Ambiguity) . Given a Quantum Finite Automaton Q , is Λ( Q ) unambiguous? (cid:73) Problem 4 (QFA Scalar Freeness ) . Given a Quantum Finite Automaton Q , is Λ( Q ) free? (cid:73) Example 5.
Let A = (cid:18)
35 45 −
45 35 (cid:19) , P = (cid:18) (cid:19) and u = (1 , T . We thus see that Q = ( P, { A } , u ) is a unary 2-state QFA. Note that A represents rotations of the Euclideanplane of angle arccos(3 / f Q ( a k ) = || P A k u || is dense in [0 ,
1] for k ∈ N . Since the angle of rotation of A is an irrational multiple of π , then every acceptanceprobability of Q is unique, and thus Q is both free and unambiguous. We may also call this the injectivity problem for QFA; does there exist two distinct words w , w ∈ Σ ∗ such that f Q ( w ) = f Q ( w )? X:6 Acceptance Ambiguity for Quantum Automata
We show that freeness and ambiguity are undecidable for MO-QFA in Section 5. Thereduction is from the Mixed Modification Post’s Correspondence Problem, now defined. (cid:73)
Problem 6 (Mixed Modification PCP (MMPCP)) . Given set of letters
Σ = { s , . . . , s | Σ | } ,binary alphabet Σ , and pair of homomorphisms h, g : Σ ∗ → Σ ∗ , the MMPCP asks to decidewhether there exists a word w = x · · · x k ∈ Σ + , x i ∈ Σ such that h ( x ) h ( x ) · · · h k ( x k ) = g ( x ) g ( x ) · · · g k ( x k ) , where h i , g i ∈ { h, g } , and there exists at least one j such that h j = g j . (cid:73) Theorem 7. [12] - The Mixed Modification PCP is undecidable for | Σ | ≥ . (cid:73) Definition 8.
We call an instance of the (MM)PCP a
Claus instance if the minimalsolution words are of the form w = s x x · · · x k − s | Σ | , where x , . . . , x k − ∈ Σ − { s , s | Σ | } ,i.e., the minimal solution words must start with letter s , end with letter s | Σ | , and all otherletters are not equal to s or s | Σ | . In fact most proofs of the undecidability of (MM)PCP have this property [17]. Claus instancescan be useful for decreasing the resources required for showing certain undecidability results,and we use this property later. (cid:73)
Theorem 9. [17] - Mixed Modification PCP is undecidable for Claus instances, when | Σ | ≥ . Let Σ n = { x , x , . . . , x n } be an n -letter alphabet for some n >
0. We begin by deriving amonomorphism γ : Σ ∗ n , → Q × such that γ ( w ) is a unitary matrix for any w ∈ Σ ∗ n . Themapping γ will be a composition of several monomorphisms.Given alphabet Σ n = { x , x , . . . , x n } , we now show that there exists a monomorphism γ : Σ ∗ n , → Q × where γ ( w ) is unitary for all w ∈ Σ ∗ n .We first describe a monomorphism γ from an arbitrary sized alphabet to a binaryalphabet. We then show monomorphism γ from a binary alphabet to unit quaternions, andconclude by injectively mapping such quaternions to unitary matrices. γ : Let Σ = { a, b } be a binary alphabet. We define γ : Σ ∗ n , → Σ ∗ by γ ( x k ) = a k b for1 ≤ k ≤ n . It is immediate that γ is injective. γ : Define mapping γ : Σ ∗ , → H ( Q ) by γ ( a ) = (cid:0) , , , (cid:1) · µ and γ ( b ) = (cid:0) , , , (cid:1) · µ .It is known that γ is an injective homomorphism [4] since such quaternions representrotations about perpendicular axes by a rational angle (not equal to 0 , ± , ± γ : Σ ∗ , → H ( Q ) and γ ( w ) = γ ( w ) for w , w ∈ Σ ∗ implies that w = w [28]. γ : Define γ : H ( Q ) , → Q × by: γ (( r, x, y, z ) · µ ) = r x y z − x r z − y − y − z r x − z y − x r . (1)It is well known that γ is a monomorphism in this case. Injectivity is clear, and usingthe rules of quaternion multiplication shows that γ is a homomorphism. The result in [17] states undecidability for | Σ | ≥ . C. Bell and M. Hirvensalo XX:7 We finally define γ = γ ◦ γ ◦ γ and thus by the above reasoning γ : Σ ∗ n , → Q × is aninjective homomorphism. Note that the matrix γ ( w ) for a word w ∈ Σ ∗ n contains quite a lotof redundancy, and in fact can be uniquely described by just four elements (the top row)as is shown by the matrix in Eqn. (1). Of course, these four elements simply correspond tothe four elements of the quaternion used in the construction of γ . Note also that γ ( w ) is aunitary matrix since γ generates a unit quaternion (of norm 1) in each case.Using γ , we can now find matrices A, B ∈ Q × , such that γ ( w ) ∈ h{ A, B }i gp for all w ∈ Σ ∗ ; i.e., the value of γ ( w ) lies within the semigroup generated by { A, B } . This willprove useful later since we may reason about the structure of this freely presented semigroup. (cid:73) Definition 10.
Given Σ = { a, b } , then let: A = γ ( γ ( a )) =
35 45 −
45 35
35 45 −
45 35 , B = γ ( γ ( b )) = − − , and define Γ = h{ A, B }i ⊂ Q × , which is a free semigroup (freely generated by { A, B } ).All elements in the range of γ thus belong to Γ . We define Γ ⊂ Γ by Γ = { γ ( w ) | w ∈ Σ ∗ n } . In order to prove that the ambiguity and freeness problems are undecidable for QFA definedover rationals (with real algebraic initial vector), we require the following (folklore) theorem.This will essentially allow us to uniquely represent a tuple of rationals as a linear sum ofradicals. For completeness, we will show a simple proof of this theorem using the theory offield extensions. (cid:73)
Theorem 11 ([7]) . The (finite) set S = {√ m , . . . , √ m n : m i are coprime square-free numbers } is linearly independent over Q . Proof.
Define E k = Q ( √ m , . . . , √ m k ), so E = Q and E = Q ( √ m ). Clearly [ E : Q ] =1 = 2 , and [ E : Q ] = 2 . As each element √ m i satisfies a quadratic equation over Q , thefield extension degree [ E n : Q ] is at most 2 n . The theorem is proven if we can show that[ E n : Q ] = 2 n .Assume the induction hypothesis true for values less than k . We will prove it true for k + 1, as well, i.e., [ E k +1 : E k ] = 2. For this aim, we must demonstrate that √ m k +1 / ∈ E k ,so let us assume the contrary, that √ m k +1 ∈ E k = E k − ( √ m k ) , hence √ m k +1 = a + b √ m k , where a, b ∈ E k − Then m k +1 = a + m k b + 2 ab √ m k . If ab = 0, then √ m k ∈ E k − , which implies that [ E k : E k − ] = 1, a contradiction.If a = 0, then √ m k +1 = b √ m k , and hence √ m k √ m k +1 = bm k ∈ E k − . By the inductionhypothesis we then have[ Q ( √ m , . . . , √ m k − , √ m k m k +1 ) : Q ] = 2 k , X:8 Acceptance Ambiguity for Quantum Automata but since the last extending element belongs to E k − , the extension degree cannot be morethan 2 k − , a contradiction. Here we actually need the assumption that the numbers arecoprime, since otherwise m k m k +1 would not necessarily be squarefree.If b = 0, then √ m k +1 ∈ E k − , and as above, the induction hypothesis gives[ Q ( √ m , . . . , √ m k − , √ m k +1 ) : Q ] = 2 k , but as the last extending element belongs to E k − , the extension degree cannot be morethan 2 k − , a contradiction. (cid:74) For example, given p , p , q , q ∈ Q , then the equality p √ q √ p √ q √ p = p and q = q .The following technical lemma concerns the free group S generated by G = { γ ( a ) , γ ( b ) } and will crucially allow us to characterise elements of S which differ only in the signs of oneor more of their imaginary components. To define this lemma we require a nonstandardinversion function defined on elements of S = hGi gr . Since S is free, any reduced (i.e., notcontaining consecutive inverses) q w ∈ S can be uniquely written in the form q w = γ ( a ) k γ ( b ) k γ ( a ) k · · · γ ( a ) k n − γ ( b ) k n − γ ( a ) k n , where k , k n ∈ Z and k , . . . , k n − ∈ Z − { } , i.e., an alternating product of either positive ornegative powers of γ ( a ) and γ ( b ) which may start and end with either element. We definethe following three functions:i) λ a ( q w ) = γ ( a ) − k γ ( b ) k γ ( a ) − k · · · γ ( a ) − k n − γ ( b ) k n − γ ( a ) − k n ;ii) λ b ( q w ) = γ ( a ) k γ ( b ) − k γ ( a ) k · · · γ ( a ) k n − γ ( b ) − k n − γ ( a ) k n ;iii) λ a,b ( q w ) = γ ( a ) − k γ ( b ) − k γ ( a ) − k · · · γ ( a ) − k n − γ ( b ) − k n − γ ( a ) − k n .These three functions thus invert all γ ( a ) elements in a product for λ a , all γ ( b ) ele-ments in a product for λ b and both γ ( a ) and γ ( b ) elements in a product for λ a,b . Asan example, if q w = γ ( a ) γ ( b ) γ ( a ) − γ ( b ), then λ a ( q w ) = γ ( a ) − γ ( b ) γ ( a ) γ ( b ), λ b ( q w ) = γ ( a ) γ ( b ) − γ ( a ) − γ ( b ) − and λ a,b ( q w ) = γ ( a ) − γ ( b ) − γ ( a ) γ ( b ) − . Biz-zare as such a definition may appear, it allows us to exactly characterize those elements of S which differ only in the sign of one or more of their imaginary components, as we now show. (cid:73) Lemma 12.
Given a quaternion q w = γ ( w ) = ( r, x, y, z ) · µ ∈ h γ ( a ) , γ ( b ) i gr with w = w w · · · w | w | , each w i ∈ (Σ ∪ Σ − ) and Σ = { a, b } , then:i) q w R = γ ( w R ) = ( r, x, y, − z ) · µ ;ii) λ a ( q w ) = ( r, − x, y, − z ) · µ ;iii) λ b ( q w ) = ( r, x, − y, − z ) · µ ;iv) λ a,b ( q w ) = ( r, − x, − y, z ) · µ . Proof.
We proceed via induction. For the base case, when w = ε , then q w = (1 , , , · µ and q w R = λ a ( q w ) = λ b ( q w ) = λ a,b ( q w ) = (1 , , , · µ and so the properties (trivially) hold.For the induction hypothesis, assume i ) – iv ) are true for q w . We handle each propertyindividually. i) By assumption, q w R = ( r, x, y, − z ) · µ . Since γ ( a ) = (cid:0) , , , (cid:1) · µ and γ ( b ) = (cid:0) , , , (cid:1) · µ ,by the rules of quaternion multiplication, we see that: γ ( a ) · q w = 15 (3 r − x, x + 4 r, y − z, z + 4 y ) · µ,q w R · γ ( a ) = 15 (3 r − x, x + 4 r, y − z, − z − y ) · µ . C. Bell and M. Hirvensalo XX:9 Note that the fourth component is negated as expected. In a similar way, we also see that: γ ( b ) · q w = 15 (3 r − y, x + 4 z, y + 4 r, z − x ) · µ,q w R · γ ( b ) = 15 (3 r − y, x + 4 z, y + 4 r, − z + 4 x ) · µ with negated fourth element. Since γ ( a − ) = (cid:0) , − , , (cid:1) · µ and γ ( b − ) = (cid:0) , , − , (cid:1) · µ ,then the property of the fourth element being negated is also clearly true for γ ( c − ) · q w and q w R · γ ( c − ) for c ∈ { a, b } . The other properties are similar, we give a brief proof of each. ii) By the induction hypothesis, λ a ( q w ) = ( r, − x, y, − z ) · µ and thus: q w · γ ( a ) = 15 (3 r − x, x + 4 r, y + 4 z, z − y ) · µ,λ a ( q w ) · γ ( a ) − = 15 (3 r − x, − x − r, y + 4 z, − z + 4 y ) · µ, with the second and fourth components negated as required. Also, q w · γ ( a ) − = 15 (3 r + 4 x, x − r, y − z, z + 4 y ) · µ,λ a ( q w ) · γ ( a ) = 15 (3 r + 4 x, − x + 4 r, y − z, − z − y ) · µ, as expected. Right multiplication of q w and λ a ( q w ) by either γ ( b ) or γ ( b ) − retains thegiven structure, as is not difficult to calculate. iii) By the induction hypothesis, λ b ( q w ) = ( r, x, − y, − z ) · µ and thus: q w · γ ( b ) = 15 (3 r − y, x − z, y + 4 r, z + 4 x ) · µ,λ b ( q w ) · γ ( b ) − = 15 (3 r − y, x − z, − y − r, − z − x ) · µ, with the third and fourth components negated as required. Also, q w · γ ( b ) − = 15 (3 r + 4 y, x + 4 z, y − r, z − x ) · µ,λ b ( q w ) · γ ( b ) = 15 (3 r + 4 y, x + 4 z, − y + 4 r, − z + 4 x ) · µ, as expected. Right multiplication of q w and λ b ( q w ) by either γ ( a ) or γ ( a ) − retains thegiven structure, as is not difficult to calculate. iv) By the induction hypothesis, λ a,b ( q w ) = ( r, − x, − y, z ) · µ and thus: λ a,b ( q w ) · γ ( a ) = 15 (3 r + 4 x, − x + 4 r, − y + 4 z, z + 4 y ) · µ,λ a,b ( q w ) · γ ( b ) = 15 (3 r + 4 y, − x − z, − y + 4 r, z − x ) · µ,λ a,b ( q w ) · γ ( a ) − = 15 (3 r − x, − x − r, − y − z, z − y ) · µ,λ a,b ( q w ) · γ ( b ) − = 15 (3 r − y, − x + 4 z, − y − r, z + 4 x ) · µ, with the second and third components of each product negated with relation to q w · γ ( a ) − , q w · γ ( b ) − , q w · γ ( a ) and q w · γ ( b ) (resp.) as required. (cid:74) The following lemma allows us to represent a quaternion (and its corresponding rotationmatrix) by using only absolute values and will be crucial later.
X:10 Acceptance Ambiguity for Quantum Automata (cid:73)
Lemma 13.
Given a word w ∈ Σ ∗ k , then γ ( γ ( w )) = ( r, x, y, z ) · µ is uniquely determinedby ( | r | , | x | , | y | , | z | ) . All matrices γ ( w ) ∈ Γ are similarly uniquely determined by ( | γ ( w ) , | , | γ ( w ) , | , | γ ( w ) , | , | γ ( w ) , | ) , i.e., by the absolute values of each element of the top row of the matrix. Proof.
Another way to state this Lemma is that if we have u = u u · · · u t and v = v v · · · v t with each u i , v i ∈ Σ ∗ k , such that γ ( γ ( u )) = ( a , b , c , d ) · µ , γ ( γ ( v )) = ( a , b , c , d ) · µ and ( | a | , | b | , | c | , | d | ) = ( | a | , | b | , | c | , | d | ), then t = t and u i = v i for all 1 ≤ i ≤ t . Asimilar property holds for the top row of the unitary matrices when applying γ to theseelements. We shall now prove this.By definition, γ : Σ ∗ , → H ( Q ) maps to a free monoid S of H ( Q ) generated by G = { γ ( a ) , γ ( b ) } with γ ( a ) = (cid:0) , , , (cid:1) · µ and γ ( b ) = (cid:0) , , , (cid:1) · µ . As shown in Section 4, γ ◦ γ : Σ ∗ n , → H ( Q ); i.e., γ ◦ γ is an injective homomorphism. Let Γ = { γ ( γ ( w )) | w ∈ Σ ∗ n } ⊆ H ( Q ). Clearly then, Γ is freely generated by { γ ( γ ( w )) | w ∈ Σ n } by the injectivityof γ ◦ γ .Let q w = γ ( γ ( w )) = ( r, x, y, z ) · µ ∈ Γ ⊆ S and define Q w = { ( ± r, ± x, ± y, ± z ) · µ } ,thus | Q w | = 16. We will now show that for all q ∈ Q w − { q w } then q Γ which proves thelemma.Since (unit) quaternion inversion simply involves negating all imaginary components,then using the identities of Lemma 12, we can derive that q − w = ( r, − x, − y, − z ), λ a ( q w ) − =( r, x, − y, z ) and λ b ( q w ) − = ( r, − x, y, z ) which we summarize in the following table. q w ( r, x, y, z ) µ q − w ( r, − x, − y, − z ) µλ a ( q w ) ( r, − x, y, − z ) µ λ a ( q w ) − ( r, x, − y, z ) µλ b ( q w ) ( r, x, − y, − z ) µ λ b ( q w ) − ( r, − x, y, z ) µλ a,b ( q w ) ( r, − x, − y, z ) µ q w R ( r, x, y, − z ) µ We might also notice other identites, such as q w R = λ a,b ( q w ) − which is clear from thedefinition of λ a,b . Note that this table covers 8 elements of Q w .Note q w belongs (by definition) to Γ = ( γ ( a ) + γ ( b )) + = { γ ( γ ( w )) | w ∈ Σ n } ⊆ S .Since h γ ( a ) , γ ( b ) i gr generates a free group, this means that no reduced element of S isequal to a product with a nontrivial factor γ ( a ) − or γ ( b ) − . Each element in the abovetable contains at least one nonreducible factor γ ( a ) − or γ ( b ) − , excluding q w and q w R .Note however that q w R trivially does not belong to Γ = ( γ ( a ) + γ ( b )) + since it necessarilybegins with nonreducible factor γ ( b ).Finally, to cover the remaining 8 elements of Q w , we consider the free group S gr = h{ γ ( a ) , γ ( b ) }|∅i gr . For any q w ∈ S gr then − q w
6∈ S gr since S gr is free. This holds since if − q w ∈ S , then − ∈ S (because ( q w ) − ∈ S ), which gives a nontrivial identity − = 1 in S gr (a contradiction).This covers all sixteen possible elements of Q w and shows that q w is the only member of Q w belonging to Γ . By the definition of γ : H ( Q ) , → Q × , then also all matrices γ ( w ) ∈ Γare uniquely determined by ( | γ ( w ) , | , | γ ( w ) , | , | γ ( w ) , | , | γ ( w ) , | ) as required. (cid:74)(cid:73) Theorem 14.
The freeness problem for measure-once quantum finite automata is undecid-able for states over an alphabet of size . Reduced meaning the element contains no consecutive inverse elements and nontrivial meaning weignoring any such element adjacent to its multiplicative inverse. . C. Bell and M. Hirvensalo XX:11
Proof.
We will encode an instance ( h, g ) of the mixed modification Post’s CorrespondenceProblem into a finite set of matrices so that if there exists a solution to the instance thenthere exists some scalar which is nonfree, otherwise every scalar is free.Let Σ = { x , x , . . . , x n − } and ∆ = { x n − , x n } be distinct alphabets and h, g : Σ ∗ → ∆ ∗ be an instance of the mixed modification PCP and let Σ n = Σ ∪ ∆. The naming conventionwill become apparent below, but intuitively we will be applying γ , from Section 4 to boththe input and output alphabets.Recall that we showed the injectivity of γ in Section 4, and thus have a monomorphism γ : Σ ∗ n , → Q × . We define a function ϕ : Σ ∗ n × Σ ∗ n , → Q × by ϕ ( w , w ) = M j =1 γ ( w ) ⊕ M j =1 γ ( w ) . We may note that ϕ ( w , w ) remains a unitary matrix since γ ( w i ) is unitary and the directsum of unitary matrices is unitary. Define G = { ϕ ( x i , h ( x i )) , ϕ ( x i , g ( x i )) | x i ∈ Σ } ⊂ Q × .Let p i denote the i’th prime number and define u i = √ p i · e i ∈ A R , v i = √ p i · e i ∈ A R for 1 ≤ i ≤ A R denotes a 4-tuple of elements from A R ) and u = L j =1 u j ⊕ L j =1 v j ∈ A R .Now, we normalise this vector so that u = u qP i =1 √ p i ∈ A R , with u a unit vector. Notethat each element of u is a real algebraic number. Let P = 1 ⊕ where is the 3 × P has a 1 in the upper left element and zero elsewhere. Then define P = P ⊕ ∈ Q × . Note that P = P and P is a projection matrix.We are now ready to define our QFA Q by the triple Q = ( P, G , u ) and prove the claimof the theorem.Let X = X i · · · X i p = ϕ ( x i , f i ( x i )) · · · ϕ ( x i p , f i p ( x i p )), with f i k ∈ { g, h } for 1 ≤ k ≤ p be one factorization of a matrix X ∈ G . Define x = x i · · · x i p and f ( x ) = f i ( x i ) · · · f i p ( x i p ).Then we see that: || P Xu || = (cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12) L j =1 ( P γ ( x ) u j ) ⊕ L j =1 ( P γ ( f ( x )) v j ) qP i =1 √ p i (cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12) (2)= (cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12) L j =1 ( P γ ( x ) √ p j · e j ) ⊕ L j =1 ( P γ ( f ( x )) √ p j · e j ) qP i =1 √ p i (cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12) (3)= vuuut P j =1 ( γ ( x ) ,j √ p j ) + P j =1 ( γ ( f ( x )) ,j √ p j ) qP i =1 √ p i (4)= P j =1 γ ( x ) ,j √ p j + P j =1 γ ( f ( x )) ,j √ p j qP i =1 √ p i . (5)Assume that matrix X has two distinct factorizations X = X i · · · X i p = X j · · · X j q ∈ G + and p = q or X i k = X j k for some 1 ≤ k ≤ p , such that || P Xu || = (cid:12)(cid:12)(cid:12)(cid:12) P X i · · · X i p u (cid:12)(cid:12)(cid:12)(cid:12) = (cid:12)(cid:12)(cid:12)(cid:12) P X j · · · X j q u (cid:12)(cid:12)(cid:12)(cid:12) , and thus Λ( Q ) is not free. Let X = X j · · · X j q = ϕ ( x j , f j ( x j )) · · · ϕ ( x j q , f j q ( x j q )), with f j k ∈ { g, h } for 1 ≤ k ≤ q and define x = x j · · · x j q and f ( x ) = f j ( x j ) · · · f j q ( x j p ) X:12 Acceptance Ambiguity for Quantum Automata with each f j k ∈ { g, h } . Note that in Eqn. (5) the denominator is constant and thus whendetermining equality (cid:12)(cid:12)(cid:12)(cid:12) P X i · · · X i p u (cid:12)(cid:12)(cid:12)(cid:12) = (cid:12)(cid:12)(cid:12)(cid:12) P X j · · · X j q u (cid:12)(cid:12)(cid:12)(cid:12) we may ignore it. By Lemma 13,each γ ( w ) is uniquely determined by the absolute value of the top four elements of the matrix(e.g. | γ ( w ) ,j | for 1 ≤ j ≤ p j is squarefree, for 1 ≤ j ≤
8, then by Theorem 11,the following equation is satisfied if and only if | γ ( x ) | = | γ ( x ) | and | γ ( f ( x )) | = | γ ( f ( x )) | : X j =1 γ ( x ) ,j √ p j + X j =1 γ ( f ( x )) ,j √ p j = X j =1 γ ( x ) ,j √ p j + X j =1 γ ( f ( x )) ,j √ p j . Finally, note that γ ( x ) = γ ( x ) if and only if x = x . As before, let x = x i · · · x i p , then γ ( f ( x )) = f i ( x i ) · · · f i p ( x i p ) = f j ( x i ) · · · f j p ( x i p ) = γ ( f ( x )) with some f i k = f j k for1 ≤ k ≤ p if and only if the instance of the MMPCP has a solution.If the MMPCP is undecidable for Claus instances with an alphabet of size n (seeTheorem 9), then the undecidability of the current theorem holds for |G| ≥ n . We nowprove that the result holds for |G| ≥ n −
1. Let Σ = { x , . . . , x n } . Since h, g is a Clausinstance, any solution word w is of the form w = x w x n , with w ∈ (Σ − { x , x n } ) ∗ . Bysymmetry, we may assume that h = h and by the proof in [17], g i = g and h i = h for all1 ≤ i ≤ t . Clearly then, one of h ( x n ) and g ( x n ) is a proper suffix of the other (assume that g ( x n ) is a suffix of h ( x n ); the opposite case is similar). Now, redefine u = γ ( x n , g ( x n )) u ,remove the matrix corresponding to g ( x n ) from G and redefine the matrix correspondingto h ( x n ) by h ( x n ) = γ ( x n , h ( x n ) g ( x n ) − ). Since g ( x n ) is a proper suffix of h ( x n ), then h ( x n ) g ( x n ) − is the prefix of h ( x n ) after removing the common suffix with g ( x n ). Thismeans that an ambiguous scalar only exists if there exists a solution to the instance ofMMPCP and we had reduced the alphabet size by 1. MMPCP is undecidable for instancesof size 9 (Theorem 9), thus the undecidability holds for MO-QFA with 32 states and analphabet size of 17. (cid:74)(cid:73) Corollary 15.
The ambiguity problem for measure-once quantum finite automata is unde-cidable for states over an alphabet of size . Proof.
The corollary follows from the proof of Theorem 14. We notice that if there existsa solution to the encoded instance of the MMPCP, then some matrix X has two distinctfactorizations over G and therefore there exists two distinct matrix products giving thesame scalar. Our technique in this corollary is to make these two factorizations producedistinct matrices X and X , such that they still lead to the same scalar. This is simple toaccomplish by redefining the projection matrix P as P = P ⊕
0, redefining the initial vector u as u = u ⊕ M ∈ G − { ϕ ( x , h ( x )) } , we redefine M as M = M ⊕ ϕ ( x , h ( x )) be redefined as ϕ ( x , h ( x )) ⊕ −
1. In this case, any matrix productcontaining ϕ ( x , h ( x )) ⊕ − − − (cid:74) . C. Bell and M. Hirvensalo XX:13 An interesting question is whether Theorem 14 can be shown to hold when the initial vector isrational, rather than real algebraic. We can prove this result if a certain open problem relatedto rational packing functions holds (does there exist a polynomial which maps n -tuples ofrationals to a single rational injectively). Such a function is well known for integer values(the Cantor polynomial), but not for rational n -tuples. This seems a difficult problem toapproach however, and thus we leave the following open problem. (cid:73) Open Problem 16.
Can undecidability of the ambiguity and freeness problems for MO-QFA be shown when the initial vector, projection matrix and all unitary matrices are overrationals?
We also note that in [1] the ambiguity and freeness problems for weighted finite automataand probabilistic finite automata were shown to be undecidable even when the input wordswere restricted to come from a given letter monotonic language , which is a restriction ofbounded languages of the form x ∗ x ∗ · · · x ∗ k where each x i is a single letter of the inputalphabet. The undecidability result of [1] used an encoding of Hilbert’s tenth problem, whichseems difficult to encode into unitary matrices and thus we pose the following open problem. (cid:73) Open Problem 17.
Can the undecidability of the ambiguity and freeness problems forMO-QFA be shown when the input word is necessarily from a given letter monotonic language?
References P. C. Bell, S. Chen, and L. M. Jackson. Scalar ambiguity and freeness in matrix semigroupsover bounded languages. In
Language and Automata Theory and Applications , volume LNCS9618, pages 493–505, 2016. P. C. Bell, V. Halava, and M. Hirvensalo. Decision problems for probabilistic finite automataon bounded languages.
Fundamenta Informaticae , 123(1):1–14, 2012. P. C. Bell and I. Potapov. Periodic and infinite traces in matrix semigroups.
Current Trendsin Theory and Practice of Computer Science (SOFSEM) , LNCS 4910:148–161, 2008. P. C. Bell and I. Potapov. Reachability problems in quaternion matrix and rotation semigroups.
Information and Computation , 206(11):1353–1361, 2008. P. C. Bell and I. Potapov. On the undecidability of the identity correspondence problem andits applications for word and matrix semigroups.
International Journal of Foundations ofComputer Science , 21(6):963–978, 2010. A. Bertoni, G. Mauri, and M. Torelli. Some recursively unsolvable problems relating to isolatedcutpoints in probabilistic automata. In
Automata, Languages and Programming , volume 52 of
LNCS , pages 87–94, 1977. A. S. Besicovitch. On the linear independence of fractional powers of integers.
J. LondonMath. Soc. , 15:3–6, 1940. V. Blondel and V. Canterini. Undecidable problems for probabilistic automata of fixeddimension.
Theory of Computing Systems , 36:231–245, 2003. V. Blondel, E. Jeandel, P. Koiran, and N. Portier. Decidable and undecidable problems aboutquantum automata.
SIAM Journal on Computing , 34:6:1464–1473, 2005. A. Brodsky and N. Pippenger. Characterizations of 1-way quantum finite automata.
SIAMJournal on Computing , 31:1456–1478, 2002. J. Cassaigne, T. Harju, and J. Karhumäki. On the undecidability of freeness of matrixsemigroups.
International Journal of Algebra and Computation , 9(3-4):295–305, 1999. J. Cassaigne, J. Karhumäki, and T. Harju. On the decidability of the freeness of matrixsemigroups.
International Journal of Algebra and Computation , 9(3-4):295–305, 1999.
X:14 Acceptance Ambiguity for Quantum Automata J. Cassaigne and F. Nicolas. On the decidability of semigroup freeness.
RAIRO - TheoreticalInformatics and Applications , 46(3):355–399, 2012. É. Charlier and J. Honkala. The freeness problem over matrix semigroups and boundedlanguages.
Information and Computation , 237:243–256, 2014. C. Choffrut and J. Karhumäki. Some decision problems on integer matrices.
Informatics andApplications , 39:125–131, 2005. T. Colcombet, J. Ouaknine, P. Semukhin, and J. Worrell. On reachability problems forlow dimensional matrix semigroups. In
ArXiV Manuscript (to appear ICALP’19) , volumearXiv:1902.09597, pages 1–15, 2019. V. Halava, T. Harju, and M. Hirvensalo. Undecidability bounds for integer matrices using Clausinstances.
International Journal of Foundations of Computer Science (IJFCS) , 18,5:931–948,2007. M. Hirvensalo. Improved undecidability results on the emptiness problem of probabilistic andquantum cut-point languages.
SOFSEM 2007: Theory and Practice of Computer Science,Lecture Notes in Computer Science , 4362:309–319, 2007. J. Honkala. Decision problems concerning thinness and slenderness of formal languages. In
Acta Informatica , volume 35, pages 625–636, 1998. R. A. Horn and C. R. Johnson.
Topics in matrix analysis . Cambridge University Press, 1991. D. A. Klarner, J.-C. Birget, and W. Satterfield. On the undecidability of the freeness of integermatrix semigroups.
International Journal of Algebra and Computation , 1 (2):223–226, 1991. S.-K. Ko and I. Potapov. Vector ambiguity and freeness problems in SL(2, Z ). FandumentaInformaticae , 162(2-3):161–182, 2018. W. Kuich and A. Salomaa.
Semirings, Automata, Languages , volume 5. Springer, 1986. E. Lengyel.
Mathematics for 3D Game Programming & Computer Graphics . Charles RiverMedia, 2004. C. Moore and J. P. Crutchfield. Quantum automata and quantum grammars.
TheoreticalComputer Science , 237(1-2):275–306, 2000. M. S. Paterson. Unsolvability in 3 × Studies in Applied Mathematics , 49(1):105–107,1970. A. Paz.
Introduction to Probabilistic Automata . Academic Press, 1971. S. Swierczkowski. A class of free rotation groups.