2

I'm computing a fraction from a database when both numerator and denominator can be zero. To solve this problem I thought of adding 1 to each.

I know I can add 1 only to the denominator, but this is for optimization of resources and adding 1 to the denominator favors tasks which have a low denominator.

Because 3/3 == 4/4, but 3/4 > 4/5 and thus the task with 4 will get the resources because the program will think it has more to complete.

This brings me to my question:

If I know that

$\frac{a}{b} > \frac {c}{d}$

Can $\frac{a+1}{b+1} < \frac {c+1}{d+1}$ happen, even once?

The above formula translates to

$a+d > c+b+(bc-ad)$

and this is where I'm stuck.

Hachiloni
  • 123

3 Answers3

3

$\frac{7}{10}\gt\frac{2}{3}$ but $\frac{8}{11}\lt \frac{3}{4}$

  • could you explain how you found this? – Hachiloni Aug 24 '20 at 13:40
  • @Hachiloni I restricted myself to positive numbers, just in case those were more useful to you. Then I recalled that adding $1$ to both numerator and denominator in those circumstances brings the fraction closer to $1$ (from below or above - fairly easy to prove rigorously), but, following the intuition as in Yves Daoust's graphical answer, I expected that it will "affect" more the fractions with the smaller numerator/denominator. –  Aug 24 '20 at 13:44
  • Thus, I had to find a fraction $\gt 1$ with "small" numerator/denominator that is only slightly bigger than another one with "large" numerator/denominator - and then check what happens when I add $1$. Pretty much the first pair of fractions I tried worked. –  Aug 24 '20 at 13:44
  • (My claim from above: let $a,b>0, \frac{a}{b}>1$, i.e. $a>b$. Then $\frac{a+1}{b+1}<\frac{a}{b}$ because $(a+1)b=ab+b<ab+a=a(b+1)$. –  Aug 24 '20 at 13:47
  • I guess I forgot to limit the question to fractions smaller than 1. I hoped you'd have a formula so I could look at it – Hachiloni Aug 24 '20 at 13:50
  • I've edited the answer to provide a sample of fractions $<1$. –  Aug 24 '20 at 13:57
2

Assume $a,b,c,d>0$ then we have that

$$\frac{a}{b} > \frac {c}{d} \iff ad-bc>0$$

and

$$\frac{a+1}{b+1} > \frac {c+1}{d+1} \iff ad-cb+a+d-c-b >0$$

which fails when

$$c+b-a-d>ad-cb \iff c+b+bc>a+d+ad $$

that is for example

$$\frac{4}{7}\gt\frac{1}{2}, \quad \frac{5}{8}\lt\frac{2}{3}$$

indeed in this case

$$c+b+bc=1+7+7=15>a+d+ad=4+2+8=14$$

user
  • 154,566
2

Answer without words:

++++++++++

enter image description here

  • Are not "The ticks show one unit" 5 words? :) – user Aug 24 '20 at 13:39
  • could you explain the graph? What are the colors? what are the axis? two answers state two different sets, how do I see it here? – Hachiloni Aug 24 '20 at 13:39
  • @Hachiloni: I want to leave this answer "without words". –  Aug 24 '20 at 13:42
  • 1
    @user: the editor did not let me write only the title. But I will modify. –  Aug 24 '20 at 13:43
  • @Hachiloni The small blue triangle has the corners at $(0,0)$, $(b,a)$ and $(b+1, a+1)$. The slope of the sides coming out of $(0,0)$ is, respectively, $\frac{a}{b}, \frac{a+1}{b+1}$, the slope of the third side is $1$. You can see geometrically how the slope is "pushed up" (towards $1$, as it originally was $<1$) when we switch from $(b,a)$ to $(b+1, a+1)$. The same for the green triangle, which is all about $c,d$. –  Aug 24 '20 at 13:52
  • The main point is, the points on the green triangle are further away from the origin than the ones on the blue triangle, so the slope of the bottom side was bigger on the green triangle before the transformation, but is now smaller after the transformation. –  Aug 24 '20 at 13:53