.
Construct two examples of bijective function from ZxZ to Q where Z is set
of all integers and Q is set of rational numbers?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In his post, @CPhill states and insists that there is no bijective function from Z×Z to Q.
"The difference in their " denseness " properties prevents such a mapping from being constructed."
It is not correct, and below I explain .
The set ZxZ is countably infinite. It means that there is a bijection
f: ZxZ <---> Z
The set Q is also countably infinite. It means that there is a bijection
g: Z <---> Q
It that the composition gof is the bijection ZxZ and Q
f g
ZxZ <--------> Z <--------> Q.
It disproves the statement by @CPhill.
Another question is IF it is possible to construct an explicit bijective function .
I asked Google. Google AI created this response under this link
https://www.google.com/search?q=Construct+two+examples+of+bijective+function+from+ZxZ+to+Q+where+Z+is+set+of+all+integers+and+Q+is+set+of+rational+numbers%3F&rlz=1C1CHBF_enUS1071US1071&oq=Construct+two+examples+of+bijective+function+from+ZxZ+to+Q+where+Z+is+set+of+all+integers+and+Q+is+set+of+rational+numbers%3F&gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIGCAEQRRhA0gEJMTg1NWowajE1qAIIsAIB8QXIg8hlL4FHy_EFyIPIZS-BR8s&sourceid=chrome&ie=UTF-8
- - - START of the Google response - - - (of 2/21/2025)
Two examples of bijective functions from ℤxℤ to ℚ (where ℤ is the set of all integers and ℚ is the set
of all rational numbers) are:
Example 1: Function using a numerator-denominator pairing
• Definition: f(m, n) =
• If n ≠ 0, then f(m, n) = m/n
• If n = 0, then f(m, n) = m
Explanation:
• This function maps each ordered pair (m, n) from ℤxℤ to a unique rational number.
• When n is not zero, it represents the rational number "m/n".
• When n is zero, the function effectively maps the pair to infinity (or any other fixed value depending on your interpretation of division by zero).
Example 2: Function using a "diagonal" mapping with a sign convention
• Definition: f(m, n) = (2m + n) / (2*(abs(n) + 1))
Explanation:
• This function creates a unique mapping by leveraging the "diagonal" pattern of adding 2m and n, while ensuring that the denominator always has a positive even value.
• The absolute value of n in the denominator is used to handle cases where n is negative, preventing duplicate values.
Key points about bijective functions: [1, 2]
• A bijective function needs to be both injective (one-to-one) and surjective (onto), meaning each element in the domain maps to a unique element in the codomain, and every element in the codomain is reached by some element in the domain. [1, 2]
Generative AI is experimental.
- - - END of the Google response - - -
Below is my comment about the Google AI response
Example 1 above is INCORRECT. The function defined in Example 1 is NOT bijective.
It is not bijective, since the pairs (m,1) and (m,0) map into the same rational/(integer) number m.
Surely, I reported to Google about it.
Example 2 looks like to be correct. At least, I do not see the way to disprove it.