<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.sarg.dev/index.php?action=history&amp;feed=atom&amp;title=Nondeterministic_algorithm</id>
	<title>Nondeterministic algorithm - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sarg.dev/index.php?action=history&amp;feed=atom&amp;title=Nondeterministic_algorithm"/>
	<link rel="alternate" type="text/html" href="https://wiki.sarg.dev/index.php?title=Nondeterministic_algorithm&amp;action=history"/>
	<updated>2026-04-06T07:26:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wiki.sarg.dev/index.php?title=Nondeterministic_algorithm&amp;diff=398195&amp;oldid=prev</id>
		<title>imported&gt;Tpreu: /* History */ Added a paragraph on the history of randomized algorithms.</title>
		<link rel="alternate" type="text/html" href="https://wiki.sarg.dev/index.php?title=Nondeterministic_algorithm&amp;diff=398195&amp;oldid=prev"/>
		<updated>2025-11-08T18:05:12Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;History: &lt;/span&gt; Added a paragraph on the history of randomized algorithms.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{short description|Algorithm whose behavior and output may depend on the run}}&lt;br /&gt;
In [[computer science]] and [[computer programming]], a &amp;#039;&amp;#039;&amp;#039;nondeterministic algorithm&amp;#039;&amp;#039;&amp;#039; is an [[algorithm]] that, even for the same input, can exhibit different behaviors on different runs, as opposed to a [[deterministic algorithm]].&lt;br /&gt;
&lt;br /&gt;
Different [[model of computation|models of computation]] give rise to different reasons that an algorithm may be non-deterministic, and different ways to evaluate its performance or correctness:&lt;br /&gt;
*A [[concurrent algorithm]] can perform differently on different runs due to a [[race condition]]. This can happen even with a single-threaded algorithm when it interacts with resources external to it. In general, such an algorithm is considered to perform correctly only when &amp;#039;&amp;#039;all&amp;#039;&amp;#039; possible runs produce the desired results.&lt;br /&gt;
*A [[probabilistic algorithm]]&amp;#039;s behavior depends on a [[random number generator]] called by the algorithm. These are subdivided into [[Las Vegas algorithm]]s, for which (like concurrent algorithms) all runs must produce correct output, and [[Monte Carlo algorithm]]s which are allowed to fail or produce incorrect results with low probability. The performance of such an algorithm is often measured probabilistically, for instance using an analysis of its [[expected time]].&lt;br /&gt;
*In [[computational complexity theory]], nondeterminism is often modeled using an explicit mechanism for making a nondeterministic choice, such as in a [[nondeterministic Turing machine]]. For these models, a nondeterministic algorithm is considered to perform correctly when, for each input, &amp;#039;&amp;#039;there exists&amp;#039;&amp;#039; a run that produces the desired result, even when other runs produce incorrect results. This existential power makes nondeterministic algorithms of this sort more efficient than known deterministic algorithms for many problems. The [[P versus NP problem]] encapsulates this conjectured greater efficiency available to nondeterministic algorithms. Algorithms of this sort are used to define [[complexity class]]es based on [[nondeterministic time]] and [[nondeterministic space]] complexity. They may be simulated using [[nondeterministic programming]], a method for specifying nondeterministic algorithms and searching for the choices that lead to a correct run, often using a [[backtracking search]].&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
[[Randomized_algorithm#Early_history|Explicit algorithms using randomness]] were considered before formalizing the concept of nondeterminism in computer science. &lt;br /&gt;
In 1917, [[Henry Cabourn Pocklington|Henry C. Pocklington]] introduced a randomized algorithm known as [[Pocklington&amp;#039;s algorithm]] for efficiently finding [[square root]]s modulo prime numbers.&amp;lt;ref&amp;gt;{{citation |last1=Williams |first1=H. C. |title=Mathematics of Computation 1943–1993: a half-century of computational mathematics; Papers from the Symposium on Numerical Analysis and the Minisymposium on Computational Number Theory held in Vancouver, British Columbia, August 9–13, 1993 |volume=48 |pages=481–531 |year=1994 |editor-last=Gautschi |editor-first=Walter |series=Proceedings of Symposia in Applied Mathematics |contribution=Factoring integers before computers |publisher=Amer. Math. Soc., Providence, RI |doi=10.1090/psapm/048/1314885 |mr=1314885 |last2=Shallit |first2=J. O. |isbn=978-0-8218-0291-5 |author1-link=Hugh C. Williams |author2-link=Jeffrey Shallit}}; see p. 504, &amp;quot;Perhaps Pocklington also deserves credit as the inventor of the randomized algorithm&amp;quot;.&amp;lt;/ref&amp;gt; &lt;br /&gt;
In the 1930s, [[Enrico Fermi]] experimented with the [[Monte Carlo method]] while studying neutron diffusion, but he did not publish this work.&amp;lt;ref&amp;gt;{{cite journal |last = Metropolis |first = N. |author-link = Nicholas Metropolis |url = http://library.lanl.gov/cgi-bin/getfile?15-12.pdf |title = The beginning of the Monte Carlo method |journal = Los Alamos Science |issue = 1987 Special Issue dedicated to Stanislaw Ulam |pages = 125–130 |year = 1987 }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
[[Monte_Carlo_method#History|Scientists at the Los Alamos National Laboratory]] in the 1940s and 50s developed and implemented the concept leading to the first publications concerned with Monte Carlo algorithms.&amp;lt;ref&amp;gt;{{cite journal |last1 = Metropolis |first1 = N. |author1-link = Nicholas Metropolis |last2 = Ulam |first2 = S. |author-link2=Stanislaw Ulam |year=1949 |title = The Monte Carlo Method |journal = Journal of the American Statistical Association |volume=44 |issue=247 |pages=335–341 |doi = 10.1080/01621459.1949.10483310 |pmid=18139350 |jstor=2280232 }}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite journal |last1 = Metropolis |first1 = N. |author1-link = Nicholas Metropolis |last2=Rosenbluth |first2=Arianna W.|last3=Rosenbluth |first3=Marshall N. |last4=Teller |first4=Augusta H. |last5=Teller |first5=Edward |year=1953 |title=Equation of State Calculations by Fast Computing Machines |journal=Journal of Chemical Physics |volume=21 |issue=6 |page=1087 |doi = 10.1063/1.1699114 |bibcode = 1953JChPh..21.1087M |title-link = Equation of State Calculations by Fast Computing Machines |osti = 4390578 |s2cid = 1046577 }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Michael O. Rabin]] and [[Dana Scott]] introduced and formalized [[Nondeterministic finite automaton|nondeterministic finite automatons]] (NFA) in 1959.&amp;lt;ref&amp;gt;{{cite journal |doi=10.1147/rd.32.0114 |last1=Rabin |first1=M. O. |last2=Scott |first2=D. |title=Finite Automata and Their Decision Problems |journal=IBM Journal of Research and Development |volume=3 |issue=2 |pages=114–125 |date=April 1959 }}&amp;lt;/ref&amp;gt; In that paper they show the equivalence to [[Deterministic finite automaton|deterministic finite automatons]] (DFA) in terms of the ability to recognize languages. They also apply them to [[Turing machine|Turing machines]] (TM) thereby introducing [[Nondeterministic Turing machine|nondeterministic Turing machines]] (NTM). Using NFAs they could reprove  in a more streamlined way certain closure properties of [[regular language|regular languages]] previously established by [[Stephen C. Kleene]] and others.&lt;br /&gt;
&lt;br /&gt;
The term &amp;#039;&amp;#039;nondeterministic algorithm&amp;#039;&amp;#039; was used by [[Robert W. Floyd]] as early as 1967.&amp;lt;ref&amp;gt;&lt;br /&gt;
{{cite journal&lt;br /&gt;
| title = Nondeterministic Algorithms&lt;br /&gt;
| author = Robert W.Floyd&lt;br /&gt;
| journal = [[Journal of the ACM]]&lt;br /&gt;
| volume = 14&lt;br /&gt;
| number = 4&lt;br /&gt;
|date=October 1967&lt;br /&gt;
| pages = 636–644&lt;br /&gt;
| doi = 10.1145/321420.321422&lt;br /&gt;
| s2cid = 1990464&lt;br /&gt;
| doi-access = free&lt;br /&gt;
}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
The paper uses the graphical language of [[flow chart|flow charts]] which is a different way to formalize algorithms compared to automata or Turing machines and at that time was closer to the practice of programming on electronic computers.&lt;br /&gt;
&lt;br /&gt;
In [[philosophy]] ideas revolving around [[Determinism#History|determinism]] vs. [[Free_will#History_of_free_will|free will]] go back at least to ancient Greece. It is worth noting that nondeterminacy as a concept in computer science refers to a rather limited choice between previously explicitly defined, often only finitely many options in each computational step, while in philosophy the possible options do not necessarily have to be laid out or formally defined beforehand. In particular because of this additional property nondeterminism in computer science constitutes a new development compared to nondeterminism in traditional philosophy.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
{{reflist}}&lt;br /&gt;
&lt;br /&gt;
==Further reading==&lt;br /&gt;
*{{cite book | title = Introduction to Algorithms |edition=3rd | author = Cormen, Thomas H. |year=2009 |publisher=MIT Press | isbn = 978-0-262-03384-8}}&lt;br /&gt;
*{{cite web | url = http://xlinux.nist.gov/dads/HTML/nondetermAlgo.html | title = Nondeterministic algorithm | publisher = National Institute of Standards and Technology |access-date=July 7, 2013}}&lt;br /&gt;
*{{cite web | url = http://cs.nyu.edu/courses/spring03/G22.2560-001/nondet.html | title = Non-deterministic Algorithms |publisher=New York University Computer Science |access-date=July 7, 2013}}&lt;br /&gt;
&lt;br /&gt;
{{DEFAULTSORT:Nondeterministic Algorithm}}&lt;br /&gt;
[[Category:Computational complexity theory]]&lt;br /&gt;
[[Category:Theory of computation]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Tpreu</name></author>
	</entry>
</feed>