INTERNATIONAL JOURNAL OF ELECTRICAL, ELECTRONICS AND COMPUTER SYSTEMS (IJEECS), volume 1, issue 1, MARCH 2011 www.ijeecs.org ISSN: 2221-7258(Print) ISSN: 2221-7266 (Online)

DQA: AUTOMATA WITH NEW MEMORY, PROPERTIES AND APLLICATIONS Biplob Kumar Debnath Department of Electrical and Computer Engineering, University of Illinois at Chicago Chicago, IL 60607, USA. Abstract In this paper, the recognition of different classes of languages with the help of Deque Automata is described. A Deque Automaton (DQA), an extension of Queue Automaton (QA) or Circular Automaton (CA), uses queue as a store and has six basic operations. It is shown here that languages accepted by Finite Automaton (FA), Push-down Automaton (PDA), and Queue Automaton (QA) are also accepted by Deque Automaton (DQA). It is also proved that class of languages accepted by Turing Machine (TM) is a subset of that accepted by DQA i.e. DQA is Turing-equivalent and a Turing machine can be simulated by DQA. Conversions between different types of storage and DQA are shown and lower bounds of the complexity of conversions are determined then. Simulation of different automata with the help of DQA is also shown. Priorities and restrictions of DQA are also discussed for recognizing different classes of languages. Keywords: Finite Automata Automata (QA), Turing Machine (TM).

(FA),

Queue

I. INTRODUCTION Turing Machine (TM) is the mathematical model of computer. A finite state machine with one or more queues is Turing equivalent [10, 12]. Different kinds of machines with different memories have been studied intensely in [1-13]. In this paper, utility of double ended queue is focused on. In practice, many efficient methods exist for simulating one data structure with another. Our goal in this paper is to recognize different classes of languages using the automata and to compare the priori- ties of different machines with DQA. A finite automaton is an automatic machine with a finite set of states, a primary/initial state, a set of final states and some transition rules depending on the current state and sensed input of the machine. FA is not comparable to Turing Machine (TM) and DQA is capable of doing all the jobs of FA. Again, Push down automaton (PDA) or stack automaton endows a finite automaton with a

writable stack. The automata can push characters/input items down on the store, pop the top character on the store off and sense to control future state transition [6]. PDA is still not Turing-capable. Furthermore, Queue Automaton (QA) is a finite automaton having queue as a store. It has three basic operations (enqueue, dequeue, and sense) on the queue [1]. The queue automata can push a character at the front/back of the queue and remove a character from the back/front of the queue [1, 10]. It has been proved that class of languages accepted by PDA is also accepted by QA [1]. But, it remains tough to establish Turing-equivalence model and simulate TM using QA. In this case, DQA is capable of doing all the jobs of Turing machine and can be generalized and converted to any form of automata. The deque automata are extensions of finite automata that use double ended queue (deque) as a store. It is similar to queue automata except that characters/items can be placed at and removed from both the front and back of the queue, one at a time. Moreover, all the machines described here can be generalized to having more than one store: the n-stack automata (n-PDA), the n- queue automata (n-QA), n-double ended queue auto- mata (n-DQA). Though, it is not going to be described here, any machine can be designed to have deque of deques, queue of queues and stack of stacks. The cost of computation is limited by the number of character op- eration or the number of basic operation on the auxiliary storage structure [10]. The most general of auxiliary stores is definitely the deque. The other stores can be treated as restrictions of the deque. A deque is a list of items from a finite alphabet ζ where characters can be sensed, appended at or deleted from on the left or on the right. II. DEFINING THE AUTOMATON A double ended queue automaton or simply, deque automaton (DQA) is a hex-tuple, M = ( K, Σ, ζ, δ, s, F ) where, K = set of finite state(s) Σ = alphabet

INTERNATIONAL JOURNAL OF ELECTRICAL, ELECTRONICS AND COMPUTER SYSTEMS (IJEECS), volume 1, issue 1, MARCH 2011 www.ijeecs.org ISSN: 2221-7258(Print) ISSN: 2221-7266 (Online)

ζ = deque special characters (deque alphabet) δ = transition relation where, δ ⊆ ( K × ( Σ ∪ { e } ) × ζ* ) × ( K × ζ* ) if it is nondeterministic or, δ ⊆ ( K × Σ × ζ* ) × ( K × ζ* ) if it is deterministic. s = starting state F = set of final state(s). III. BASIC OPERATIONS

In the expression ( ( p , a , α ... β ) , ( q , γ … θ ) ) ∈ δ , the automaton with α in the front and β in the back of the queue is in p state and reading the current input (may not read if nondeterministic) changes the queue content by γ … θ entering state q. More than one operation at a time is restricted for simplicity. So, it either changes the front of the queue (left end of the queue) or at the back but not both. So, α = γ or β = θ. If the machine is nondeterministic then there is possibility that a = e (empty string). There is always a chance that p = q depending on the situation [1]. The machine has six basic operations: PushR : right append PushL : left append PopR : right delete PopL : left delete SenseR : Sense character on the right of the current position. SenseL : Sense character on the left of the current position. Some examples of PushR operations are the following transitions:

( ( p , a , e ) , ( q , a ) ) ⇐ right append ‘a’ on an empty deque. ( ( p , a , a ) , ( q , aa ) ) ⇐ right append ‘a’ on an ‘a’ . ( ( p , a , b ) , ( q , ba ) ) ⇐ right append ‘a’ on a ‘b’ . ( ( p , b , b ) , ( q , bb ) ) ⇐ right append ‘b’ on an ‘b’ . ( ( p , b , a ) , ( q , ab ) ) ⇐ right append ‘b’ on an ‘a’ . where {p, q} ∈ K and {a, b} ⊆ Σ.

Similarly, for PushL operations: ( ( p , a , e ) , ( q , a ) ) ⇐ left append ‘a’ on an empty deque. ( ( p , a , a ) , ( q , aa ) ) ⇐ left append ‘a’ on an ‘a’ . ( ( p , a , b ) , ( q , ab ) ) ⇐ left append ‘a’ on a ‘b’ . ( ( p , b , b ) , ( q , bb ) ) ⇐ left append ‘b’ on an ‘b’ . ( ( p , b , a ) , ( q , ba ) ) ⇐ left append ‘b’ on an ‘a’ . where {p, q} ∈ K and {a, b} ⊆ Σ. Examples for PopR are:

( ( p , u , a ) , ( q , e ) ) ⇐ delete the right ‘a’. ( ( p , u , ab ) , ( q , a ) ) ⇐ delete the right ‘b’. ( ( p , u , ba ) , ( q , b ) ) ⇐ delete the right ‘a’.

( ( p , u , b ) , ( q , e ) ) ⇐ delete the right ‘b’.

( ( p , u , e ) , ( q , e ) ) ⇐ where q may be a halting state. where {p, q} ∈ K and u ⊆ Σ*. Similarly for PopL:

( ( p , u , a ) , ( q , e ) ) ⇐ delete the left ‘a’. ( ( p , u , ab ) , ( q , b ) ) ⇐ delete the left ‘a’. ( ( p , u , ba ) , ( q , a ) ) ⇐ delete the left ‘b’. ( ( p , u , b ) , ( q , e ) ) ⇐ delete the left ‘b’. ( ( p , u , e ) , ( q , e ) ) ⇐ where q may be a halting state. where {p, q} ∈ K and u ⊆ Σ*. IV. CONFIGURATION/INSTANTANEOUS DESCRIPTION (ID) The configuration of a deque automaton is defined as an element of K × Σ* × ζ*, where the first component is the state of the machine, the second is the input part yet not processed, the third is the content of the queue, reading from front to back (left to right). For example, in the configuration (p, abc, def), p is the present state, abc is the input to be read, def is the content of the deque read from front to back. For consistency, the notation of QA defined in [1] is used here. V. YIELDING The operation “yield in one step” or “directly produce” is defined by the symbol “ ” as ( p, x, α ) ( q, y, ρ ) if ( ( p, a, β ) , ( q , γ ) ) ∈ δ and x = ay, α = βn or α = nβ, and ρ = γm or ρ = mγ. ( a can be empty, α can be ρ) and where ( p, x, α ) and ( q, y, ρ ) are two IDs.

String w ⊆ Σ* is accepted by the machine iff, ( s, w, α ) ( p, e, e ) and p ∈ F. Here “ ” denotes the reflexive, transitive closure of “ ” which needs not be a function and “ ” is termed as “yields in some steps” or “eventually produces”. VI. THEOREMS Theorem 1: Even in the generalized cases, queue and pushdown automata are restrictions of deque automata. Proof: Let us consider the cases of deque and queue automata. If the deque is restricted to use only one end for appending characters and the other end to delete characters then the machine is converted to a queue automaton [1]. So, if the machine is compelled to use only PushL,

INTERNATIONAL JOURNAL OF ELECTRICAL, ELECTRONICS AND COMPUTER SYSTEMS (IJEECS), volume 1, issue 1, MARCH 2011 www.ijeecs.org ISSN: 2221-7258(Print) ISSN: 2221-7266 (Online)

PopR and SenseR, then it is converted to the machine described in [1]. The operations of queue can be renamed: PushL as enqueue and PopR as dequeue operation in the converted machine. Similarly, in case of nDQA, if only three operations PushL, PopR and SenseR are used then it is converted to n-QA. The conversion may not be optimal. Hence QA are restrictions of DQA. In the same way, if it is compelled to use only (PushL, PopL, SenseR) or (PushR, PopR, SenseL) then the deque can be treated as PDA [2]. Similarly, in case of nDQA, if it is restricted to use only one end, it is con- verted to n-PDA. The operations of a stack can be re- named: PushL as push and PopL as pop operation. There is an informal way to proof the theorem. Any queue machine can be simulated using stack machine and vice versa [10]. DQA can be simulated using two queues or four stacks. Hence, QA and PDA are restric- tions of DQA. Theorem 2: Finite automata are restrictions of deque automata. Proof: It is to prove that, languages accepted by finite state machine are also accepted by DQA. There are two cases. Case 1: Deterministic Finite Automata There are two ways to prove this. First, every finite automaton can be viewed as a deque automaton having no operation on the deque. Let, M = ( K, Σ, δ, s, F ) be a DFA M´ = ( K, Σ, ζ, δ´, s, F ) be a deque automaton. To accept languages accepted by the DFA, the transition relation δ´ is defined as follows: δ´ = { ( ( p, u, e ) , ( q , e ) ) : ( p , u , q ) ∈ δ } There is another indirect way. As QA are restriction of DQA and DFA is restriction of QA [8], DFA are also restrictions of DQA. Case 2: Nondeterministic Finite Automata There is more than one way to prove. First, any NFA can be converted to an equivalent DFA and DFA are restrictions of DQA. So, NFA are also restriction of DQA. Again, NFA are restrictions of QA [1]. So, they are also restrictions of DQA. According to formal proof, Let, M = ( K, Σ, ∆, s, F ) be an NFA M´ = ( K, Σ, ζ, δ, s´, F´ ) be the equivalent DQA. So, K´ = 2K, though all the states may not be used. Let, for any state q ∈ K, E (q) is the set of all state(s) of M which are reachable from state q without consuming any input. E (q) = { p ∈ K : ( q , e, α ) (p,e,α) }

s´ = E (s)

F´ = { Q ⊆ K´ : Q ∩ F ≠ Ø } δ ( Q , a, α ) = U { ( r , a , α ) : p ∈ K and r ∈ E (p) and ( q , a , p ) ∈ ∆ for some q ∈ Q } Hence, FA is also restrictions of DQA. Lemma 1: FA with two semi-infinite i.e., nonreadable, non-writable tapes are restrictions of DQA. Proof: FA with readable and writable tapes is subclasses of DQA. If, the machine is further restricted that, it can’t read from or write onto the tape, it is definitely a subclass of the FA capable of reading and writing. That is why, FA with two semi-infinite tapes are restrictions of DQA. Theorem 3: DQA are computationally Turingequivalent. Proof: According to Minisky’s theorem, a finite state machine having two semi-infinite is Turing equivalent. As the machine is a restriction of DQA, it can be stated that, DQA are Turing equivalent. To simulate the above machine with DQA, the deque should be able to test whether any integer quantity equals to zero or not, increment, decrement and store it. Let, integer x denotes character X being x times in the deque. To check if x is zero the process is: first check if the deque is empty. If so, x is zero. Otherwise, search the deque for the character x by the process: first PushL a special character not in Σ (Let Y), then repeatedly SenseR until Y appears on the right. If x is not zero, then an X must be detected. At last, Y is deleted to keep the deque contents unchanged. There is another process too: PushL Y, repeatedly SenseL, PopR and PushL characters until the character Y appears on the left. The readers may verify other ways. To increment x, PushL or PushR an X into to the deque. Similarly, to decrement x the process is: first check if it is non-zero. If it is, repeat any one of the above process with the exception that, throw the first X that is sensed away without doing further operation with it. As a deque has the capability to operate as at least two stacks, it is Turing equivalent. Corollary 1: The set of languages accepted by DQA and TM is same. Proof: A DQA can be considered as a 2PDA (a PDA with 2 push down stacks). Any language accepted by a 2PDA can be accepted by some TM and any language ac-

INTERNATIONAL JOURNAL OF ELECTRICAL, ELECTRONICS AND COMPUTER SYSTEMS (IJEECS), volume 1, issue 1, MARCH 2011 www.ijeecs.org ISSN: 2221-7258(Print) ISSN: 2221-7266 (Online)

cepted by a TM can be accepted by some 2PDA [3]. Same is true for DQA. So it can be stated that DQA=TM. Theorem 4: There exists a two-stack automa- ton that can simulate a sequence of n deque operations in at most 4n stack operations. Proof: Let there be two stacks SL (Left stack) and SR (Right stack). Initially both the stacks are empty. Each PushL is transformed into a push on SL and PushR is trans- formed into a push on SR. To transform each PopR: first check if SR is empty. If not, then PopR is done by a pop from SR. If it is empty, transfer all the contents of SL to SR and then a pop from SR. The transfer of all contents from one stack to another is done by popping elements from SL and pushing it on SR. It is obvious that, the con- tents of the stacks are in correct order. Similarly, PopL is done in the same way except that; it transfers the contents of SR to SL (using the same man- ner). It can be easily verified that, the order of the con- tents remains correct for simulation. For each element in the stacks, the first operation is a push onto one of the stacks; the second is a pop from one of the stacks and the other two operations are a pop from one of the stacks and a push onto the other stack. Hence, with a two-stack automaton a sequence of n deque operations can be simulated in at most 4n stack operations. Theorem 5: There exists a two-queue and a temporary stack automaton that can simulate a sequence of n deque operations in at most 8n + 2 operations. Proof: Let there be two queues QL (Left queue) and QR (Right queue) and a temporary stack ST. Initially both the queues and the stack are empty. Each PushL is transformed into an enqueue operation on QL. Each PushR is transformed into an enqueue operation on QR. To transform each PopR: First check if QR is empty. If it is, then PopR is done by a dequeue operation from QL if it is not empty. If QR is not empty, transfer all the contents of QR to ST; and then a pop from ST. To retain the order of QR again: transfer all the contents of ST to QR; transfer of all contents from QR to ST; and finally, transfer all the contents from ST to QR. It is obvious that, the contents of the queues are again in the same order. Similarly, PopL is done in the same way: First check if QL is empty. If it is, then PopR is done by a dequeue operation from QR if it is not empty. If QL is not empty, transfer all the contents of QL to ST; and then

a pop from ST. To retain the order of QL again: transfer all the contents of ST to QL; transfer of all contents from QL to ST; and finally, transfer all the contents from ST to QL. It can be easily verified that, the order of the con- tents remains correct for simulation. For each element in the queues, there is at most 8n+2 operations (for a sequence of n deque operations): 1. enqueue operation into any one of the queue. 2. A sequence of eight operations (at most n times) a. dequeue from the queue b. push into the stack c. pop from the stack d. enqueue into the queue again e. dequeue from the queue f. push into the stack g. pop from the stack h. enqueue into the queue. 3. dequeue operation from the queue. Hence, with a two-queues and a temporary stack automaton a sequence of n deque operations can be simulated in at most 8n + 2 stack operations. Theorem 6: There exists a one-queue and two temporary stacks automaton that can simulate a sequence of n deque operations in at most 6n + 2 operations. Proof: Let there be a queue Q and two stacks S1 and S2. Ini- tially all are empty. Each PushL and PopR are transformed into enqueue and dequeue operation respectively on Q. To transform each PushR: Transform all contents of the Q to S1, enqueue(the element to be added on the right) on Q, transfer all elements of S1 to S2, and transfer S2 to Q. To transform each PopL: Transform all contents of the Q to S1, pop from S1, transfer all elements of S1 to S2, and transfer S2 to Q. The order of elements remains same in both cases. For each element in the queues, there is at most 6n+2 operations (for a sequence of n deque operations): 1. enqueue operation into the queue. 2. A sequence of six operations (at most n times) a. dequeue from the queue b. push into the stack S1 c. pop from the stack S1 d. push into the stack S2 e. pop from the stack S2 f. enqueue into the queue. 3. dequeue operation from the queue. Hence, with a queue and two temporary stacks automaton a sequence of n deque operations can be simulated in at most 6n + 2 stack operations.

INTERNATIONAL JOURNAL OF ELECTRICAL, ELECTRONICS AND COMPUTER SYSTEMS (IJEECS), volume 1, issue 1, MARCH 2011 www.ijeecs.org ISSN: 2221-7258(Print) ISSN: 2221-7266 (Online)

VII. SIMULATION OF DQA Let us construct a dequeue to accept L={anbncn : a, b,

c∈ ∑ } For example, aaabbbccc ∈ L but the string abccc Let,

L.

M=(K,∑ ,ζ,δ,s,F) K = { s , s1 , s2 , s3 , f } ∑= { a , b , c } ζ={a,b,c,d} F={f}

δ has a.

( ( s, e, e ), ( s1, d ) )

b.

( ( s1, a, d ), ( s1, da ) )

c.

( ( s1, a, dα ), ( s1, dα a ) )

d. e. f. g. h.

f. ( ( r , e , e ) , ( f , e ) ) For example, for w = ababbaba, it can be stepped as ( s , ababbaba , e ) ( s , babbaba , a ) ( s , abbaba , ba ) ( s , bbaba , aba ) ( s , baba , baba ) ( r , baba , baba ) ( r , aba , aba ) ( r , ba , ba ) (r,a,a) (r,e,e) (f,e,e) As ( s , ababbaba , e ) ( f , e , e ) so, ababbaba

∈ L.

VIII. CONCLUSION In this paper, the priority of deque automata with other automata is described. Recent researches are go- ing on with deque of deque to find the intersection be- tween deque automata, formal and context free lan- guages. Throughout the paper, the restrictions of deque automata and thus the languages recognized by DQA is discussed. We provide some lower bounds for conver- sion between different memory automata but there is no upper bound here.

( ( s1, b, dα ), ( s2, bdα ) )

( ( s2, b, β dα ), ( s2, bβ dα ) () ( s2, e, bβ dα a ), ( s2,

(bβ( sd2,αc, )b)β d ), ( s3, bβ dc ) ) ( ( s3, c, β dγ ), ( s3, β dγc ) )

i.

( ( s3, e, bβ dγc ), ( s3, β dγc )

j.

() ( s3, e, dγc ), ( s3, dγ ) )

k. ( ( s3, e, d ), ( f, e ) ) here α ∈ a*, β ∈ b*, γ ∈ c* For example, for aabbcc, it can be stepped as: ( s, aabbcc, e ) ( s1, aabbcc, d ) ( s1, abbcc, da ) ( s1, bbcc, daa) ( s2, bcc, bdaa) ( s2, bcc, bda ) ( s2, cc, bbda ) ( s2, cc, bbd ) ( s 3, c, bbdc) ( s3, c, bdc) ( s3, e, bdcc) ( s 3, e, dcc) ( s3, e, dc ) (s3, e, d) (f, e, e). Since ( s, aabbcc, e ) ( f, e, e ) so, aabbcc ∈ L. Again for a second example, let us construct an automaton for L = { wwr : w ∈ { a, b }* and a, b ∈ ∑ } For example, ababbaba ∈ L but the string abababab L. Let, M=(K,∑ ,ζ,δ,s,F) K={s,r,f} ∑ ={a,b} ζ={a,b} F={f} δ has a. ( ( s , a , e ) , ( s , a ) ) b. ( ( s , b , e ) , ( s , b ) ) c. ( ( s , e , e ) , ( r , e ) ) d. ( ( r , a , a ) , ( r , e ) ) e. ( ( r , b , b ) , ( r , e ) )

REFERENCES [1]

Bhattacharjee, A., and Debnath, B. K., “Queue Automata”, International Conference on Computer and Information Technology, BD, 2004, 716-718. [2] Papadimitriou, C. H., and Lewis, H. R., Elements of the theory of computation, 2nd ed., PrenticeHall International, Inc., Upper Saddle River, NZ, 2003. [3] Aho, A. V., Ullman, J. D., Theory of Computation, 2nd ed., Prentice-Hall International, Inc., Upper Saddle River, NZ, 2003. [4] Ginsburg, S., “Example of abstract machines”, IEEE Transactions on Electronic Computers, EC11, 1962, pp. 2. [5] Robin, M. O., and Scott, D., “Finite automata and their decision problems”, IBM Journal of Research and Development, CA, 1959, pp. 3. [6] Schuzenjberger, M. P., “Context free languages and pushdown automata”, Information and control, 1963, pp. 3-6. [7] Aho, A. V., Sethi, R., Ullman, J. D., Compilers Principles, 3rd ed., Addison-Wesley, Singapore, 2002. [8] Rosenberg, B., “Fast Nondeterministic Recognition of Context-free Languages using two queues”, University of Miami, 2000. [9] Martin John C., Introduction to language and the theory of computation, 2nd ed., Prentice-Hall International, Inc., McGraw-Hill, USA, 2002. [10] Rosenberg, B., “Simulating a stack by queues”, University of Miami, 2000.

dqa: automata with new memory, properties and ...

Conversions between different types of storage and DQA are shown ..... ( s3, c, bdc). ( s3, e, bdcc). ( s3, e, dcc). ( s3, e, dc ) (s3, e, d). (f, e, e). Since ( s, aabbcc, e ).

208KB Sizes 1 Downloads 147 Views

Recommend Documents

Statistical Properties and Memory of Excursions in ...
The correlation method applied to the return intervals shows a weak correlation for both groups with changes as the threshold q increases. The DFA analysis.

Statistical Properties and Memory of Excursions in ...
statistics of return intervals between long excursions above ... The DFA analysis confirms the presence ... behavior (shuffled records) is observed in original data.

Statistical Properties and Memory of Excursions in ...
cial indexes [13], x-ray solar flares [14], climate records. [15], or even long heartbeat ..... invariance in the nonstationarity of human heat rate. Phys. Rev Lett 2001 ...

Read New PDF Automata, Computability and ...
design, compilers, software ... intelligence, game playing, ... Computation has long been deriving force in the development of mathematics in general and in ...

Practical Memory Checking with Dr. Memory - BurningCutlery
call, which is not easy to obtain for proprietary systems like Windows. ..... Dr. Memory, as there is no way for the application to free this memory: it has lost ..... used by a program,” in Proc. of the 3rd International Conference on. Virtual Exe

Practical Memory Checking with Dr. Memory - BurningCutlery
gramming bugs. These errors include use of memory after free- .... redirected through a software code cache by the DynamoRIO dynamic binary translator.

Factor Automata of Automata and Applications - NYU Computer Science
file, for a large set of strings represented by a finite automaton. ..... suffix-unique, each string accepted by A must end with a distinct symbol ai, i = 1,...,Nstr. Each ...

Grammars and Pushdown Automata - GitHub
A −→ bA | ε ..... Fundamentals of Theoretical Computer Science. ... Foundations of Computer Science, pages 371–382, San Juan, Puerto Rico, October 1979.

2001_C_a_pacrim_fly_ash_Mechanical Properties of Concrete with ...
2001_C_a_pacrim_fly_ash_Mechanical Properties of Concrete with Flyash.pdf. 2001_C_a_pacrim_fly_ash_Mechanical Properties of Concrete with Flyash.pdf.

Preparation and properties of new cross-linked ...
of a Universal tensile machine (Instron model 5565, Lloyd) at a full-out velocity of 50 mm min. −1 ... DSC data for PUA with different LiClO4 concentration. Film. Tg SS (◦C). Tg/ C (◦C ..... The cycleability is good and the recovery of lithium

Preparation and properties of new cross-linked ...
soft and hard segments of the host polymer are observed for the PUA ... and thermogravimetric analysis measurements support the formation of different types of ...

Wolfram, Cellular Automata and Complexity, Collected Papers.pdf ...
Wolfram, Cellular Automata and Complexity, Collected Papers.pdf. Wolfram, Cellular Automata and Complexity, Collected Papers.pdf. Open. Extract. Open with.