Discrete Math Question

  • Thread starter phoenixy
  • Start date
  • #1
phoenixy
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
 

Answers and Replies

  • #2
Janitor
Science Advisor
1,107
1
After goofing around with pencil and paper,

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?
 
  • #3
phoenixy
Oh wow, that looks like it.

Now I'm a firm believer of countable infinity. :smile:


Your equation will do, thanks!

I'm wondering if there is any easier function. This question isn't suppose to be a tough one.
 
  • #4
Janitor
Science Advisor
1,107
1
I'll bet there is one that looks less messy, given that I just kludged that one up by trial & error.
 

Related Threads on Discrete Math Question

  • Last Post
Replies
3
Views
8K
  • Last Post
Replies
0
Views
2K
Replies
1
Views
2K
Replies
5
Views
3K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
3
Views
1K
  • Last Post
Replies
4
Views
7K
  • Last Post
Replies
3
Views
6K
  • Last Post
Replies
1
Views
4K
  • Last Post
Replies
1
Views
1K
Top