0

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.

Ratna
  • 155

2 Answers2

1

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.

Eric Towers
  • 67,037
  • Eric you hint leaves me blank at the toughest part i.e when y<0. Can you pl. help little further. – Ratna Apr 23 '18 at 12:14
  • @Ratna : The question allows negative $y$. I've asked about this, but there has been no clarification. – Eric Towers Apr 23 '18 at 12:18
  • Yes, Originally I hadn't mentioned the constraint, but later I edited my question. – Ratna Apr 23 '18 at 12:20
  • So what's the smallest nonnegative $y$ that makes $550+y$ divisible by $4$? – Eric Towers Apr 23 '18 at 12:24
  • X= 49 and Y = 2, Thank you very much, I got the insight. I am not sure it will happen or not, but what will I do when both of them give -ve numbers? – Ratna Apr 23 '18 at 12:29
  • @Ratna : Notice that increasing one increases the other. So ask each of them how much they must be increased and how much that increases the other. Then pick the larger pair. (The smaller pair doesn't have both nonnegative.) – Eric Towers Apr 23 '18 at 12:43
0

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.

Phil H
  • 5,579