|
| ← Program-Transformation.Org | NetBeans Profiler → |

Adam Langley (http://www.imperialviolet.org) wrote:
Keith (http://keithdevens.com/) wrote:
Thanks Adam, but nothing so technical. Imagine the following function:
def foo(x):
if even(x): return x+1
if odd(x): return x-1
foo(4) => 5
foo(5) => 4
foo(foo(4)) => 4
Self-inverse is good enough for me unless you think of anything better
I just thought there might be some 'official' word that describes it.
Ian Davis (http://purl.org/NET/iand) wrote:
I'd call it a reversible function but I'm not a computer scientist.
Adam Langley (http://www.imperialviolet.org) wrote:
Well, self-inverse requires it to be reversible, but the reverse is not true.
Example:
(define f (lambda (x) (+ x 1)))
(define g (lambda (x) (- x 1)))
Now, f is certainly reversible because g is it's inverse, yet f certainly isn't self inverse. (well, unless x is a boolean value)
AGL
Guy Gur-Ari wrote:
Self-inverse is actually the 'official' word for it. I couldn't find a web page that defines it per se, but look for "self-inverse" here: http://www.answers.com/topic/transpose
Keith (http://keithdevens.com/) wrote:
Thanks, all.
Feel free to post a comment below. Please see my comment policy.
Formatting Rules (No HTML):
Generated in about 0.219s.
(Used 8 db queries)

Self-inverse? Also, that would require the function to be of order 2. Maybe if you gave the area (group thry or number thry) I could come up with something better.
AGL