Given two numbers A and B, make them in ration of 3:4 by only adding integer(s) to A or B or to both A and B

46 Views Asked by At

I have a set of 2 numbers say 365 and 550, I want to make them in ratio say 3:4 I have the option of adding x and y to 365 and 550, with limitation of x and y should always be integer, both or one can be 0 if required. How can I find the minimum value of x and y?

I am trying to solve it as follows:

365:550+y::3:4 =365*4= 3*(550+y), solving for y is giving the value in decimal, but I need the value in integers only, that means I will need to add something in 365, so that I can get whole numbers. I am not sure how to do that.

Also I can only add numbers and never can subtract, hence the number should be only positive including 0.

2

There are 2 best solutions below

6
On BEST ANSWER

Hint: To get $\frac{365+x}{550+y} = \frac{3}{4}$, you must have $4(365+x) = 3(550+y)$. Since $3$ doesn't divide $4$, it must divide $365+x$, so what is the smallest $x$ producing a multiple of $3$? Then $y = 4\frac{(365+x)}{3} - 550$. If it turns out $y < 0$ and you do not allow negative $y$, they you will have to increase $x$ (and therefore $y$) to make $y$ non-negative.

0
On

If you are looking for the minimum amount to add, then the first whole number (550 + y)/4 is y = 2. 552 * 3/4 = 414. x is therefore 414 - 365 = 49. 414/552 = 3/4.