Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Oracle machine
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|Abstract machine used to study decision problems}} {{for|computing equipment sold by Oracle Corporation|Oracle Corporation#Hardware}} {{More footnotes needed|date=October 2023}} {{Use dmy dates|date=October 2023}} {{Black-box}} In [[computational complexity theory|complexity theory]] and [[computability theory]], an '''oracle machine''' is an [[abstract machine]] used to study [[decision problem]]s. It can be visualized as a [[black box]], called an '''oracle''', which is able to solve certain problems in a single operation. The problem can be of any [[complexity class]]. Even [[undecidable problem]]s, such as the [[halting problem]], can be used. == Oracles == An oracle machine can be conceived as a [[Turing machine]] connected to an '''oracle'''. The oracle, in this context, is an entity capable of solving some problem, which for example may be a [[decision problem]] or a [[function problem]]. The problem does not have to be computable; the oracle is not assumed to be a Turing machine or computer program. The oracle is simply a "[[black box]]" that is able to produce a solution for any instance of a given [[computational problem]]: * A decision problem is represented as a set ''A'' of natural numbers (or strings). An instance of the problem is an arbitrary [[natural number]] (or string). The solution to the instance is "YES" if the number (string) is in the set, and "NO" otherwise. * A function problem is represented by a function ''f'' from natural numbers (or strings) to natural numbers (or strings). An instance of the problem is an input ''x'' for ''f''. The solution is the value ''f''(''x''). An oracle machine can perform all of the usual operations of a Turing machine, and can also query the oracle to obtain a solution to any instance of the computational problem for that oracle. For example, if the problem is a decision problem for a set ''A'' of natural numbers, the oracle machine supplies the oracle with a natural number, and the oracle responds with "yes" or "no" stating whether that number is an element of ''A''. ==Definitions == There are many equivalent definitions of oracle Turing machines, as discussed below. The one presented here is from {{harvtxt|van Melkebeek|2003|p=43}}. An oracle machine, like a Turing machine, includes: * a '''work tape''': a sequence of cells without beginning or end, each of which may contain a B (for blank) or a symbol from the tape alphabet; * a '''read/write head''', which rests on a single cell of the work tape and can read the data there, write new data, and increment or decrement its position along the tape; * a '''control mechanism''', which can be in one of a finite number of '''states''', and which will perform different actions (reading data, writing data, moving the control mechanism, and changing states) depending on the current state and the data being read. In addition to these components, an oracle machine also includes: * an '''oracle tape''', which is a semi-infinite tape separate from the work tape. The alphabet for the oracle tape may be different from the alphabet for the work tape. * an '''oracle head''' which, like the read/write head, can move left or right along the oracle tape reading and writing symbols; * two special states: the ASK state and the RESPONSE state. From time to time, the oracle machine may enter the ASK state. When this happens, the following actions are performed in a single computational step: * the contents of the oracle tape are viewed as an instance of the oracle's computational problem; * the oracle is consulted, and the contents of the oracle tape are replaced with the solution to that instance of the problem; * the oracle head is moved to the first square on the oracle tape; * the state of the oracle machine is changed to RESPONSE. The effect of changing to the ASK state is thus to receive, in a single step, a solution to the problem instance that is written on the oracle tape. === Alternative definitions === There are many alternative definitions to the one presented above. Many of these are specialized for the case where the oracle solves a decision problem. In this case: * Some definitions, instead of writing the answer to the oracle tape, have two special states YES and NO in addition to the ASK state. When the oracle is consulted, the next state is chosen to be YES if the contents of the oracle tape are in the oracle set, and chosen to the NO if the contents are not in the oracle set.{{sfn|Adachi|1990|p=111}} * Some definitions eschew the separate oracle tape. When the oracle state is entered, a tape symbol is specified. The oracle is queried with the number of times that this tape symbol appears on the work tape. If that number is in the oracle set, the next state is the YES state; if it is not, the next state is the NO state.{{sfn|Rogers|1967|p=129}} * Another alternative definition makes the oracle tape read-only, and eliminates the ASK and RESPONSE states entirely. Before the machine is started, the [[indicator function]] of the oracle set is written on the oracle tape using symbols 0 and 1. The machine is then able to query the oracle by scanning to the correct square on the oracle tape and reading the value located there.{{sfnm|1a1=Soare|1y=1987|1p=47|2a1=Rogers|2y=1967|2p=130}} These definitions are equivalent from the point of view of Turing computability: a function is oracle-computable from a given oracle under all of these definitions if it is oracle-computable under any of them. The definitions are not equivalent, however, from the point of view of computational complexity. A definition such as the one by van Melkebeek, using an oracle tape which may have its own alphabet, is required in general. ==Complexity classes of oracle machines== The [[complexity class]] of [[decision problem]]s solvable by an algorithm in class A with an oracle for a language L is called A<sup>L</sup>. For example, P<sup>SAT</sup> is the class of problems solvable in [[polynomial time]] by a [[deterministic Turing machine]] with an oracle for the [[Boolean satisfiability problem]]. The notation A<sup>B</sup> can be extended to a set of languages B (or a complexity class B), by using the following definition: :<math>A^B = \bigcup_{L \in B} A^L</math> When a language L is [[complete (complexity)|complete]] for some class B, then A<sup>L</sup>=A<sup>B</sup> provided that machines in A can execute reductions used in the completeness definition of class B. In particular, since SAT is [[NP-complete]] with respect to polynomial time reductions, P<sup>SAT</sup>=P<sup>NP</sup>. However, if A = [[DLOGTIME]], then A<sup>SAT</sup> may not equal A<sup>NP</sup>. (The definition of <math>A^B</math> given above is not completely standard. In some contexts, such as the proof of the [[time hierarchy theorem|time]] and [[space hierarchy theorem]]s, it is more useful to assume that the abstract machine defining class <math>A</math> only has access to a single oracle for one language. In this context, <math>A^B</math> is not defined if the complexity class <math>B</math> does not have any complete problems with respect to the reductions available to <math>A</math>.) It is understood that NP ⊆ P<sup>NP</sup>, but the question of whether NP<sup>NP</sup>, P<sup>NP</sup>, NP, and P are equal remains tentative at best. It is believed they are different, and this leads to the definition of the [[polynomial hierarchy]]. Oracle machines are useful for investigating the relationship between [[P = NP problem|complexity classes P and NP]], by considering the relationship between P<sup>A</sup> and NP<sup>A</sup> for an oracle A. In particular, it has been shown there exist languages A and B such that P<sup>A</sup>=NP<sup>A</sup> and P<sup>B</sup>≠NP<sup>B</sup>.{{sfn|Baker|Gill|Solovay|1975|p=431}} The fact the P = NP question relativizes both ways is taken as evidence that answering this question is difficult, because a proof technique that ''relativizes'' (i.e., unaffected by the addition of an oracle) will not answer the P = NP question.{{sfn|Trevisan|2014|p=2}} Most proof techniques relativize.{{sfn|Trevisan|2014|p=1}} One may consider the case where an oracle is chosen randomly from among all possible oracles (an [[infinite set]]). It has been shown in this case, that with probability 1, P<sup>A</sup>≠NP<sup>A</sup>.{{sfn|Bennett|Gill|1981|p=96}} When a question is true for almost all oracles, it is said to be true ''for a [[random oracle]]''. This choice of terminology is justified by the fact that random oracles support a statement with probability 0 or 1 only. (This follows from [[Kolmogorov's zero–one law]].) This is only weak evidence that P≠NP, since a statement may be true for a random oracle but false for ordinary Turing machines;{{Original research inline|date=October 2023}} for example, IP<sup>A</sup>≠PSPACE<sup>A</sup> for a random oracle A but [[IP (complexity)|IP]] = [[PSPACE]].{{sfn|Chang|Chor|Goldreich|Hartmanis|1994|p=29}} ==Oracles and halting problems== A machine with an oracle for the [[halting problem]] can determine whether particular Turing machines will halt on particular inputs, but it cannot determine, in general, whether machines equivalent to itself will halt. This creates a hierarchy of machines, each with a more powerful halting oracle and an even harder halting problem. This hierarchy of machines can be used to define the ''[[arithmetical hierarchy]]''.{{sfn|Börger|1989|p=141}} ==Applications to cryptography== {{main|Random oracle}} In [[cryptography]], oracles are used to make arguments for the security of cryptographic protocols where a [[Cryptographic hash function|hash function]] is used. A [[Provable security|security reduction]] (proof of security) for the protocol is given in the case where, instead of a hash function, a [[random oracle]] answers each query randomly but consistently; the oracle is assumed to be available to all parties including the attacker, as the hash function is. Such a proof shows that unless the attacker solves the hard problem at the heart of the security reduction, they must make use of some interesting property of the hash function to break the protocol; they cannot treat the hash function as a black box (i.e., as a random oracle). ==See also== {{div col|colwidth=20em}} * [[Black box group]] * [[Turing reduction]] * [[Interactive proof system]] * [[Matroid oracle]] * [[Demand oracle]] * [[Padding oracle attack]] {{div col end}} ==References== ===Footnotes=== {{reflist|30em}} ===Sources=== {{refbegin|30em|indent=yes}} * {{Cite book |last=Adachi |first=Akeo |title=Foundations of computation theory |date=1990 |publisher=Ohmsha |isbn=978-4-274-02190-9 |location=Tokyo}} * {{Cite journal |last1=Baker |first1=Theodore |last2=Gill |first2=John |last3=Solovay |first3=Robert |author-link3=Robert M. Solovay |date=December 1975 |title=Relativizations of the P=?NP Question |url=https://cse.ucdenver.edu/~cscialtman/complexity/Relativizations%20of%20the%20P=NP%20Question%20(Original).pdf |url-status=live |journal=SIAM Journal on Computing |language=en |volume=4 |issue=4 |doi=10.1137/0204037 |issn=0097-5397 |archive-url=https://web.archive.org/web/20230319210201/https://cse.ucdenver.edu/~cscialtman/complexity/Relativizations%20of%20the%20P=NP%20Question%20(Original).pdf |archive-date=2023-03-19 |access-date=2023-10-21}} * {{Cite journal |last1=Bennett |first1=Charles H. |author-link=Charles H. Bennett (physicist) |last2=Gill |first2=John |date=February 1981 |title=Relative to a Random Oracle A, P<sup>A</sup> != NP<sup>A</sup> != co-NP<sup>A</sup> with Probability 1 |url=https://www.cs.cornell.edu/courses/cs682/2006sp/Handouts/BennettGill.pdf |url-status=live |journal=SIAM Journal on Computing |language=en |volume=10 |issue=1 |doi=10.1137/0210008 |issn=0097-5397 |archive-url=https://web.archive.org/web/20221225225731/https://www.cs.cornell.edu/courses/cs682/2006sp/Handouts/BennettGill.pdf |archive-date=2022-12-25}} * {{Cite book |last=Börger |first=Egon |title=Computability, complexity, logic |date=1989 |publisher=North-Holland |isbn=978-0-444-87406-1 |series=Studies in logic and the foundations of mathematics |location=Amsterdam |author-link=Egon Börger}} * {{Cite journal |last1=Chang |first1=Richard |last2=Chor |first2=Benny |author-link2=Benny Chor |last3=Goldreich |first3=Oded |author-link3=Oded Goldreich |last4=Hartmanis |first4=Juris |author-link4=Juris Hartmanis |last5=Håstad |first5=Johan |author-link5=Johan Håstad |last6=Ranjan |first6=Desh |last7=Rohatgi |first7=Pankaj |date=1994-08-01 |title=The random oracle hypothesis is false |url=http://www.csc.kth.se/%7Ejohanh/randomoracle.pdf |journal=Journal of Computer and System Sciences |volume=49 |issue=1 |pages=24–39 |doi=10.1016/S0022-0000(05)80084-4 |issn=0022-0000 |doi-access=free}} * {{Cite book |url=http://archive.org/details/undecidablebasic0000mart |title=The Undecidable: Basic Papers on Undecidable Propositions, Unsolvable Problems and Computable Functions |date=1965-04-01 |publisher=Raven Press |isbn=978-0-911216-01-1 |editor-last=Davis |editor-first=Martin |editor-link=Martin Davis (mathematician) |location=Hewlett, New York |access-date=2023-10-21 |url-access=registration}} * {{Cite book |last=Papadimitriou |first=Christos |title=Computational complexity |date=30 November 1993 |publisher=Addison-Wesley |isbn=978-0-201-53082-7 |location=Reading, Massachusetts |author-link=Christos Papadimitriou}} * {{Cite book |last=Rogers |first=Hartley |url=http://archive.org/details/theoryofrecursiv00roge |title=Theory of recursive functions and effective computability |date=1 April 1967 |publisher=McGraw-Hill |location=New York |oclc=559483934 |author-link=Hartley Rogers, Jr. |url-access=registration}} * {{Cite book |last=Sipser |first=Michael |title=Introduction to the theory of computation |publisher=PWS Publishing |year=1997 |isbn=978-0-534-94728-6 |location=Boston |oclc=300459879 |author-link=Michael Sipser}} * {{Cite book |last=Soare |first=Robert I. |title=Recursively Enumerable Sets and Degrees |publisher=Springer Berlin, Heidelberg |year=1987 |edition=1st |series=Perspectives in Mathematical Logic |doi=10.1007/978-3-662-02460-7_3 |doi-broken-date=8 November 2024 |issn=0172-6641 |author-link=Robert I. Soare}} * {{Cite web |last=Trevisan |first=Luca |author-link=Luca Trevisan |date=16 January 2014 |title=Notes for Lecture 4 |url=https://theory.stanford.edu/~trevisan/cs254-14/lecture04.pdf |archive-date=1 April 2014 |series=CS254: Computational Complexity |publisher=Stanford University |archive-url=https://web.archive.org/web/20140401153746/https://theory.stanford.edu/~trevisan/cs254-14/lecture04.pdf |access-date=22 October 2023 |url-status=live}} * {{Cite thesis |last=Turing |first=Alan |title=Systems of Logic Based on Ordinals |date=1939 |degree=PhD |publisher=Princeton University |url=https://pure.mpg.de/rest/items/item_2403325_2/component/file_2403324/content |doi=10.1112/plms/s2-45.1.161 |author-link=Alan Turing |id={{ProQuest|301792588}} |hdl=21.11116/0000-0001-91CE-3 |hdl-access=free |archive-url=https://web.archive.org/web/20200313073511/https://pure.mpg.de/rest/items/item_2403325_2/component/file_2403324/content |archive-date=13 March 2020 |url-status=live}} * {{Cite book |last=van Melkebeek |first=Dieter |url=http://link.springer.com/10.1007/3-540-44545-5 |title=Randomness and Completeness in Computational Complexity |date=29 June 2003 |publisher=Springer Berlin Heidelberg |isbn=978-3-540-44545-6 |series=Lecture Notes in Computer Science |volume=1950 |language=en |doi=10.1007/3-540-44545-5 |s2cid=27442913 |issn=1611-3349 |oclc=48909425 |url-access=subscription}} {{refend}} [[Category:Computability theory]] [[Category:Turing machine]] [[Category:Computation oracles|*]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Black-box
(
edit
)
Template:Cite book
(
edit
)
Template:Cite journal
(
edit
)
Template:Cite thesis
(
edit
)
Template:Cite web
(
edit
)
Template:Div col
(
edit
)
Template:Div col end
(
edit
)
Template:For
(
edit
)
Template:Harvtxt
(
edit
)
Template:Main
(
edit
)
Template:More footnotes needed
(
edit
)
Template:Original research inline
(
edit
)
Template:Refbegin
(
edit
)
Template:Refend
(
edit
)
Template:Reflist
(
edit
)
Template:Sfn
(
edit
)
Template:Sfnm
(
edit
)
Template:Short description
(
edit
)
Template:Use dmy dates
(
edit
)