Find explicit bijection from N to N x N

  • Thread starter Thread starter complexnumber
  • Start date Start date
  • Tags Tags
    Bijection Explicit
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 14K views
complexnumber
Messages
61
Reaction score
0

Homework Statement



Find a linear ordering of [tex]\mathbb{N} \times \mathbb{N}[/tex] and
use it to construct an explicit bijection [tex]f : \mathbb{N} \to \mathbb{N} \times \mathbb{N}[/tex].

Homework Equations


The Attempt at a Solution



I know how to find a bijection by graphically by drawing the [tex]\mathbb{N} \times \mathbb{N}[/tex] in a matrix and then traverse the elements diagonally. However, I cannot find a formula that maps an [tex]n[/tex] to a [tex](x,y)[/tex] pair.
 
Physics news on Phys.org
Your idea about traversing the elements of the N X N matrix diagonally is good.

Now, we want to write down that idea in a formula form.

Let's start with the first few n:
n=1:(1,1)
n=2:(1,2)
n=3:(2,1)
n=4:(1,3)
n=5:(2,2)
n=6:(3,1)

Now let's consider the pairs in the left column of the matrix, where the pair is (x,1). What pattern is there to these x-values: {1,3,6,10,15...}?
Next consider the pairs that make up a diagonal, for example {(1,3),(2,2),(3,1)}. What pattern is there in these?

Can you use those two patterns to write down an expression for the ordered pair that corresponds to a particular n value?
 
Thanks for your reply. I found a bijection from [tex]\mathbb{N} \times \mathbb{N}[/tex] to [tex]\mathbb{N}[/tex] by
[tex] \begin{align*}<br /> n = \left(\sum^{x+y-2}_{k=1} k \right) + x<br /> \end{align*}[/tex]

However, is this a bijection from [tex]\mathbb{N}[/tex] to [tex]\mathbb{N} \times \mathbb{N}[/tex] asked by the question? Given a [tex]n[/tex] I cannot use this equation to find a [tex](x,y)[/tex] pair.