Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Sometimes I encounter the term "deterministic" and sometimes I encounter "idempotent" in describing functions . Are they just two different names for the same concept ? Or are they different ?

P.S : I found about these two terms in an answer of stackoverflow .

share|cite|improve this question

closed as off topic by kahen, Norbert, Thomas, Rudy the Reindeer, Henry T. Horton Oct 30 '12 at 15:44

Questions on Mathematics Stack Exchange are expected to relate to math within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

This has nothing to do with mathematics. As used in the SO discussion, the terms are referring to the behaviour of functions in computer programs on data in memory or in storage. Idempotency means that a function when called twice has no further side effects. A function is deterministic when it returns the same result (and has the same side effects) on the same input. – kahen Oct 30 '12 at 10:49
up vote 4 down vote accepted

They are usually completely different. An idempotent function is a function $f$ for which $f(x) = f(f(x))$ for all $x$. A deterministic function is not even a proper mathematical concept, as all mathematical functions are deterministic in a sense of the common meaning of the word. Rather than the determinism of a function, one might refer to its decidability, which is the ability to prove that it results in particular values from any particular argument given a particular theory. Decidability and idempotency are very different from each other, as are determinacy and idempotency. What is the context in which you are seeing "deterministic"? It may mean the same as "idempotent" there. But I do not believe that the terms are commonly or in any general mathematical sense understood to be equivalent.

EDIT: I guess the difficulty is the explanation that "it returns the same result when run repeatedly", which seems to mean the same thing as both "deterministic" and "idempotent". So I guess there is probably a better way to answer this.

share|cite|improve this answer
I put a link to the context. – Geek Oct 30 '12 at 10:41
I guess it does mean the same thing, whenever the procedure has no effect at all. But in that sense of idempotency, it is the identity function. So all we are saying in that context is that the identity function is both idempotent and deterministic, which is obvious. I suggest that you investigate the distinctions between mathematical functions and functions in computer programming. – Dan Brumleve Oct 30 '12 at 10:44

Not the answer you're looking for? Browse other questions tagged or ask your own question.