Bijective Function from N to N^2: Examples and Help

  • Thread starter Anzewill
  • Start date
In summary, a bijective function from N to N^2 can be obtained by creating an array with N horizontally and vertically and then "zigzagging" through the array. Another option is to use the formula (m,n) -> 2^m(2n+1)-1.
  • #1
Anzewill
1
0
Anyone can give me a example of a bijective fuction from N to N^2?
 
Physics news on Phys.org
  • #2
I can't give you a simple "formula" but here is how to get a bijective function:

Write the numbers 1, 2, 3, ... horizontally and to left of "1" and slightly below write 1, 2, 3, ... vertically so that the cell below "m" and to the right of "n" is the pair (m,n). Now start at (1, 1) and "zigzag" through that array. That is, go from (1,1) horizontally to (2, 1) then diagonally, down and left, to (1,2), down to (1, 3), diagonally up and right to (2,3) and (3, 1), right to (4, 1), diagonally down to (3,2), etc.
 
  • #3
Or for a simple formula try [itex](m,n)\rightarrow 2^m(2n+1)-1[/itex].
 

FAQ: Bijective Function from N to N^2: Examples and Help

What is the purpose of asking "A quick question, pls help"?

The purpose of asking "A quick question, pls help" is to seek assistance or clarification on a particular topic or problem.

Is it appropriate to ask "A quick question, pls help" in a professional setting?

It depends on the context and the relationship between the asker and the person being asked. In a formal setting, it may be more appropriate to phrase the question in a more polished and respectful manner.

How can I ensure that my "A quick question, pls help" is answered promptly?

Be clear and concise in your question, provide all necessary background information, and avoid asking multiple questions at once. Additionally, reaching out to the appropriate person or resource for your question can also help expedite the response.

What should I do if my "A quick question, pls help" does not receive a response?

If your question remains unanswered, try reaching out to the person or resource again. It is also helpful to check if your question has been answered elsewhere or if there are any guidelines for asking questions in the particular setting.

Is it appropriate to follow up on my "A quick question, pls help" if I have not received a response?

It is generally acceptable to follow up on your question if you have not received a response after a reasonable amount of time. However, be mindful of the person's availability and workload, and avoid spamming them with repeated requests for a response.

Back
Top