Results 1 to 3 of 3

Math Help - Oracles in computer science

  1. #1
    Member ModusPonens's Avatar
    Joined
    Aug 2010
    Posts
    125
    Thanks
    14

    Oracles in computer science

    Hello.

    I'm not sure this is the right section but here it goes. I'm having a lot of trouble understanding the notion of an oracle in computer science. In his lecture notes, the teacher defines an oracle for a function f (in Mathematica language) as

    Function[n,
    Function[x,
    Print[ToString[Oracle],n,ToString[on],x];
    a=Input[];
    If[IntegerQ[a]&&a>=0,
    y=a,
    While[True,Null[]]];
    y
    ]
    ]

    Now, my guess is that the input we provide is the image of the function which has the oracle. Is this right? Could you please give me an intuition of what's going on here?

    Thanks in advance.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Oct 2009
    Posts
    5,536
    Thanks
    778

    Re: Oracles in computer science

    I am not familiar with Mathematica language. Could you explain what this code is doing?

    This description of a Turing machine with an oracle seems pretty clear.

    Also, you can use [code]...[/code] tags to preserve formatting and indentation.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Member ModusPonens's Avatar
    Joined
    Aug 2010
    Posts
    125
    Thanks
    14

    Re: Oracles in computer science

    Ok. I've reread that article on wikipedia and I'm still confused as to how it applies to my particular book.

    I'll try to explain the code to you:

    It starts as a function on n. Inside it, it's defined a second function, on x, that does the following: it prints "Oracle n on x"; it asks for an imput (a); if the input is a natural number the output is y=a or else the function enters in an infinite loop.
    So it's a function on n that, once evaluated on n, is a function on x that basicaly asks for an imput and if it's a natural number the input becomes the output.

    I hope that was clear.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. computer science problem
    Posted in the Algebra Forum
    Replies: 2
    Last Post: March 19th 2010, 05:16 PM
  2. Help with Computer Science Java
    Posted in the Advanced Math Topics Forum
    Replies: 1
    Last Post: October 1st 2009, 05:24 PM
  3. Computer Science
    Posted in the Advanced Math Topics Forum
    Replies: 2
    Last Post: August 7th 2009, 05:06 PM
  4. Computer science: Functions help
    Posted in the Pre-Calculus Forum
    Replies: 3
    Last Post: January 27th 2009, 12:59 AM
  5. Calculus on science computer
    Posted in the Calculus Forum
    Replies: 2
    Last Post: July 18th 2007, 07:10 PM

Search Tags


/mathhelpforum @mathhelpforum