• No results found

A NONDETERMINISTIC TURING MACHINE FOR A GNMA

Let us suppose that we have a Genuine Nondeterministic Markov Algorithm, "GNMA", defined as:

GNMA = (Z,A,F)

where it is the case that the sets E,A,P are the same with those involved in the definition of the MA for which the equivalent Turing Machine TM was constructed (in the previous chapter).

(It should be remembered that the. Alphabet A = {a^ja^, . . . ,aj^} has K elements and that the number of MA rules is n. We adopt the

same convention here, for GNMA,)

Now for this given GNMA, we will construct a Nondeterministic Turing Machine, "NTM", in a way similar to the one we employed in constructing the TM equivalent to a given MA in the previous chapter

Thus we define NTM as a system: NTM =

where: F is the same finite set as in the case of TM. F is the same one element set, as in the case of

TM, comprising the unique NTM’s final state. = KU{Q(i,-l)/Vi ; o^i<n },

where: K is the set of states of TM and n the number of rules of MÂ and GNMA.

Ô = (Ô-Ô )U6 N .u' a

where: 6 is the mapping function, that is the set of mov es of TM.

Ô is a subset of 6 not included in 8.,. u N 6 is a subset of a N not included in 6.

5.1 Definition of sets 6 and 8J___________________ u______a__

The following moves, unwanted for NTM, are the only elements of

8

:

u

1. 8{Q(i,w.),0h} = {Q(8^,0),0^,R} , V i : OGi<n

where = T^ if j LHS^ j < Î RHS^ | , and Q = Y otherwise.

(If however we want to construct a Labelled GNMA, we do not exclude the moves of type 1 but we modify them to:

8{Q(i,w\),0.} = {Q([0,l,2,...,n-T] ,0),^^. ,R} ).

2. 8{Q(i,w\+l),T^} = {Q(i+1,0),T.|^,R} V i : 0$i<n-l 3. 8{Q(n-l,w+l^),T^_^} = {Q(n+2,0),S,R}

The number of moves of type 1 which immediately follow upon the application of each rule i, is n; (V i:0^i<n-l).

The number of moves of type 2 which immediately follow upon the applicability search for an inapplicable rule i is n-1.

The move of type three is a single move.

The following moves included in 6^, in addition to (8-8 ), are

the only elements of 8 ;

a

V i : 0^i<n Nl.a ; 8{Q(i,w\),a.} = {Q(6,-1),T ,%} V6 : Og8<n

= T. if ILHS.I^[RHS.j and = "Y" otherwise,

1 1 ' 1 ' ‘ 1 ‘ 1

V i : 0.<i<n Nl.b : 8{Q(i,wj),0.} = {Q(0,O) ,Tq,R) V0 : O^0<n

and with with same as above.

V i ; 0^i<n N2.3.a: 8{q(i,w+l),T.} = {Q (0,-1),T^,R> V0 O^0<n

V i ; 0^i<n

N2,3,b: 8{Q(i,w+l),T^} = {Q(0,0) ,T^ ,r} V 0 ; o<0<n

In all the above moves 0 is the next rule tested and since it does not depend on the previously applied or tested rule (as in moves of type 1,2,3), it is to be chosen arbitrarily.

2 The number of moves of each of the above sets is nxn., that is n , as can be easily seen.

As can also be seen, if the moves of the sets Nl.a and N2.3.a are the ones chosen by NTM, then the applicability search for rule i will not.start from the square with the first'character of the

string, whereas if the moves of the sets Nl.b and N2.3.b are those chosen, the applicability search for rule i will start with the first character of the string.

The following moves are also included in 6^: N4.a; ô{Q(i,-l),Ç} = {Q(i,™1) , r}

N4.b: 8{Q(i,-1),Ç} - {Q(i,0);^,R}

N4.C: 6{Q(i,-l),B} = {Q(i,w+l),B,h} where ÇeA , (A = {a^ja^,...,a^}) and 0^i<n.

The number of moves for sets N4.a and N4.b is n%K, and for set N4.C is n.

The states Q(i,~l), (0^i<n), are right moving states and they can bring the head of TM in any arbitrary position between the square with a T^ and the first blank square (included). Whenever NTM changes its state to Q(i,0), (before a blank square has been scanned by its head), with its head scanning a certain square of the tape (lying between the square with T^ and the first blank square), the applicability search for rule i will start from this square of the tape. In the case in which TM remains in state Q(i,~l) until its head scans the first blank square, it will change

state to Q(i,w+1), (a state which actually means inapplicability of rule i) and will drive its head to the square with the T^.

Adding to the above that NTM will terminate only if it is in its final state, we complete the definition of NTM.

5.2 Equivalence of NTM and GNMA

In the first chapter a Deterministic Turing Machine TM was constructed so as to simulate a Deterministic Markov Algorithm MA. The proof of equivalence between GNMA and NTM is very similar

to the proof (given in the first chapter) of equivalence between MA and TM. Thus we can state now that "For every Genuine Non-

deterministic Markov Algorithm there is a Nondeterministic Turing Machine capable of doing exactly what the Genuine Nondeterministic Markov Algorithm can do and no more".

6. A NONDETERMINISTIC MARKOV ALGORITHM FOR A NONDETERMINISTIC