Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

If I have two events that occur on a specific interval (one every 8 seconds, the other every 200 milliseconds) but were not started synchronously, how can I calculate the frequency with which these two events will occur at the same time?

Looking at the numbers, it seems that unless they start synchronously, they will never coincide. If they started synchronously, in a perfect world, it would be every 8 seconds.

Obviously there is some variation/imperfection because they do coincide occasionally despite not starting at the same time.

I suppose I am looking for a harmonic, or additive function. Forgive me, my math knowledge is lacking.

share|improve this question
They need not start synchronously. For example, if event $E_{200ms}$ starts at a multiple of 200ms (200ms, 400ms, 600ms and so on) after event $E_{8s}$ has occurred then they will coincide. –  jay-sun Jan 3 '13 at 17:44
True; I should amend that to say if E_200ms doesn't start on a common denominator. (Grr, I give up on TEX formatting...) –  JYelton Jan 3 '13 at 17:51
Just a comment: if each event happens $\mathit{exactly}$ every $k$'th second, there is no probability involved - the process is purely deterministic –  Alex Jan 3 '13 at 23:14
They should be exact, but there is some variation, the amount of which is difficult to measure and not really that important. So, treating these as if they are on exact frequencies, what is a better way to tag the question since probability is not really applicable? –  JYelton Jan 3 '13 at 23:27

1 Answer 1

up vote 1 down vote accepted

If the intervals are rational multiples, you can calculate the least common multiple. That will give you the interval between recurrences, assuming there is one at all. There will be one if the time for one delays from the other by a multiple of the greatest common divisor. For example, if one event recurs every 60 seconds and the other recurs every 33 seconds, the least common multiple is 660 seconds. The matches, if any, will recur that frequently. There will be a match if the delay from the first to the second is a multiple of the greatest common divisor, which is 3 seconds. If the delay is not a multiple of this, they will never match.

share|improve this answer
So if $E_{8s}$ starts at 0ms, and $E_{200ms}$ starts at 50ms, the LCM is 8000*50 ms or 40 seconds? –  JYelton Jan 3 '13 at 18:03
The LCM of 8 sec and 200 msec is 8 seconds=200 msec *40. The LCM doesn't care when it starts. Then unless the start delay is a multiple of the GCD, which here is 200 msec, they will never occur together. In your example, the 8 second one always occurs exactly on the exact second, while the 200 msec one occurs at 0.050, 0.250. 0.450. 0.650, or 0.850 seconds after the exact second. –  Ross Millikan Jan 3 '13 at 18:17
@JYelton: The LCM is the smallest number that an integer number of each period fit into. This will be the span which is the repeating pattern. –  Ross Millikan Jan 3 '13 at 18:30
Thanks @Ross, I think this helps me out, even if I'm still stumbling. :) –  JYelton Jan 3 '13 at 18:30
@JYelton: you might try it by hand for small numbers, like 2 and 3 seconds. The GCD is 1 second and the LCM is 6 seconds. If the starting delay is not a multiple of 1 second, they will never happen together. The pattern, whatever it is, will recur evry 6 seconds. –  Ross Millikan Jan 3 '13 at 18:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.