Skip to content
← All questions

Why do we only need to check at most m values when searching for a solution to a congruence modulo m in the iterative CRT method?

Because the step size and the modulus m are coprime, the sequence of remainders generated by adding the step size modulo m forms a complete cycle of length m. If the target remainder does not appear within the first m steps, it will never appear, meaning no solution exists for that specific congruence within the progression.

Conditions

  • The step size of the current arithmetic progression is coprime to the target modulus m.
  • The search is bounded by the modulus m.

Reasoning, step by step

  1. Observe that adding the step size repeatedly modulo m generates a sequence of remainders.
  2. Recognize that because the step size and m are coprime, this sequence cycles through all m possible residues exactly once.
  3. Conclude that if the target remainder is not found within m steps, the cycle has completed without hitting the target, so no solution exists.

Example

The video states, 'Because the step size (60) and the modulus (7) are coprime, these remainders form a complete cycle covering all residues from 0 to 6... you only need to check at most m values. If the target remainder hasn't appeared by then, no solution exists for that congruence.'

Common misconceptions

  • Thinking the search could go on indefinitely.
  • Assuming the cycle length depends on the starting value rather than the modulus and step size.

Watch the explanation

Connected concepts

Explore next

Related questions

Understand why

↗
Meet the concept

↗
Find a method

↗
Find a method

↗

Answers are generated from source material and independently checked. Consult the original video or creator if something is unclear.