A Quantum Finite Automata Approach to Modeling the Chemical Reactions
aa r X i v : . [ c s . F L ] J u l A Quantum Finite Automata Approach to Modeling the Chemical Reactions
Amandeep Singh Bhatia , ∗ , Shenggen Zheng Chitkara University Institute of Engineering & Technology, Chitkara University, Punjab, India Center for Quantum Computing, Peng Cheng Laboratory, Shenzhen, China
E-mail: , ∗ [email protected] In recent years, the modeling interest has increased significantly from the molecular level tothe atomic and quantum scale. The field of computational chemistry plays a significant rolein designing computational models for the operation and simulation of systems ranging fromatoms and molecules to industrial-scale processes. It is influenced by a tremendous increase incomputing power and the efficiency of algorithms. The representation of chemical reactions usingclassical automata theory in thermodynamic terms had a great influence on computer science.The study of chemical information processing with quantum computational models is a naturalgoal. In this paper, we have modeled chemical reactions using two-way quantum finite automata,which are halted in linear time. Additionally, classical pushdown automata can be designed forsuch chemical reactions with multiple stacks. It has been proven that computational versatil-ity can be increased by combining chemical accept/reject signatures and quantum automata models.
Keywords : chemical reaction, quantum finite automata, pushdown automata, two-way quantumfinite automata, Belousov-Zhabotinsky reaction
I. INTRODUCTION & MOTIVATION
Recently, the connection between complex reactions and their thermodynamics has got overwhelming responseamong research communities. Initially, in the 1970s, Conrad [1] processed the information of molecular systems andstated that complex biochemical systems cannot be analyzed on classical computers. Till now, artificial approachesuse complex biomolecules or logic gates based reaction-diffusion systems to solve the problems [2–4]. Classical systemsare not robust and capable to describe quantum systems. Some tasks that are impossible in classical systems can berealized in quantum systems. Quantum computing is concerned with computer technology based on the principlesof quantum mechanics, which describes the behavior and nature of matter and energy on the quantum level [5].Quantum computation demonstrates the computation power and other properties of the computers based on principlesof quantum mechanics.Models of finite automata are abstract computing devices, which play a crucial role to solve computational problemsin theoretical computer science. Classical automata theory is closely associated with formal language theory, whereautomata are ranked from simplest to most powerful based on their language recognition power [6]. Classical automatatheory has been of significant importance due to its practical real-time applications in the development of several fields.Therefore, it is a natural goal to study quantum variants of classical automata models, which play an important rolein quantum information processing.The quantum automata theory has been developed using the principles of quantum mechanics and classical au-tomata. Quantum computational models make it possible to examine the resources needed for computations. Soonafter the brainstorm of Shor’s factorization quantum algorithm [7], the first models of quantum finite automata (QFAs)have been introduced. Initially, Kondacs and Watrous [8], and Moore and Crutchfield [9] proposed the concept ofquantum automata separately. There is a diversity of quantum automata models have been studied since then anddemonstrated in various directions such as quantum finite automata [9], Latvian QFA, 1.5-way QFA, two-way QFA(2QFA) [8], quantum finite state machines of matrix product states [10], quantum sequential machines [11], quan-tum pushdown automata, quantum Turing machine, quantum queue automata [12], quantum multicounter machines(QMCM), quantum multihead finite automata (QMFA), quantum finite automata with classical states (2QCFA)[13, 14], quantum omega automata [15], state succinctness of two-way probabilistic finite automata (2PFA), QFA,2QFA and 2QCFA [16–18], interactive proof systems with quantum finite automata [19, 20] and semi-quantum two-way finite automata [21, 22] and many more since last two decades [23–27]. These models are effective in determiningthe boundaries of various computational features and expressive power. Quantum computers are more powerful thanTuring machines and even probabilistic Turing machines. Thus, mathematical models of quantum computation canbe view as generalizations of its physical models.Computational biochemistry has been a rapidly evolving research area at the interface between biology, chemistry,computer science, and mathematics. It helps us to apply computational models to understand biochemical and chemicalprocesses and their properties. A combination of chemistry and classical automata theory provides a constructive meansof refining the number of objects that allow to understand the energetic cost of computation [28]. The research hasbeen consistently grown in the field of chemical computing. There exist two ways to model complex chemical reactions:abstract devices and formal models based on multiset rewriting [29]. The complex chemical reaction networks carry outchemical processes that mimic the workings of classical automata models. Recently, Duenas-Diez and Perez-Mercader[28, 30] have designed chemical finite automata for regular languages and chemical automata with multiple stacks forcontext-free and context-sensitive languages. Further, the thermodynamic interpretation of the acceptance/rejectionof chemical automata is given. It is useful to understand the energetic cost of chemical computation. They have usedthe one-pot reactor (mixed container), where chemical reactions and molecular recognition takes place after severalsteps, without utilizing any auxiliary geometrical aid.In classical automata theory, it is known that two-way deterministic finite automata (2DFA) can be designed for allregular languages. It has also been investigated that two-way probabilistic finite automata (2PFA) can be designedfor a non-regular language L = { a n b n | n ≥ } in an exponential time [31, 32]. The research has consistently evolvedin the field of quantum computation and information processing. In quantum automata theory, it has been provedthat 2QFA can be designed for L with one-sided bounded error and halted in linear time. Moreover, it has beendemonstrated that 2QFA can be also designed for non-context free language L = { a n b n c n | n ≥ } [8]. Hence, 2QFAis strictly more powerful than its classical counterparts based on language recognition capability.The field of chemistry and chemical computing plays a significant role in the evolution of computational modelsto mimic the behavior of systems at the atomic level. It is greatly influenced by the computing power of quantumcomputers. Motivated from the above-mentioned facts, we have modeled chemical reactions in the form of formallanguages and represented them using two-way quantum finite automata. The main objective is to examine howchemical reactions perform chemical sequence identification equivalent to quantum automata models without involvingbio-chemistry or any auxiliary device. The crucial advantage of this approach is that chemical reactions in the formof accept/reject signatures can be processed in linear time with one-sided bounded error. The organization of rest ofthis paper is as follows: Subsection is devoted to prior work. In Sect. 2, some preliminaries are given. The definitionof two-way quantum finite automata is given in Sect. 3. In Sect. 4, the chemical reactions are transcribed in formallanguages and modeled using two-way quantum finite automata approach. Summary of work is given in Section 5.Finally, Sect. 6 is the conclusion. A. Prior work
The field of chemical computation has rich and interesting history. Various researchers have represented the chemicalcomputation using the concept of logic gates based reaction-diffusion systems and artificial intelligence approaches.In early 1970s, Conrad [1] differentiated the information processing on molecules from digital computing. Nearly adecade after, Okamoto et al. [33] proposed the concept of a theoretical chemical diode for cyclic enzyme systems. Ithas been proved that it can be used to analyze the dynamic behavior of metabolic switching events in bio-computer.In 1991, Hjelmfelt et al. [34] designed neural networks and finite state machines using chemical diodes. It has beeninvestigated that the execution of a universal Turing machine is possible using connecting chemical diodes.In 1995, Tth and Showalter [35] implemented AND and OR logic gates using reaction-diffusion systems, where thesignals are programmed by chemical waves. It was the first empirical realization of chemical logical gates. In 1997,Magnasco [36] showed that logic gates can be constructed and executed in the chemical kinetics of homogeneous solu-tions. It has been proved that such constructions have computational power equivalent to Turing machine. Adamatzkyand Lacy Costello [37] experimentally realized the Chemical XOR gate by following the same approach of Toth andShowlter in 2002. Further, Grecki et al. [38] constructed the chemical counters for an information processing in theexcitable reaction-diffusion systems.It is one of the most promising new areas of research. Some of the difficulties can be caused by connecting severalgates together for advanced computation. Thus, recently, researchers started focusing on native chemical computation,i.e. without reaction-diffusion systems. In 1994, Adleman [39] proposed the concept of DNA computing and solvedthe Hamiltonian path problem by changing DNA strands. In 2009, Benenson [2] reviewed biological measurementtools for new generation biocomputers. Prohaska et al. [3] studied protein domain using chromatin computation andintroduced chromatin as a powerful machine for chemical computation and information processing. In 2012, Bryant[4] proved chromatin computer as computationally universal and used to solve an example of combinatorial problem.The structures of DNA and RNA are represented using the concept of classical automata theory [40] [41]. Krasin-ski et al. [42] represented the restricted enzyme in DNA with pushdown automata in circular mode. Khrennikovand Yurova [43] modeled the behavior of protein structures using classical automata theory and investigated theresemblance between the quantum systems and modeling behavior of proteins. Bhatia and Kumar [44] modeled ri-bonucleic acid (RNA) secondary structures using two-way quantum finite automata, which are halted in linear time.Recently, Duenas-Diez and Perez-Mercader designed molecular machines for chemical reactions. The native chemicalcomputation has been implemented beyond the scope of logic gates i.e. with chemical automata [30]. It has beendemonstrated that chemical reactions transcribed in formal languages, can be recognized by Turing machine withoutusing biochemistry [28].
II. PRELIMINARIES
In this section, some preliminaries are given. We assume that the reader is familiar with the classical automatatheory and the concept of quantum computing; otherwise, reader can refer to the theory of automata [6], quantuminformation and computation [5] [45]. Linear algebra is inherited from quantum mechanics to describe the field ofquantum computation. It is a crucial mathematical tool. It allows us to represent the quantum operations andquantum states by matrices and vectors, respectively, that obey the rules of linear algebra. The following are thenotions of linear algebra used in quantum computational theory: • Vector space ( V ) [45]: A vector space ( V ) is defined over the field F of complex numbers C consisting of anon-empty set of vectors, satisfying the following operations: – Addition: If two vectors | a i and | b i belong to V , then | a i + | b i ∈ V . – Multiplication by a scalar: If | a i belongs to V , then λ | a i ∈ V , where λ ∈ C . • Dirac notation [5]: In quantum mechanics, the Dirac notation is one of the most peculiarities of linear algebra.The combination of vertical and angle bars ( |i h| ) is used to unfold quantum states. It provides an inner productof any two vectors. The bra h b | and ket | a i represent the row vector and column vector, respectively. | a i = α α α , h b | = (cid:2) β ∗ β ∗ β ∗ (cid:3) , | a i h b | = α β ∗ α β ∗ α β ∗ α β ∗ α β ∗ α β ∗ α β ∗ α β ∗ α β ∗ (1)where β ∗ i indicates the complex conjugate of complex number α i . • Quantum bit [27]: A quantum bit (qubit) is a unit vector defined over complex vector space C . In general, itis represented as a superposition of two basis states labeled | i and | i . | φ i = α | i + β | i (2)The probability of state occurrence | i is | α | and | i is | β | . It satisfies that | α | + | β | = 1. The two complexamplitudes ( α and β ) are represented by one qubit. Thus, 2 n complex amplitudes can be represented by n qubits. • Quantum state [5]: A quantum state | ψ i is defined as a superposition of classical states, | ψ i = α | w i + α | w i + ... + α n | w n i (3)where α ′ i s are complex amplitudes and | w i i ′ s are classical states for 1 ≤ i ≤ n . Therefore, a quantum state | ψ i can be represented as n -dimensional column vector. α α ...α n (4) • Unitary transformation: In quantum mechanics, the transformation between the quantum systems must beunitary. Consider a state | ψ i of quantum system at time t : | ψ i = α | w i + α | w i + ... + α n | w n i transformedinto state | ψ ′ i at time t’ : | ψ ′ i = α ′ | w i + α ′ | w i + ... + α ′ n | w n i , where complex amplitudes are associated by | ψ ′ ( t ′ ) i = U ( t ′ − t ) | ψ ( t ) i , where U denotes a time reliant unitary operator satisfies that ( U ( t ′ − t )) ∗ U ( t ′ − t ) = 1,and P ni =1 | α i | = | α ′ i | = 1 [5]. • Hilbert space: A physical system is described by a complex vector space called Hilbert space H [45]. It allow us todescribe the basis of the quantum system. The direct sum h x | y i : H⊕ H → C or inner product h x | v i : H⊗ H → C of two subspaces, satisfying the following properties for any vectors: – Linearity: ( α h x | + β h y | ) | z i = α h x | z i + β h y | z i – Symmetric property: h x | y i = h y | x i – Positivity: h x | x i ≥ h x | x i = 0 iff x = 0, where x ∈ H .where x, y, z ∈ H and α, β ∈ C . • Quantum finite automata (QFA) [46]: It is defined as a quadruple ( Q, Σ , s int , U σ ), where – Q is a set of states, – Σ is an input alphabet, – Hilbert space H and s init ∈ H is an initial vector such that | s init | = 1, – H acc ⊂ H and P acc is an acceptance projection operator on H acc , – U σ denotes a unitary transition matrix for each input symbol ( σ ∈ Σ).The computation procedure of QFA consists of an input string w = σ n σ ...σ n . The automaton works by readingeach input symbol and their respective unitary matrices are applied on the current state, starting with an initialstate. The quantum language accepted by QFA is represented as a function f QF A ( w ) = | s init U w P acc | , where U w = U σ U σ ...U σ n . The tape head is allowed to move only in the right direction. Finally, the probability ofQFA being in an acceptance state is observed; i.e. indicating whether the input string is accepted or rejected byQFA. It is also called as a real-time quantum finite automaton.Based on the movement of tape head, QFA is classified as one-way QFA, 1.5-way QFA, and 2QFA. In 1.5-way QFA,the tape head is permitted to move only in the right direction or can be stationary, but it cannot move towards theleft direction. It has been proved that it can be designed for non-context free languages, if the input tape is circular[47]. In this paper, we focused on the 2QFA model due to its more computational power than classical counterparts. III. TWO-WAY QUANTUM FINITE AUTOMATA
A quantum finite automaton (QFA) is a quantum variant of a classical finite automaton. In QFA, quantum tran-sitions are applied on reading the input symbols from the tape [9]. Two-way quantum finite automaton (2QFA) isa quantum counterpart of a two-way deterministic finite automaton (2DFA). In 2QFA, the tape head is allowed tomove either in the left or right direction or can be stationary. The illustration of 2DFA is shown in Fig 1. It consistsof a read-only input tape consisting of a sequence of cells, each one storing a input symbol. The read-only input tapeis scanned by an input head, which is allowed to move in both directions or can be stationary. At each step of acomputation, a finite state control should be in state from a finite set Q . ... read-only input tape FIG. 1: Schematic diagram of the hardware of 2DFA
Definition 1. [9]
A two-way quantum finite automaton is represented as sextuple ( Q, Σ , δ, q , Q acc , Q rej ), where • Q is a finite set of states. • Σ is an input alphabet, • Transition function δ is defined by δ : Q × Γ × Q × D → C , where C is a complex number, Γ = Σ ∪ { , $ } and D = {− , , +1 } represent the left, stationary and right direction of tape head. • Q = Q acc ∪ Q rej ∪ Q non , where Q non , Q acc , Q rej represent the set of non-halting, accepting, rejecting statesrespectively. The transition function must satisfies the following conditions:(i) Local probability and orthogonality condition: ∀ ( q ,σ ) , ( q ,σ ) ∈ Q × Γ X ( q ′ ,d ) ∈ Q × D δ ( q , σ, q ′ , d ) δ ( q , σ, q ′ , d ) = (cid:26) q = q q = q (cid:27) (ii) First separability condition: ∀ ( q ,σ ) , ( q ,σ ) ∈ Q × Γ X q ′ ∈ Q δ ( q , σ , q ′ , +1) δ ( q , σ , q ′ ,
0) + δ ( q , σ , q ′ , δ ( q , σ , q ′ , −
1) = 0(iii) Second separability condition: ∀ ( q ,σ ) , ( q ,σ ) ∈ Q × Γ X q ′ ∈ Q δ ( q , σ , q ′ , +1) δ ( q , σ , q ′ , −
1) = 0For each σ ∈ Γ, a 2QFA is said to be simplified, if there exists a unitary linear operator V σ on the inner productspace such that L { Q } → L { Q } . The transition function is represented as δ ( q, σ, q ′ , d ) = (cid:26) q ′ V σ q (cid:12)(cid:12)(cid:12)(cid:12) if D ( q ′ ) = d else (cid:27) (5)where q ′ V σ q is a coefficient of | q ′ i in V σ | q i .Consider an input string w , written on the input tape enclosed with both end-markers such as w $. The computationof 2QFA is progress as follows. The tape head is above the input symbol σ and the automaton is in any state q . Then,the state of 2QFA is changed to q ′ with an amplitude δ ( q, σ, q ′ , d ) and moves the tape head one cell towards right,stationary and in left direction according to ∈ {− , , +1 } . It corresponds to a unitary evolution in the inner-productspace H n .A computation of a 2QFA is a chain of superpositions c , c , c , ...., where c denotes an initial configuration.For any c i , when the automaton is observed in a superposition state with an amplitude α c , then it has the form U δ | c i i P c ∈ C n α c | c i i , where C n represents the set of configurations. The probability associated with a configurationis calculated by absolute squares of amplitude. Superposition is said to be valid; if the sum of the squared moduli oftheir probability amplitudes is unitary. In quantum theory, the time evolution is specified by unitary transformations.Each transition function δ prompts a transformation operator over the Hilbert space H n in linear time. U wδ | q, j i = X ( q ′ ,d ) ∈ Q × D δ ( q, w ( j ) , q ′ , d ) | q ′ , j + d mod | w |i for each ( q, j ) ∈ C | w | , where q ∈ Q, j ∈ Z | w | and extended to H n by linearity [9, 48]. IV. MODELING OF CHEMICAL REACTIONS a o C o C Input Input Output Accepted Rejected
Heat Released No Heat ReleasedOutput a b c c a a b b c bb FIG. 2: Representation of language recognition by chemical computation. It is reproduced from [30] under the CreativeCommons CCBY license.
Before, we recognize the chemical reactions using two-way quantum finite automata model, it is important to showhow computational chemistry works. Fig 2. shows the illustration of language recognition by the chemical computationmodel. It consists of three parts: (i) a mixed container where the computation process occurs, (ii) an input translatorthat translates the chemical aliquots into input symbols and gives them consecutively depending upon the processingtime, (3) a system to monitor the response of an automaton as a chemical criterion. Finally, the chemical computationproduces well-defined chemical accept/ reject signatures for the input. For instance, if the number of a ’s and b ’s areequal in the input, then the chemical computation produces heat i.e. an input is said to be accepted. Otherwise, ifno heat is released at the end of computation, then the input is said to be rejected by the system. The following arethe construction of two-way quantum finite state machines of chemical reactions. Theorem 1.
Two-way quantum finite automata can recognize all regular languages.Proof.
The proof has been shown in [9].
A. Chemical reaction-1 consisting regular language
For an illustrative and visual implementation, we can choose a precipitation reaction in an aqueous medium such as
KIO + AgN O → AgIO ( s ) + KN O (6)If, during computation, a white precipitate of silver iodate is observed, then the input string is said to be accepted;if the solution is clear from precipitate, the string has been rejected because there was no reaction. Therefore,we have chosen the recipes of alphabet symbols a for potassium iodate ( KIO ) and b for silver nitrate ( AgN O ),quantitatively. Fig. 3 shows the chemical representation of symbols a and b , the bimolecular precipitation reaction[28]. If the precipitate AgIO is not presented in the solution, then the computation is said to be rejected. Forexample, the input string w = aaab is said to be accepted due to presence of precipitate or, equally, the heat hasbeen determined during computation. But, the input w = aa is said to be rejected due to absence of precipitate, or,precisely, the heat has not been observed. The Kleene star (Σ ∗ ) operator is a set of infinite strings of all lengths overinput alphabet as well as empty string ( ǫ ). Fig. 4 shows the corresponding theoretical 2QFA state transition graphto recognize L . FIG. 3: Illustration of acid/base reaction of L q q q q qa qa | | +1a |1| +1 b | | -1 q q q q qr qr b | | -1 b | | -1 a | | -1 a | | -1 a | | -1 a | | +1 a | | +1 a | | +1 b | | +1 b | | +1 b | | +1 b | | +1 $ | | -1 $ | | 0 $ | | -1 $ | | 0 | | 0 | | 0 | | +1 FIG. 4: State transition diagram of L Theorem 2.
A language L = { ( a + b ) ∗ a ( a + b ) ∗ b ( a + b ) ∗ aa ∗ bb ∗ } representing precipitation reaction in Eq. (6) canbe recognized by 2QFA.Proof. The idea of this proof is as follows. The initial state q reads a right-end marker b , the state q is changed into q . If there is no occurrenceof symbol a , then the state is transformed into rejecting state q r . If the input string w ∈ L contains at least one a and one b , then silver iodate is present during computation and it is said to be recognized by 2QFA. A 2QFA for L is defined as follows: M QF A = ( Q, Σ , q , Q acc , Q rej , δ ) , where– Q = { q , q , q , q , q , q , q , q , q a , q a , q r , q r } , where q and q are used to move the head towards the $ onreading a ’s and b ’s respectively. The states q and q are used to confirm the last symbol read by head is a and b , respectively. .– Σ = { a, b } , q is an initial state, Q acc = { q a , q a } and Q rej = { q r , q r } .– The specification of transition functions are given in Table 1.It can be noted that in 2QFA where transition matrices consist 0 and 1, i.e. basically a two-way reversible finiteautomata (2RFA). Therefore, 2QFA can be designed for all the languages accepted by 2RFA. In transition matrix,each column and row have exactly only one entry 1. Hence, the dot product of any two rows is equal to zero. It isknown that the language recognition power of 2RFA is an equivalent to 2DFA. TABLE I: Details of the transition functions and head function for L V | q i = | q i V a | q i = | q i V b | q i = | q i V | q i = | q i V $ | q i = | q i V a | q i = | q i V b | q i = | q i V b | q i = | q i V $ | q i = | q r i V a | q i = | q i V a | q i = | q i V a | q i = | q i V $ | q i = | q i V a | q i = | q i V b | q i = | q i V b | q i = | q i V | q i = | q r i V a | q i = | q i V b | q i = | q i V b | q i = | q i V $ | q i = | q a i V a | q i = | q a i Head Functions: D ( q ) = (+1) , D ( q ) = ( − , D ( q ) = (+1) , D ( q ) = ( − ,D ( q ) = (+1) , D ( q ) = ( − , D ( q ) = (+1) , D ( q ) = ( − ,D ( q a ) = D ( q a ) = (0) , D ( q r ) = D ( q r ) = (0) B. Chemical reaction-2 consisting context-free language
Next, we have considered the context-free language from Chomsky hierarchy satisfying the balanced chemical reac-tion between NaOH and malonic acid is as follows: H C H O + 2 N aOH → N a C H O + 2 H O (7)The language generated by the above-mentioned chemical reaction is L consisting Dyck language of all words withbalanced parentheses. 2QFA is designed for L is as follows: Theorem 3.
A language L consisting Dyck language of all words with balanced parentheses can be recognized by2QFA with probability 1, otherwise rejected with probability at least − N , where N is any positive number.Proof. The idea of this proof is as follows. It consists of three phases. First, the initial state q reads a first symboland both heads start moving towards the right-end marker $ . If the input string starts with closed parentheses,then it is said to be rejected. On reading the left-end marker N paths, denotedby q , , q , , ..., q N, . Each path possesses equal amplitude 1 √ N . Along the N different paths, each path movesdeterministically to the right-end marker $. Each computational path keep track of the open parentheses with respect FIG. 5: Illustration of the acid/base reaction of L FIG. 6: State transition diagram of L to the closed parentheses. If at the end of computation, the excess of open parentheses is observed, then it is said tobe rejected. It means pH value is greater than midpoint pH and intermediate gray tone is observed. Secondly, if thereis an excess of closed parentheses, then the darkest gray tone is observed i.e. pH value is less than midpoint pH. It issaid to be rejected by 2QFA with probability 1 − N . If there is a balanced occurrence of open and closed parentheses,the input string is said to be accepted with probability 1. Hence, pH value is equal to midpoint pH and the lightestgray tone is observed at the end of computation. A 2QFA for L is defined as follows: M QF A = ( Q, Σ , q , Q acc , Q rej , δ ) , where– Q = { q , q , q , q } ∪ { q i,j | ≤ i ≤ N, ≤ j ≤ max( i, N − i + 1) } ∪ { p k | ≤ k ≤ N }∪ { s i, , w i, , r i, | ≤ i ≤ N } ∪ { q acc , q rej } , where q is used to check whether the first symbol is an open parentheses or not, q and q areused to traverse the input string.– Σ = { ( , ) } , q is an initial state, Q acc = { p N } and Q rej = { q r } ∪ { p k | ≤ k < N }∪ { r i, | ≤ i ≤ N } .– The specification of transition functions is given in Table 2. TABLE II: Details of the transition functions and head function for L V | q i = | q i , V ( | q i = | q i , V ) | q i = | q i , V | q i = | q r i V ( | q i = | q i , V ) | q i = | q i , V ( | q i = | q i , V ) | q i = | q i V | q i = 1 √ N P Ni =1 | q i, i V ( | q i, i = | q i,i i , V ) | q i, i = | q i,N − i +1 i , for 1 ≤ i ≤ N, V ( | q i,j i = | q i,j − i , for 1 ≤ j ≤ iV ) | q i,j i = | q i,j − i , for 1 ≤ j ≤ N − i + 1 , ≤ i ≤ NV $ | q i, i = | s i, i , V ) | s i, i = | w i, i , V ( | s i, i = | r i, i , for 1 ≤ i ≤ NV $ | w i, i = 1 √ N P Nk =1 exp (cid:18) πiN ki (cid:19) | p k i , for 1 ≤ i ≤ N Head Functions: D ( q ) = (+1) , D ( q ) = ( − , D ( q ) = (+1) , D ( q ) = ( − , D ( q i, ) = (+1) , for 1 ≤ i ≤ ND ( q i,j ) = (0) , for 1 ≤ i ≤ N, j = 0 , D ( q r ) = (0) , D ( p k ) = (0) , for 1 ≤ k ≤ ND ( s i, ) = ( − , D ( w i, ) = (+1) , D ( r i, ) = (0) , for 1 ≤ i ≤ N C. Chemical reaction-3 consisting context-sensitive language
To implement a chemical 2QFA for context-sensitive language, we have used Belousov-Zhabotinsky (BZ) reactionnetwork for the non-linear oscillatory chemistry [28], which consists temporal oscillation in the sodium bromate andmalonic acid system [49] as3
BrO − +5 CH ( COOH ) + 3 H + → BrCH ( COOH ) + 4 CO + 2 HCOOH + 5 H O (8) FIG. 7: Illustration of the acid/base reaction of L In 2019, Duenas-Diez and Perez-Mercader [28] designed chemical Turing machine for BZ reaction network. Thechemical reaction is fed sequentially to the reactor as { ( BrO − ) n ( M A ) n ( N aOH ) n } , where n >
0. It is transcribed informal language as L = { a n b n c n | n > } . The symbol a is interpreted as a fraction of sodium bromate, b is used formalonic acid and symbol c is transcribed as a quantity of NaOH. It is known that L is a context-sensitive languageand cannot be recognized by finite automata or pushdown automata with a stack. Although, it can be recognized bytwo-stack PDA. We have shown that L can be recognized by 2QFA without using any external aid.0 Theorem 4.
A language L = { a n b n c n | n > } can be recognized by 2QFA in linear time. For a language L = { a n b n c n | n > } and for arbitrary N-computational paths, there exists a 2QFA such that for w ∈ L , it accepts w withbounded error ǫ and rejects w / ∈ L with probability at least − N . FIG. 8: State transition diagram of L Proof.
The design of proof for BZ reaction network is as follows. It consists of two phases. First, the 2QFA traversethe input to check the form a + b + c + . On reading the right-end marker $ , the computation is split into N paths suchthat w , , w , , ..., w N, . Secondly, the first path is used to check the number of b ’s and c ’s are equal or not. The secondpath is used to check the initial part of an input string to identify it is in { a n b n | n > } . On reading the right-endmarker $ , the both paths are split into N different paths with an equal amplitude 1 √ N . Finally, upon reading theright-end marker a ’s and b ’s and b ’s and c ’s are equal in respective computational paths. Then,all paths come into N -way Quantum Fourier transform (QFT) and either one acceptance state or rejectance states areobserved. Suppose, if the input string is not in the corrected form, then all computation paths read the − N . Otherwise, the input string is said to be recognized by 2QFA with probability 1. V. SUMMARY
In summary, 2QFA model can be efficiently designed for balanced chemical reaction and Belousov-Zhabotinsky (BZ)reaction network with one-sided error bound, which are halted in linear time. Table 3 shows the language recognitionability of different computational models. The classical 2DFA and 2PFA are known to be equal in computationalpower to one-way deterministic finite automata (1DFA) [21, 50]. It has been proved that 2PFA’s can be designed for1non-regular languages in expected polynomial time. Additionally, it has been demonstrated that the chemical PDAcan be designed for aforementioned chemical reactions with multiple stacks. The recognition of languages by nativechemical automata cab be found in [29–31]. But, we have shown that 2QFA can recognize such chemical reactions,without any external aid. It has been proved that 2QFA is more powerful than classical variants, because it followsthe quantum superposition principle to be in more than one state at a time on the input tape. For the execution,it needs atleast O ( log n ) quantum states to store the position of tape head, where n denotes the length of an inputstring. TABLE III: Comparison of computational power of modelsLanguages Class 2DFA/2PFA Chemical FA/PDA 2QFA L = { ( a + b ) ∗ a ( a + b ) ∗ b ( a + b ) ∗ aa ∗ bb ∗ } RL ✓ ✓ ✓ A language L consisting Dycklanguage of balanced parentheses CFL ✗ ✓ (with 1-stack PDA) ✓ L = { a n b n c n | n > } CSL ✗ ✓ (with 2-stack PDA) ✓ RL, CFL and CSL stand for regular languages, context-free languages and context-sensitive languages, respectively.
VI. CONCLUSION
The enhancement in many existing computational approaches provides momentum to molecular and quantumsimulations at the atomic level. It helps to test new abstract approaches for considering molecules and matter.Previous attempts to model the aforementioned chemical reactions used finite automata and pushdown automata withmultiple stacks. In this paper, we focused on well-known languages of Chomsky hierarchy and modeled them usingtwo-way quantum finite automata. The crucial advantage of the quantum approach is that these chemical reactionstranscribed in formal languages can be parsed in linear time, without using any external aid. We have shown thattwo-way quantum automata are more superior than its classical variants by using quantum transitions. To the best ofour knowledge, no such modeling of chemical reactions is performed using quantum automata theory so far. For thefuture purpose, we will try to represent complex chemical reactions in formal languages and model them using otherquantum computational models.
VII. ADDITIONAL INFORMATION
Conflict of interest
The authors declare that they have no conflict of interest.
Acknowledgement
S.Z. acknowledges support in part from the National Natural Science Foundation of China (Nos. 61602532), theNatural Science Foundation of Guangdong Province of China (No. 2017A030313378), and the Science and TechnologyProgram of Guangzhou City of China (No. 201707010194). [1] M. Conrad, Information processing in molecular systems, BioSystems 5 (1) (1972) 1–14.[2] Y. Benenson, Biocomputers: from test tubes to live cells, Molecular BioSystems 5 (7) (2009) 675–685.[3] S. J. Prohaska, P. F. Stadler, D. C. Krakauer, Innovation in gene regulation: The case of chromatin computation, Journalof theoretical biology 265 (1) (2010) 27–44.[4] B. Bryant, Chromatin computation, PloS one 7 (5) (2012) e35703.[5] M. A. Nielsen, I. Chuang, Quantum computation and quantum information., AAPT, 2002.[6] J. E. Hopcroft, R. Motwani, J. D. Ullman, Automata theory, languages, and computation, International Edition 24 (2006)19.[7] P. W. Shor, Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer, SIAMreview 41 (2) (1999) 303–332. [8] A. Kondacs, J. Watrous, On the power of quantum finite state automata, in: Proceedings 38th Annual Symposium onFoundations of Computer Science, IEEE, 1997, pp. 66–75.[9] C. Moore, J. P. Crutchfield, Quantum automata and quantum grammars, Theoretical Computer Science 237 (1-2) (2000)275–306.[10] A. S. Bhatia, A. Kumar, Quantifying matrix product state, Quantum Information Processing 17 (3) (2018) 41.[11] L. Li, D. Qiu, Determination of equivalence between quantum sequential machines, Theoretical Computer Science 358 (1)(2006) 65–74.[12] A. S. Bhatia, A. Kumar, On the power of quantum queue automata in real-time, arXiv preprint:1810.12095 (2018).[13] A. Ambainis, J. Watrous, Two-way finite automata with quantum and classical states, Theoretical Computer Science287 (1) (2002) 299–311.[14] S. Zheng, D. Qiu, L. Li, J. Gruska, One-way finite automata with quantum and classical states, in: Languages Alive,Springer, 2012, pp. 273–290.[15] A. S. Bhatia, A. Kumar, Quantum ω -automata over infinite words and their relationships, International Journal of Theo-retical Physics 58 (3) (2019) 878–889.[16] C. Mereghetti, B. Palano, G. Pighizzini, Note on the succinctness of deterministic, nondeterministic, probabilistic andquantum finite automata, RAIRO-Theoretical Informatics and Applications 35 (5) (2001) 477–490.[17] S. Zheng, D. Qiu, J. Gruska, L. Li, P. Mateus, et al., State succinctness of two-way finite automata with quantum andclassical states., Theor. Comput. Sci. 499 (2013) 98–112.[18] A. Yakaryilmaz, A. Say, Succinctness of two-way probabilistic and quantum finite automata, arXiv preprint arXiv:0903.0050(2009).[19] H. Nishimura, T. Yamakami, An application of quantum finite automata to interactive proof systems, Journal of Computerand System Sciences 75 (4) (2009) 255–269.[20] H. Nishimura, T. Yamakami, Interactive proofs with quantum finite automata, Theoretical Computer Science 568 (2015)1–18.[21] J. C. Shepherdson, The reduction of two-way automata to one-way automata, IBM Journal of Research and Development3 (2) (1959) 198–200.[22] S. Zheng, J. Gruska, D. Qiu, On the state complexity of semi-quantum finite automata, RAIRO-Theoretical Informaticsand Applications 48 (2) (2014) 187–207.[23] A. Bertoni, C. Mereghetti, B. Palano, Quantum computing: 1-way quantum automata, in: International conference ondevelopments in language theory, Springer, 2003, pp. 1–20.[24] A. S. Bhatia, A. Kumar, On relation between linear temporal logic and quantum finite automata, Journal of Logic, Languageand Information (2019) 1–12.[25] D. Qiu, L. Li, An overview of quantum computation models: quantum automata, Frontiers of Computer Science in China2 (2) (2008) 193–207.[26] A. Ambainis, A. Yakaryılmaz, Automata and quantum computing, arXiv preprint:1507.01988 (2015).[27] A. S. Bhatia, A. Kumar, Quantum finite automata: survey, status and research directions, arXiv preprint:1901.07992(2019).[28] M. Duenas-Diez, J. Perez-Mercader, Native chemical automata and the thermodynamic interpretation of their experimentalaccept/reject responses, arXiv preprint:1903.03827 (2019).[29] F. Okubo, T. Yokomori, The computing power of determinism and reversibility in chemical reaction automata, in: Re-versibility and Universality, Springer, 2018, pp. 279–298.[30] M. Due˜nas-D´ıez, J. P´erez-Mercader, How Chemistry Computes: Language Recognition by Non-Biochemical ChemicalAutomata. From Finite Automata to Turing Machines, iScience 19 (2019) 514–526.[31] R. Freivalds, Probabilistic two-way machines, in: International Symposium on Mathematical Foundations of ComputerScience, Springer, 1981, pp. 33–45.[32] C. Dwork, L. Stockmeyer, A time complexity gap for two-way probabilistic finite-state automata, SIAM Journal on Com-puting 19 (6) (1990) 1011–1023.[33] M. Okamoto, T. Sakai, K. Hayashi, Switching mechanism of a cyclic enzyme system: Role as a chemical diode, Biosystems21 (1) (1987) 1–11.[34] A. Hjelmfelt, E. D. Weinberger, J. Ross, Chemical implementation of neural networks and Turing machines, Proceedingsof the National Academy of Sciences 88 (24) (1991) 10983–10987.[35] A. T´oth, K. Showalter, Logic gates in excitable media, The Journal of chemical physics 103 (6) (1995) 2058–2066.[36] M. O. Magnasco, Chemical kinetics is Turing universal, Physical Review Letters 78 (6) (1997) 1190.[37] A. Adamatzky, B. D. L. Costello, Experimental logical gates in a reaction-diffusion medium: The xor gate and beyond,Physical Review E 66 (4) (2002) 046112.[38] J. Gorecki, K. Yoshikawa, Y. Igarashi, On chemical reactors that can count, The Journal of Physical Chemistry A 107 (10)(2003) 1664–1669.[39] L. M. Adleman, Molecular computation of solutions to combinatorial problems, Science (1994) 1021–1024.[40] L. Kuppusamy, A. Mahendran, Modelling DNA and RNA secondary structures using matrix insertion–deletion systems,International Journal of Applied Mathematics and Computer Science 26 (1) (2016) 245–258.[41] L. Kuppusamy, A. Mahendran, S. N. Krishna, Matrix insertion-deletion systems for bio-molecular structures, in: Interna-tional Conference on Distributed Computing and Internet Technology, Springer, 2011, pp. 301–312.[42] T. Krasi´nski, S. Sakowski, T. Poplawski, Towards an autonomous multistate biomolecular devices built on DNA, in: 2014Sixth World Congress on Nature and Biologically Inspired Computing (NaBIC 2014), IEEE, 2014, pp. 23–28.[43] A. Khrennikov, E. Yurova, Automaton model of protein: dynamics of conformational and functional states, Progress in3