Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does a non deterministic turing machine work?

I understand they aren't real and they seem to branch computation whenever there are 2 options, instead of picking one. But, for example, if I say this:

"Non deterministically guess a bijection p of vertices from Graph G to Graph H" (context here is Graph Isomorphism)

What is that supposed to mean? I understand the bijection, but it says "non deterministically guess". If it's guessing, how is that an algorithmic approach? How can it guarantee it's going to work?

like image 794
they changed my name Avatar asked Jan 25 '10 14:01

they changed my name


People also ask

Can a Turing machine be non-deterministic?

A non-deterministic Turing Machine is called a decider if all branches halt on all inputs. If, for some input, all branches are rejected, then the input is rejected.

Is a nondeterministic Turing machine more powerful?

Quite surprisingly, the deterministic and non-deterministic Turing machines are the same in power. Note: If a nondeterministic Turing machine accepts a language L, then there is a deterministic Turing machine that also accepts L.


2 Answers

They don't, they just sort of illustrate a point. Basically what they do is guess an answer, and check if it's right(deterministically). It's not the guessing the answer part that's important though, it's checking that the answer is right. It's just like saying given an arbitrary solution, is it correct? So for example there are problems that take exponential time to compute, and some of their answers can be checked in polynomial time, but some can't. So what the non-deterministic TM does is it divides those two, the ones that can be checked quickly from the ones that can't. And then this brings up the bigger question, if one group of questions solutions can be verified much quicker than another, can their solutions also be generated quicker? This question hasn't been answered, yet.

like image 57
kyle Avatar answered Oct 05 '22 04:10

kyle


There's different ways to picture one. One I find useful is the oracle model. Did you ever see the Far Side cartoon where a derivation on the blackboard has "Here a miracle occurs" as one of the intermediate steps? In this version of a NDTM, when you need to choose something, the oracle writes the correct version on the right part of the tape. (This is taken from Garey and Johnson, Computers and Intractability, their classic book on NP-complete problems.) You aren't allowed to assume you've got the right one, though, and there may not be a correct one.

Therefore, when you non-deterministically guess a bijection, you're getting the correct bijection for your purposes, provided one exists.

It isn't a good basis for an algorithm, since the complexity of implementing a non-deterministic Turing machine is basically exponential in the nondeterministic states, and the algorithmic equivalent of the nondeterministic guess is to try every possible bijection.

From a theoretical point of view, I'd translate it as "If there is a bijection such that....". From an algorithmic point of view, find another book, or another chapter of the same book, since that approach is useless for even moderately large graphs.

like image 33
David Thornley Avatar answered Oct 05 '22 05:10

David Thornley