Imagine two kids each sitting in the center of their own tilt-a whirl®, each holding steady a flashlight (or laser) whose beam is parallel to the deck. Each machine rotates and precesses (we'll leave out nutation) at different, real, rates. How do we determine the least number of rotations to alignment, for each kid.

If you prefer another analogy: Saturn and Jupiter orbit with different (real) periods. How many orbits for each until conjunction in precisely the same position in space? Simplify by assuming circular, observer-centric, orbits.

specifically solutions to:

aC1 + bC2 = N

where a, b, N are positive integers of your own choosing and C1, C2 are constant, unique, positive, non-integer(real) numbers where C1 < C2.

I am hoping to avoid rigorous computational methods involving modulus tests.

Hope I clarified the ambiguities.

Thanks, @DonThousand the Bezout identity looks interesting.

  • $\begingroup$ Floating point numbers are rational. Thus, the question becomes solving $$\frac{ap}q+\frac{br}s=N\to ap+br=qsN$$where all variables are integers. Thus, the problem is equivalent to solving $aq+br=N$. This is the subject of Bezout's lemma. $\endgroup$ – Don Thousand Jun 10 at 17:06
  • $\begingroup$ Are the operations of multiplication and addition supposed to be floating point operations? If so, with which rounding convention? $\endgroup$ – plop Jun 10 at 17:08
  • $\begingroup$ If your goal is implementing something, then probably your are interested in algorithms like Bresenham's algorithm. $\endgroup$ – plop Jun 10 at 17:14
  • $\begingroup$ Since all floating point numbers are dyadic rationals, there is always a solution with $a$ and $b$ being powers of $2$. If the multiplication and addition operations are taken as exact, then all solutions have this form. On the other hand, if they are taken to be floating point operations, there may be other solutions due to round-off. $\endgroup$ – eyeballfrog Jun 10 at 17:15
  • $\begingroup$ @eyeballfrog There isn't always a solution... let $c_1=c_2=\frac34$, $N=1$. $\endgroup$ – Don Thousand Jun 10 at 17:18

Browse other questions tagged or ask your own question.