Coder's Guild Mailing List

Re: Set Theory

Posted by Benjamin Johnston on 2000-09-23

> What is the mathematical function that maps the set of all natural number
> to the cartesian product of the set of all natural numbers. I know that it
> exists, but I haven't been able to think of it on my own.....


You'd just need a function that goes like this;
0  1  3  6  10
2  4  7  11
5  8  12
9  13
14


0->(0,0), 1->(1,0), 2->(0,1), 3->(2,0), 4->(1,1), 5->(0,2), 6->(3,0),....

To be more formal... that would be harder.... it looks like there's
triangular numbers in there.... I'll take a go at it....

if G is the function that maps (x,y)  to  (sum from i=0 to (x+y) of i) + y

then F : N -> N x N is the inverse of G.

You could probably express F directly (instead of as the inverse of some
other function), by using triangular numbers.

I'll have to think about F a bit more, but I don't think it would be too
hard if you use a "sigma". If you come up with a solution, post it.

-Benjamin Johnston
s355171@xxxxxxx.xx.xxx.xx
(when I've said "sum from .... to .... of ....", I'm meaning a sigma
notation kind of thing)