{"id":10601,"date":"2017-03-29T13:44:39","date_gmt":"2017-03-29T13:44:39","guid":{"rendered":"https:\/\/www.techopedia.com\/definition\/non-deterministic-algorithm\/"},"modified":"2019-08-29T17:08:36","modified_gmt":"2019-08-29T17:08:36","slug":"non-deterministic-algorithm","status":"publish","type":"definition","link":"https:\/\/www.techopedia.com\/definition\/24618\/non-deterministic-algorithm","title":{"rendered":"Non-Deterministic Algorithm"},"content":{"rendered":"
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.<\/p>\n
Non-deterministic algorithms are useful for finding approximate solutions, when an exact solution is difficult or expensive to derive using a deterministic algorithm.<\/p>\n
One example of a non-deterministic algorithm is the execution of concurrent algorithms with race conditions, which can exhibit different outputs on different runs. Unlike a deterministic algorithm which travels a single path from input to output, a non-deterministic algorithm can take many paths, with some arriving at the same outputs, and others arriving at different outputs. This feature is mathematically used in non-deterministic computation models like non-deterministic finite automaton.<\/p>\n
A non-deterministic algorithm is capable of execution on a deterministic computer which has an unlimited number of parallel processors. A non-deterministic algorithm usually has two phases and output steps. The first phase is the guessing phase, which makes use of arbitrary characters to run the problem.<\/p>\n
The second phase is the verifying phase, which returns true or false for the chosen string. There are many problems which can be conceptualized with help of non-deterministic algorithms including the unresolved problem of P vs NP in computing theory.<\/p>\n
Non-deterministic algorithms are used in solving problems which allow multiple outcomes. Every outcome the non-deterministic algorithm produces is valid, regardless of the choices made by the algorithm during execution.<\/p>\n","protected":false},"excerpt":{"rendered":"
What Does Non-Deterministic Algorithm Mean? 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. Non-deterministic algorithms are useful for […]<\/p>\n","protected":false},"author":7813,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"_lmt_disableupdate":"","_lmt_disable":"","om_disable_all_campaigns":false,"footnotes":""},"definitioncat":[241,216],"class_list":["post-10601","definition","type-definition","status-publish","format-standard","hentry","definitioncat-computer-science","definitioncat-software-development"],"acf":[],"yoast_head":"\n