# Impossible numbers drawn from tricky function

The function is this: $f(\frac{a}{b},\frac{c}{d})=\frac{a+c}{b+d}$ where

1. $0\lt \frac{a}{b} \lt 1$

2. $0\lt \frac{c}{d}\lt 1$

3. $a,b,c,d$ are all integers

4. $a/b$ and $c/d$ are in lowest terms

Are there real numbers, for no matter what integers you plug in for $a,b,c$ and $d$, $f(\frac{a}{b},\frac{c}{d})$ will never equal to? If we classify all impossible numbers in one group, group $A$, does $A$ have finite or $\infty$ terms? Or even none at all? Thanks a bundle.

• I think you don't know what means "group-theory". Probably you mean "set". Jul 11, 2015 at 2:31
• Thanks Zev and Integral for fixing up my problem
– user253055
Jul 11, 2015 at 2:35

It is easy to show that the range of $f$ is $\mathbb{Q} \cap (0,1)$. Clearly $f$ is positive, and $$\frac{a}{b} < 1, \frac{c}{d} < 1 \;\; \Rightarrow \;\; a < b, c < d \;\; \Rightarrow \;\; a + c < b + d \;\; \Rightarrow \;\; \frac{a+c}{b+d} < 1.$$ Now take $y \in \mathbb{Q} \cap (0,1)$. Then $y = \frac{p}{q}$ for some $p,q \in \mathbb{N}$ with $\gcd(p,q) = 1$. We have to show two rationals the function maps to $y$. But we can do this easily by letting $a = c = p$ and $b = d = q$: $$f\left(\frac{a}{b},\frac{c}{d}\right) = \frac{a+c}{b+d} = \frac{2p}{2q} = \frac{p}{q}.$$

By construction, $f$ is not irrational, leaving us with the range mentioned above. To answer the original question, the set of all real numbers that $f$ never attains is $\mathbb R \setminus(\mathbb{Q} \cap (0,1)),$ which has uncountably many elements.

• Nice proof. In fact, $\frac{a+c}{b+d}$ is the mediant of the two fractions, and is therefore between them (and hence between 0,1). Jul 11, 2015 at 3:02
• Note that using the Farey sequence one can also show this range for the restricted version where $b\neq d$ or even $(b,d)=1$. Jul 11, 2015 at 3:23
• I downvoted because you did not mention that $f$ as stated in the question is not a well-defined function. It's not good to leave such mistakes uncorrected. Jul 11, 2015 at 7:22
• It is clear from context that OP wanted positive integers for input. The difference between 1/2 and -1/-2 is pedantic for an interest question by a non-professional Jul 11, 2015 at 11:22
• Also the fourth condition says the fractions are in lowest terms, making this a well-defined function Jul 11, 2015 at 14:32

It's clear that because $f$ always produces a ratio of two integers, it's impossible for $f$ to ever make an irrational number, so that's already uncountably many things not in the image of $f$.

• I downvoted because you did not mention that $f$ as stated in the question is not a well-defined function. It's not good to leave such mistakes uncorrected. Jul 11, 2015 at 7:22
• @user21820: I actually explicitly warned the OP about this in a comment on the question, which I'd already deleted but which you can still see their comment thanking me for. The OP then edited in the requirement that $a/b$ and $c/d$ be in lowest terms, which make $f$ a perfectly well-defined function. Jul 11, 2015 at 7:24
• Oh I'm sorry I didn't know you warned the asker. However, it's still not perfectly well-defined since it is unclear what lowest terms means for negative fractions. Jul 11, 2015 at 7:45
• Since the conditions explicitly exclude negative fractions, the question what "lowest terms" means for them is irrelevant for the definition of the function. Jul 11, 2015 at 8:55