KBD

Keith Devens .com

Monday, October 13, 2008 Flag waving
Although at the beginning the paradigm was worth consideration, now the entire effort in the primeval soup paradigm is self-... – Hubert P. Yockey (Information Theory and Molecular Biology, p336)
← Program-Transformation.OrgNetBeans Profiler →

Daily link icon Wednesday, September 14, 2005

What's this mathematical relationship called?

What's this mathematical relationship called?
x == foo(foo(x)) && x != foo(x)

In other words, foo is a [blank] function.

← Program-Transformation.OrgNetBeans Profiler →

Comments XML gif

Adam Langley (http://www.imperialviolet.org) wrote:

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

∴ Adam Langley | 14-Sep-2005 3:20am est | http://www.imperialviolet.org | #8290

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 Smiley I just thought there might be some 'official' word that describes it.

Keith | 14-Sep-2005 9:38am est | http://keithdevens.com/ | #8292

Ian Davis (http://purl.org/NET/iand) wrote:

I'd call it a reversible function but I'm not a computer scientist.

∴ Ian Davis | 14-Sep-2005 11:08am est | http://purl.org/NET/iand | #8293

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

∴ Adam Langley | 14-Sep-2005 12:54pm est | http://www.imperialviolet.org | #8294

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

∴ Guy Gur-Ari | 16-Sep-2005 9:08am est | #8298

Keith (http://keithdevens.com/) wrote:

Thanks, all.

Keith | 16-Sep-2005 10:32am est | http://keithdevens.com/ | #8299

Feel free to post a comment below. Please see my comment policy.

Formatting Rules (No HTML):

  • **bold**, *italic*, _underlined_, --strikeout--
  • "text"="url" creates a link, and URLs are auto-highlighted
  • Blockquote: Like e-mail, begin paragraph with > (greater-than sign)
  • Lists: begin paragraph with *,-, or + (unordered), or # (ordered)
  • Code block: ?!code:language=perl|php|sql|javascript|etc.{\n}...{\n}?!/code

:
(will be your IP address if blank)
: (optional)
(Will not be shown on site)

: (optional)
:

October 2008
SunMonTueWedThuFriSat
 1234
567891011
12131415161718
19202122232425
262728293031 



RSS feed RSS feed for Keith's Weblog
Atom feed Atom feed for Keith's Weblog
Weblog archive
Recent comments
  on 7 posts

Recent comments XML

new⇒Spider solitaire

I have now won, at the "Difficult"​level, 186 games of Spider​Solitaire.  I...

75.179.28.113: Oct 13, 9:34am

new⇒Girls, please don't get breast implants

Please, don't marry him.

You​want to get surgery to make​yourself more i...

gigi: Oct 12, 11:47pm

I hate PHP

Elliot Anderson,

Dude!! You the​man! The reverse replacement for​array_u...

Alex Ndungu: Oct 11, 1:35am

Call a function from a string in Python

?!code:
some_object.__getattribute​__('method_name')()
?!/code

is​the s...

Patrick Corcoran: Oct 8, 3:53pm

Sed one-liners

Hi.

I wanted to let you know​that I wrote an article "Famous Sed​One-Lin...

Peteris Krumins: Oct 8, 3:05am

Timesheet Calculator

Hadn't seen it before now, but my​company already uses a time​tracking prog...

Keith: Oct 7, 10:44am

Generated in about 0.219s.

(Used 8 db queries)

mobile phone