A Particular Function from the Set of Unordered Pairs of Rational Numbers to the Rationals

37 Views Asked by At

I've been searching for a particular function from the set of unordered pairs of rationals (is there a nice notation for that?) to the rationals, with two simple properties.

It must

  • Be a bijection

  • Have the property that, if WLOG $a \leq b$, $f\{a,b\} = c$ such that $ a \leq c \leq b$.

I've tried to find an example of a function with these properties, but I've had trouble. Can you help me find an example?

1

There are 1 best solutions below

0
On

For simplicity restrict to positive rationals. Given two rationals, $\, 0 < p/q < r/s, \,$ and $\,i,j\,$ two relatively prime positive integers, constrct the rational $\, p/q < (p\, i + r\, j)/(q\, i + s\, j) < r/s. \,$ To construct a bijection between pairs of rationals to rationals, use some standard enumeration of rationals and pairs of rationals. The construction proceeds by induction. Suppose we have mapped the first $\, n \,$ pairs of rationals to $\, n \,$ rationals satisfying the required property. With the $\, n\!+\!1 \,$ pair of rationals, use the $\, i,j \,$ construction to find the first rational not already used in the construction. Then map the $\, n\!+\!1 \,$ pair of rationals to this unused rational. Every rational $\, p/q \,$ is used at least once since there are infinitely many pairs of rationals where one of the rationals is $\, p/q .$