Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. 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

I am looking for the right word to describe a function and its complement.

Here I am looking for the proper word to describe a couple of functions when applied in sequence the system reverts to its original state.

  • Marshalling and Unmarshalling would be a subset of this
  • Add and Remove

Idempotence comes to mind though I am not sure if it can apply to more than one operation. Reversible could also do, but it seems a tad bit too general. Is there a right word that would describe this "systemic idempotence".

share|improve this question
Maybe inverse? – FrustratedWithFormsDesigner Jan 10 '12 at 2:50
You guys should post them as answers rather than comments, dont be shy .^_^ nobody will bite you for it. – Newtopian Jan 10 '12 at 3:12
Group or pair? Because if you're discussing a group (N>=2), then it sounds like a group in the mathematical sense. See – MSalters Jan 10 '12 at 10:10
Good point ! though the argumentation is probably still valid for groups I guess in our case (computer science) they can always be reduced to pairs. I will change the question to make it clearer. – Newtopian Jan 10 '12 at 12:03
A bad design? Stuff like Direct3D's BeginScene and EndScene are terribad.. – DeadMG Jan 10 '12 at 12:29
up vote 8 down vote accepted

Inverse function is the mathematical term.

As much of Computer Science is based upon the discipline of Mathematics, I suggest you use that.

share|improve this answer
  • Inverse
  • Mirror
  • Reverse
  • Converse
  • Opposite
  • Transpose
  • Complement
  • Antithesis
  • Dual
share|improve this answer
For argument's sake : Mirror implies a single operation that returns an inverted image of the original. Opposite and Antithesis denotes states but leaves empty the dynamics of going from one to another. Transpositions are not necessarily reversible so the word I am looking for would denote a subset of possible transpositions. Complement, some operations referred to as complement would fit the description above but the word is also used to denote mutually exclusive solutions. In this case I guess it would be too restrictive... – Newtopian Jan 10 '12 at 6:45
Which leaves Inverse (mentioned later in other answers), Reverse and Converse. – Newtopian Jan 10 '12 at 6:46
Dual sounds related to coroutines – Izkata Aug 14 '12 at 16:50

Friend of mine proposed reciprocal (reciprocity)

share|improve this answer
Tell him to sign up and post his/her answers :) Reciprocal could work, it has similar math roots as inverse, but I prefer inverse, the meaning is more obvious. – Yannis Jan 10 '12 at 5:24
I did but I think it is getting late for him (opposite side of our blue marble, at least this is the excuse I make up for him ;-P). – Newtopian Jan 10 '12 at 6:49

I would use inverse or isomorphism. In that order.

share|improve this answer
Isomorphism, indeed ! thanks. though i'm not certain for congruence. Congruence, from what I understand states that an operation yeilds the same result for different parameters the paremeters are deemed congruent through that does not necessarily mean that we can invert the operation. – Newtopian Jan 10 '12 at 6:19
Oh yeah, my bad. Deleting – Gaz Davidson Jan 10 '12 at 6:24
an isomorphism is a homomorphism with an inverse. how would you demonstrate the homomorphic structure of an add(T value) method? do you mean like a group homomorphism? if so, what would the binary operation of the codomain group be? and how is it at all relevant to the "complementness" of the function pair? and how would you argue that remove(T value) is the mathematical inverse of add? – kai Jun 20 at 9:35

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.