0

In a current project that I am working on, I have to determine relationship between various variables so that the final result I get by solving the equation is a natural number.

For example, one such equation is

$$\frac{(D_2*B_2 - D_1*B_1)}{(D_1*M_1 - D_2*M2)}$$

All the variables in this case are natural numbers. I have to find a condition between them such that the final result after division is also a natural number.

Can this be done at all? If it is doable, could anyone please provide some insights on how I should proceed?

Even though there are no other constraints on the variables, we can add the constraints ourselves. For example, $D_1$ could always only be a multiple of 5 etc.

Thanks.

  • Do you have any other constraints which affect your project? – The Integrator May 21 '18 at 21:06
  • Nope, these are the only constraints. :) – iKnowNothing May 21 '18 at 21:08
  • That makes things harder. I'd suggest that you try holding one or two of the variables constant and varying the others to find the relation between them. maybe that could help – The Integrator May 21 '18 at 21:09
  • @TheIntegrator I have added a little more detail in the question. Let me know if that's what you meant. :) – iKnowNothing May 21 '18 at 21:10
  • There is only an expression in the OP, and it is a positive integer iff the denominator is a factor of the numerator. – Allawonder May 21 '18 at 21:13
  • @Allawonder I will edit the question title. The above expression is not equal to anything. It just has to be a natural number. :) – iKnowNothing May 21 '18 at 21:15
  • @Allawonder that's about all I could conclude from this expression as well. I could not determine which values for $D_1$, etc. will make the denominator a factor of the numerator. :) – iKnowNothing May 21 '18 at 21:17
  • You would need to make sure that $D_1\cdot M_1-D_2\cdot M_2\gt 0$ and $D_2\cdot B_2-D_1\cdot B_1\gt 0$ for one or both negative. (They just need to be the same sign) – The Integrator May 21 '18 at 21:19
  • @MathsNoob I was editing that while you commented – The Integrator May 21 '18 at 21:22
  • @TheIntegrator can constraints like $D_1$ is always a multiple of a specific number like 2,3 or 4 or $M_2$ is a factor of $M_1$ be of any help?

    I can add all kinds of constraints as long as the final result after division is a natural number. :)

    – iKnowNothing May 21 '18 at 21:24
  • You should check the answer posted by @Allawonder . maybe that could help. Will think and answer if an idea pops up – The Integrator May 21 '18 at 21:30
  • @TheIntegrator I had already figured out those constraints. :) I will wait for some time to see if someone else can provide more insight. – iKnowNothing May 21 '18 at 21:35

1 Answers1

0

The expression $$\frac{D_2B_2 - D_1B_1}{D_1M_1 - D_2M2}$$ is a positive integer if and only if there is some positive integer $k$ such that $$D_2B_2 - D_1B_1 =k(D_1M_1 - D_2M2).$$ There's no more to it than that apart from the constraints pointed out by @TheIntegrator namely either $D_2B_2>D_1B_1,D_1M_1>D_2M2$ or $D_2B_2<D_1B_1,D_1M_1<D_2M2$.

Your choice of $k$ depends on additional information about what you're trying to do with that expression. For example, we cannot specify possible values of $k$ further unless one knows what the letters in the expression represent, or one has another relationship between them.

Allawonder
  • 13,327
  • Let's say that the value of $k$ should always be 2. Is there a way to get some useful relation from the equation now? We can define other constraints ourselves like $D_1$ always has to be multiple of a specific number etc. – iKnowNothing May 21 '18 at 21:40
  • @MathsNoob If $k=2$, then you have what you wanted (namely that the expression is a positive integer), so long as the numerator and denominator have the same sign. Indeed, this is true for any $k\in\mathbb R^+$. – Allawonder May 21 '18 at 21:49
  • I wanted to determine the relation between $D_1$, $M_1$ etc. so that the final value after division is 2. :) – iKnowNothing May 21 '18 at 21:50
  • @MathsNoob Sure, just substitute $2$ for $k$ as I said, bearing in mind the inequalities. – Allawonder May 21 '18 at 21:53