Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does backtracking make an algorithm non-deterministic?

So I've had at least two professors mention that backtracking makes an algorithm non-deterministic without giving too much explanation into why that is. I think I understand how this happens, but I have trouble putting it into words. Could somebody give me a concise explanation of the reason for this?

like image 898
Jason Baker Avatar asked Feb 01 '09 05:02

Jason Baker


People also ask

What makes algorithms non-deterministic?

A non-deterministic algorithm can provide different outputs for the same input on different executions. Unlike a deterministic algorithm which produces only a single output for the same input even on different runs, a non-deterministic algorithm travels in various routes to arrive at the different outcomes.

What is the difference between deterministic and nondeterministic algorithm?

In deterministic algorithm the path of execution for algorithm is same in every execution. On other hand in case of Non-Deterministic algorithm the path of execution is not same for algorithm in every execution and could take any random path for its execution.

What is the difference between deterministic and nondeterministic Turing machine?

In a deterministic Turing machine, the set of rules impose at most one action to be performed for any given situation. In a nondeterministic Turing machine, it may have a set of rules that prescribes more than one action for a given situation.

How do deterministic algorithms work?

A deterministic algorithm is an algorithm that is purely determined by its inputs, where no randomness is involved in the model. Deterministic algorithms will always come up with the same result given the same inputs.


1 Answers

It's not so much the case that backtracking makes an algorithm non-deterministic.

Rather, you usually need backtracking to process a non-deterministic algorithm, since (by the definition of non-deterministic) you don't know which path to take at a particular time in your processing, but instead you must try several.

like image 76
Mark Harrison Avatar answered Sep 29 '22 17:09

Mark Harrison