0

I have to find an injection from $f:\mathbb{N} \times \mathbb{N} \to \mathbb{N}$

THX

Googme
  • 355
  • 8
    try $f(a,b) = 2^a 3^b$. – mookid Mar 23 '14 at 14:45
  • Yes thank you for the suggestion. Google gives the same answer. However it is still not clear... – Googme Mar 23 '14 at 14:50
  • Look up the unique factorization theorem. – Tom Collinge Mar 23 '14 at 14:51
  • 2
    the only thing to check is that if $2^a3^b = 2^c3^d$ then $(a,b)=(c,d)$. This is a consequence of the uniqueness of the factorization in primes. – mookid Mar 23 '14 at 14:52
  • There are many older posts - at least about bijection between the two sets, requiring injective map is a weaker condition: http://math.stackexchange.com/questions/325236/is-there-a-bijection-between-mathbb-n-and-mathbb-n2 http://math.stackexchange.com/questions/187751/cardinality-of-the-set-of-all-pairs-of-integers http://math.stackexchange.com/questions/490324/defining-bijective-function-f-mathbbn-times-mathbb-n-to-mathbb-n http://math.stackexchange.com/questions/54158/ http://math.stackexchange.com/questions/91318/ (and other posts shown there among linked questions) – Martin Sleziak Dec 03 '14 at 12:18

4 Answers4

2

You have to find a function that has as input a couple of natural numbers (n,m) and as an output just one natural number. By injectivity, to different couples (and (n,m) ≠ (m,n)) there must correspond different natural numbers.

To figure it out, think of a way to uniquely decompose a natural number. How would you decompose 5? And 10? And 7? And 14? (not random numbers, try to think out the structure)

I'm giving you just hints because I think it's more useful for you to think it by yourself, once they tell you what's the trick it looks quite silly

nelv
  • 1,310
  • 8
  • 20
0

You need to find an injective function which takes in an element of $\mathbb N\times\mathbb N$, that is, a tuple $(m,n)$ with $m$ and $n$ natural numbers, and which returns a natural number. Here is an example of a function from $\mathbb N\times\mathbb N$ to $\mathbb N$, although it is not injective (why?): $$ f(m,n) = m + n. $$ This is a difficult question because we intuitively think of $\mathbb N\times\mathbb N$ as being "larger" than $\mathbb N$. The point of this question is to show that, contrary to our intuition, $\mathbb N\times\mathbb N$ is no bigger than $\mathbb N$. (Whenever there is an injection from one set to another set, the cardinality [i.e. size] of the first set is less than or equal to the cardinality of the second set.)

As a warm-up exercise, think of injective functions from $\mathbb N$ to $\mathbb N\times \mathbb N$. If you can't, let me know, and we'll talk about it. As for the injection from $\mathbb N\times\mathbb N$ to $\mathbb N$, I have one hint, which I can elaborate on if you first give it some serious thought: "prime factorization".

user134824
  • 12,212
  • I think a get the $\mathbb{N} \times \mathbb{N}$. I just take two different positive integers, which compose one positive integer by mapping them with 2^m and 3^2...ok, this is that reason why its not surjective because 7 for example cant be composed by that function... – Googme Mar 23 '14 at 15:50
  • could you please give me some thoughts on the other way around from $\mathbb{N} \to \mathbb{N} \times \mathbb{N}$ – Googme Mar 23 '14 at 15:52
  • Sure. The easiest example is something like $f(n) = (n,0)$ or $f(n)=(n,n)$. Do have a geometric sense for what these mean? – user134824 Mar 23 '14 at 16:00
  • hmm..no geometric sense :) – Googme Mar 23 '14 at 16:04
  • This is what Brad S. is getting at. You can think of $\mathbb N$ as a bunch of squares in a line going off to infinity in one direction, and you can think of $\mathbb N\times\mathbb N$ as a chess board which stretches infinitely far in the rightward direction and the downward direction; each square has a coordinates $(n,m)$. The set of points of the form $(n,0)$ is just the leftmost vertical column on the infinite chessboard; the set of points of the form $(n,n)$ is the diagonal of the chessboard. Make sense? – user134824 Mar 23 '14 at 16:41
0

To find this function you should think of "counting" every element of $\mathbb{N}\times\mathbb{N}$. This way you assign to each element of $\mathbb{N}\times\mathbb{N}$ a natural number and it will of course be an injection.

Seth
  • 9,393
  • 1
  • 27
  • 64
0

Think about the squares on a chess board. You can refer to each one by a pair of numbers, row and column or you can number them linearly from 1 to 64. So, there is an injective function function from (row, column) to square number.

Brad S.
  • 1,876