126

I remember my professor in college challenging me with this question, which I failed to answer satisfactorily: I know there exists a bijection between the rational numbers and the natural numbers, but can anyone produce an explicit formula for such a bijection?

Parcly Taxel
  • 103,344
Alex Basson
  • 4,231
  • 14
    Do you need a formula or does the picture and explanation in http://en.wikipedia.org/wiki/Countable_set#Formal_Definition_and_Properties suffice? See also http://en.wikipedia.org/wiki/Cantor_pairing_function#Cantor_pairing_function – lhf Oct 24 '10 at 03:10
  • I wasn't familiar with pairing functions, so let me look at that more closely. My professor insisted, though, that I come up with a formula, and of course that would also require that equivalent pairs (in the rational number sense) shouldn't get counted more than once. – Alex Basson Oct 24 '10 at 04:55
  • 1
    @lhf. Maybe you should post your comment as an answer; otherwise, it's not unlikey that this question remains unanswered. – Agustí Roig Oct 24 '10 at 05:21
  • Could you provide a list of features that you consider legitimate to include in your formula? Often when these questions are posed, responses are met with "that doesn't count as a formula." – Douglas S. Stones Oct 24 '10 at 05:43
  • 5
    Don't know if it would count as "explicit" but every rational number occurs exactly one in the Calkin-Wilf sequence http://en.wikipedia.org/wiki/Calkin%E2%80%93Wilf_tree – Jyotirmoy Bhattacharya Oct 24 '10 at 06:42
  • There's even a shirt! http://thenerdiestshirts.com/blog/math-shirt-cw – George Lowther Oct 24 '10 at 23:19
  • Ok, that shirt is awesome. – Alex Basson Oct 28 '10 at 10:56
  • That would be equivalent to a bijection from the natural numbers to all relatively prime pairs of natural numbers. 2) We know there is no upper bound to the number of prime numbers but we have not yet produced an explicit bijection between them and N. 3) Would a solution for 1 imply a solution for 2? (I don't know.)
  • –  Jan 17 '14 at 13:23
  • See the first part of http://people.mpim-bonn.mpg.de/zagier/files/doi/10.4169/amer.math.monthly.120.03.243/NewLooksAtOldNumberTheory.pdf –  Dec 14 '14 at 18:43
  • Wikipedia contains several explicit examples: Cantor pairing function, Stern–Brocot tree, Calkin–Wilf tree. – lhf Oct 24 '10 at 11:05