Mikołaj Bojańczyk

Here we show that two-way automata and register automata describe the same functions from words to words.

Theorem. The following devices recognise the same partial functions from words to words:

  1.  deterministic two-way automaton with output
  2. deterministic register automaton with regular lookahead.

Note that we have already claimed (but not proved) that for deterministic register automata, the regular lookahead can be removed.


From register automata to two-way automata

Let us show the implication from 2 to 1, i.e. how to convert a deterministic register automaton with regular lookahead. Recall that in a register automaton with registers R and output alphabet \Gamma, a register update is a function R \to (R \cup \Gamma)^*. We draw a register update like this:

In the above picture, we assume that the inputs to the registers are read from top to bottom, formally speaking we would need to specify an ordering on the incoming edges for every register name at the right. When it reads an input word, the register automaton executes a sequence of register updates, as in the following picture:

In the above picture, we assume that there is a single designated output register, and the output produced by the automaton is simply the contents of this output register at the end of the run. This assumption can be made when regular lookahead is available. Let \Delta be the finite set of register operations that can be triggered by individual transition. Therefore a run of the register automaton can be viewed as transforming an input word into a word over \Delta^*.

Lemma 1. There is an NFA with output which takes an input word to the sequence of register updates that it triggers.

Proof. Just by simulating the automaton and using nondeterminism to guess the run of the regular lookahead. \Box

Lemma 2. If f : \Sigma^* \to \Delta^* is recognised by an NFA with output and g : \Delta^* \to \Gamma^* is recognised by a deterministic two-way automaton, then their composition g \circ f is recognised by a deterministic two-way automaton.

Proof. Recall that NFA with output are equivalent to Eilenberg bimachines. An Eilenberg bimachine is the same thing as an oracle in a deterministic two-way automaton, and therefore g \circ f is recognised by a deterministic two-way automaton with an oracle. Then, the oracle can be removed. \Box

Combining Lemmas 1 and 2 above, in order to show that a register automaton can be simulated by a deterministic two-way automaton, it suffices to show that there is a deterministic two-way automaton which inputs a sequence of register updates, and which outputs the contents of the designated output register at the end. The automaton views the register operations are a graph, where the vertices are pairs (x,r) where x is a position in the input word and r is a register name.  This graph is a tree, thanks to the copylesss assumption. The two-way automaton begins by going to (x,r) where x is the last position and r is the designated output register. Then it does a depth-first search traversal through the tree, outputting letters during this run. In order to do this, the automaton needs to only remember the current register r and the edge of the tree that was previously processed, as in the following picture:

 


From two-way automata to register automata

The idea is classical, dating back to the proof of Rabin and Scott that two-way automata (as accept/reject devices) can be made one way. Suppose that we have read a prefix of the input word. We need to remember what are the outputs that are produced by the two-way automaton on: a) the unique from the initial configuration to the first time that it reaches the current position; and b) runs that begin and end in the current position. Here is a picture:

More formally, one can describe the situation after reading a prefix w of the input by a function

    \[f_w : Q \cup \set{\mbox{initial}} \to Q \cup \set{\mbox{reject}} \cup  (\Gamma^* \times (Q \cup \set{\mbox{accept}}))\]

whose definition is according to the picture above. The natural idea would be to store, for each argument of the above function, the value of the function. The state of the transducer would be used to store the finite part of the function, and the registers (one for each argument) would be used to store the output words used in the function. The problem with this idea is that it would lead to register updates that are not copyless. This problem would arise if there would be two transitions that move to the left and lead to the same target state, as in the following picture:

In such a situation, the register corresponding to state r would need to be used twice in the register update. The solution to this observation is that in an actual accepting run of the two-way automaton, only one of the transitions would be used. The reason is that if both transitions would be used, then the automaton would enter a loop. To use this observation, we use the following lemma, whose straightforward proof is omitted.

Lemma. Consider a deterministic two-way automaton with input alphabet \Sigma and states Q. Consider the function g : \Sigma^* \to (\Sigma \times \mathsf{P}(Q))^* which additionally labels each input position by the set of states used by (the unique) accepting run of the automaton in that position. Then g is recognised by an NFA with output.

Register automata with regular lookahead are closed under precomposing with functions computed by NFA with output; for this one convert the NFA with output into a lookahead DFA with output, and then use the regular lookahead of the register automaton. Therefore, we can assume that a register automaton has access to the states in the accepting run (possibly none if there is no accepting states). It can then compute the function f_w with its domain restricted to states used in the accepting run; and here the natural construction works because it is copyless.

 

 

COMMENTS

StephenJem

December 7, 2023

I'm in dote on with the cbd products and https://organicbodyessentials.com/products/cbd-gummies-750mg ! The serum gave my epidermis a youthful rise, and the lip balm kept my lips hydrated all day. Knowing I'm using moral, natural products makes me quality great. These are now my must-haves in support of a fresh and nourished look!

Push it to the limit cool Wolf! You are the best and you can do everything! It'll all work out very very very soon! https://www.samsung.com smkmkplobydlmcrjmzgvx 1865523

October 1, 2023

Push it to the limit cool Wolf! You are the best and you can do everything! It'll all work out very very very soon! https://www.samsung.com smkmkplobydlmcrjmzgvx

Thank you For your hard work over the years! For this, we give you the opportunity. https://google.com#1234567890 For more information, see the instructions. skfhjvkjsdjsrbhvbsrfhkis 1860813

September 7, 2023

Thank you For your hard work over the years! For this, we give you the opportunity. https://google.com#1234567890 For more information, see the instructions. skfhjvkjsdjsrbhvbsrfhkis

HenryRaf

August 17, 2023

CBD, or cannabidiol, has been a fight changer because me. https://mjcbdd.com/products/mjcbd-afghan-delta-8-gummies-1000mg-4ct-250mg-per-gummy-rainbow I've struggled with observe in bring back years and unthreatened tried various conflicting medications, but nothing has worked as well as CBD. It helps me to be peacetime and devil-may-care without any side effects. I also return to bearable that it helps with be in the arms of morpheus and affect management. I've tried individual brands, but I've institute that the ones that are lab tested and purchase a high-minded notorious are the most effective. Encyclopedic, I importantly tout CBD representing anyone who struggles with anxiety, descend issues, or inveterate pain.

Push it to the limit cool Wolf you are the best and you can do everything https://www.samsung.com smkmkplobydlmcrjmzgvx 4807013

August 1, 2023

Push it to the limit cool Wolf you are the best and you can do everything https://www.samsung.com smkmkplobydlmcrjmzgvx

DonaldHER

April 4, 2023

I recently hired a contractor on some like Mr. Water heater inc, Bend, OR home renovations, and I ought to say that I am damned pleased with their work. They were authority, prompt, and went above and beyond to secure that the aggregate was done to my satisfaction. They were also very communicative from the beginning to the end of the entire approach, keeping me educated of any issues that arose and addressing them promptly. All-embracing, I praisefully endorse this contractor to anyone in need of quality workmanship and exceptional fellow service. Recognition you!

Krzysztof

January 30, 2017

Tu jest pusto.

Leave a Reply

Your email address will not be published.