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

What is the adjective given to a mathematical operation/expression on a variable whose new value can only be described in terms of that variable's existing value? Sequential operation?

  • Example: i = i + 1
  • Counter-example: i = 3 + 1

I don't know if what I call a "sequential operation" is semantically opposite to "idempotent" operation/expression but it does seem like it (e.g. the counter-example shown doesn't change value depending on how often you execute it).

Why I'm asking I'm trying to distinguish between functions in my computer program where you need to read the existing value into memory before you can compute the value from those that can be expressed as simple literals. I need to state in my design document that my program must support both cases, and I want to use the mathematically correct term for it. (note it doesn't need to be numerical, it could be string concatenation vs string overwriting).

share|cite|improve this question
Recursive? Implicit? – Joshua Pepper Mar 7 '14 at 23:41
Both of those sound correct based on my definitions of those terms and how I've phrased the question. Whether they evoke the intended meaning in my computer program description I'm not so sure. But I will mark the question as correct if you post it as an answer. – Sridhar-Sarnobat Mar 7 '14 at 23:46
I'm perfectly happy to wait and see if anything more useful comes up in discussion! – Joshua Pepper Mar 7 '14 at 23:47
Thanks Josh. It's reassuring to know that it's an interesting question such that the answer is not trivial :) – Sridhar-Sarnobat Mar 7 '14 at 23:49
In a computer speak, the value that can be expressed as simple literals is called constant. – user58697 Mar 8 '14 at 0:11
up vote 2 down vote accepted

"Idempotent" means that repeating the operation doesn't change the outcome. That doesn't mean that it doesn't do changes. I.e., asignment is idempotent (asign 10 five times in a row, the result will always be 10); increment isn't (doing i++ once or twice in C gives different results). Perhaps you mean it has no side effects, or is a "pure" function (each time you call it with the same arguments, the value returned is the same)? Note that e.g. $\sin x$ is pure in this sense (each time you ask for $\sin 1$ you'll get the same result), functions like printf(3) or malloc(3) in C aren't.

share|cite|improve this answer
Interesting - 'pure function' is probably the mathematical term I am hovering around without knowing it. The only remaining question is - what would you call the right hand side of a pure function? A pure expression? How would I write this sentence (it's related to database updates): "If you are assigning a pure expression to the cell, call methodA(). If you are assigning an impure expression to the cell, call methodB()" – Sridhar-Sarnobat Mar 8 '14 at 0:31
I plead ignorance... ask a couple of people into databases, perhaps check at or – vonbrand Mar 8 '14 at 0:48
Thanks Vonbrand. – Sridhar-Sarnobat Mar 8 '14 at 0:53
Just to clarify that even "pure function" in a C programming sense might not be what you want, as a pure function is permitted to examine global memory and consequently the result may be different every time you call it, in contrast a "const function" has no effect other than it's result, and may not access global memory, c.f. the GCC manual on function attributes: – jsj Apr 21 '15 at 0:11
Another observation - pure / const functions in C are nullipotent rather than idempotent – jsj Apr 21 '15 at 0:14

I know this question is more than a year old, but for the sake of posterity, the correct term for "the opposite of idempotent" (at least in computer science) is non-idempotent.

For example, see section 9.1.2 of Hypertext Transfer Protocol -- HTTP/1.1 (RFC 2616):

9.1.2 Idempotent Methods

Methods can also have the property of "idempotence" in that (aside from error or expiration issues) the side-effects of N > 0 identical requests is the same as for a single request. The methods GET, HEAD, PUT and DELETE share this property. Also, the methods OPTIONS and TRACE SHOULD NOT have side effects, and so are inherently idempotent.

However, it is possible that a sequence of several requests is non- idempotent, even if all of the methods executed in that sequence are idempotent. (A sequence is idempotent if a single execution of the entire sequence always yields a result that is not changed by a reexecution of all, or part, of that sequence.) For example, a sequence is non-idempotent if its result depends on a value that is later modified in the same sequence.

A sequence that never has side effects is idempotent, by definition (provided that no concurrent operations are being executed on the same set of resources).

Emphasis mine.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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