PDA

View Full Version : Discrete Math Question


phoenixy
Mar9-04, 11:23 PM
Hi,

Does there exist a function f: Z+ --> Z which is onto?

I had been told there such funciton exists, since both Z+ and Z are countable infinite series. Thus there exists some transformation that could map Z+ to every single Z

However, I still can't shake off the idea that since Z+ is a subset of Z, there just aren't "enough" Z+ to cover every single Z, and the 0 in Z is giving me trouble as well


Thanks for any input

Janitor
Mar10-04, 12:08 AM
If N is a positive integer, it seems like this does the trick:

f(N)= (N/2)(-1)^N + 1/4 + (1/4)(-1)^(N+1).

This gives:
f(1)=0
f(2)=1
f(3)=-1
f(4)=2
f(5)=-2
f(6)=3
f(7)=-3

and so on. Is that the sort of function that you are talking about?

phoenixy
Mar10-04, 12:38 AM
Oh wow, that looks like it.

Now I'm a firm believer of countable infinity. [:)]


Your equation will do, thanks!

I'm wondering if there is any easier function. This question isn't suppose to be a tough one.

Janitor
Mar10-04, 12:41 AM
I'll bet there is one that looks less messy, given that I just kludged that one up by trial & error.