1
$\begingroup$

I have the following Problem:

  1. I know the range within the results of a division must lie. [ quotientrange ] Additionally, the quotient should not exceed a certain number of fractions.
  2. I know, that both dividend and divisor must consist of a certain set of digits. Dividend and divisor are further restricted by a range. Edit: Dividend and divisor are only integers.

My question is: How can I determine a set of dividends and divisors, which satisfis this assumption?

Example:

  • Dividend should be within the rage [100.00; 999.99] and only consist of the digits 1, 2, 3, 4, 5
  • Divisor should be within the range [10; 99] and only consist of the digits 1, 2, 5.
  • Thus, the maximum range of the result is clearly determined by [100.00 / 99; 999.99 / 10]

Question: How can I determine a set [dividend1,dvisor1;....;dividend_n,divisor_n] which satisfies my assumptions?

Brute force is an alternative, certainly, by calculating from an assumed result (the range is known), constructing a valid divisor, performing a multiplication and chcecking, wheater the result satisfies the constraint for the dividend.

However, I wonder if there is a more intelligent approach?

$\endgroup$
  • $\begingroup$ Are dividend and divisor integers? $\endgroup$ – Wolfgang Bangerth Aug 20 '12 at 10:46
  • $\begingroup$ No, they need not be. However, they must also not exceed a certain number of decimal places. $\endgroup$ – JohnDoe Aug 20 '12 at 11:19
  • $\begingroup$ Background: I am trying to automatically assemble dividends and divisors suitable to learn children to divide the pen and paper method. There are certain constraints to the dividend (eg. digits 1 .. 5 easier), divisors (e.g. 1, 2, 5 easier) and the quotient (without decimal places or with fixed set of decimal places, so that the remainder becomes zero) $\endgroup$ – JohnDoe Aug 20 '12 at 11:28
  • $\begingroup$ By thinking again about your question - yes, the problem can be reduced to be dividend and divisor just integers. $\endgroup$ – JohnDoe Aug 20 '12 at 11:40
  • $\begingroup$ I see. Then I also see the relation to your other question about drawing random numbers with only certain digits :-) Can I suggest you edit the question to mention that it's only integers? That said, this is more a number theory question that I have little to contribute to... $\endgroup$ – Wolfgang Bangerth Aug 21 '12 at 0:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.