aneeshm
Deity
For the mathematicians among us.
In my Theory of Computation paper (yesterday), one question we were asked was to prove that the set of integers is countable.
Now this wasn't something I had studied as part of ToC per se, nor had I expected anything of the sort to be part of the paper, but because of an interest in general mathematics, I remembered an argument presented in Baby Rudin by ordering the integers like this:
0,1,-1,2,-2,....
and the naturals in the natural order:
1,2,3,4,5,....
and wrote that.
What Rudin had not provided was the construction of the bijection between them, so I had to do that on my own.
Assuming that Ni is the ith natural, and Ii the ith integer in our ordering, the mapping from the naturals to the integers:
Ii=((-1)^i)*floor(Ni/2)
and from the integers to the naturals:
Ni=
1, for Ii=0
mod(Ii*2) + (mod(Ii)-Ii)/2*mod(Ii), for all other integers
I had no idea what level of rigour was expected, so I gave it everything possible. Is that sufficient as an answer to the question, or did I go way overboard? And much more importantly, is the answer correct?
In my Theory of Computation paper (yesterday), one question we were asked was to prove that the set of integers is countable.
Now this wasn't something I had studied as part of ToC per se, nor had I expected anything of the sort to be part of the paper, but because of an interest in general mathematics, I remembered an argument presented in Baby Rudin by ordering the integers like this:
0,1,-1,2,-2,....
and the naturals in the natural order:
1,2,3,4,5,....
and wrote that.
What Rudin had not provided was the construction of the bijection between them, so I had to do that on my own.
Assuming that Ni is the ith natural, and Ii the ith integer in our ordering, the mapping from the naturals to the integers:
Ii=((-1)^i)*floor(Ni/2)
and from the integers to the naturals:
Ni=
1, for Ii=0
mod(Ii*2) + (mod(Ii)-Ii)/2*mod(Ii), for all other integers
I had no idea what level of rigour was expected, so I gave it everything possible. Is that sufficient as an answer to the question, or did I go way overboard? And much more importantly, is the answer correct?