5

Is there an algorithm (better than exhaustive search) that for a given list of moduli $m_i$ produces a list of residues $0\leq r_i<m_i$ such that $(m_i,r_i)$ is a covering system of congruences, or determines that none exists? The covering system is in the sense of Erdős: every integer satisfies $n=r_i$ (mod $m_i$) for at least one $i$. The moduli on the list may repeat, but can only be used as many times as the list prescribes.

Also, are there good necessary and/or sufficient conditions for existence of a cover, given the list of moduli, better than that the sum of the moduli reciprocals has to exceed $1$? For example, I am pretty sure there is no cover for $2,3,5,5$ that satisfies it, and I couldn't find a cover even for $2,3,5,5,6,10,30$

Conifold
  • 11,756
  • I think the questions you are asking are known to be NP-complete. If you have access to the book by Garey and Johnson, you'll be able to check this out quite rapidly. – Gerry Myerson May 26 '14 at 12:30
  • By the way, there won't be a cover for 2, 3, 5, 5, 6, 10, 30. There's a theorem that says that if a prime $p$ divides one modulus, then it must divide at least $p$ moduli; but you have only 4 moduli divisible by 5. – Gerry Myerson May 26 '14 at 23:12

1 Answers1

5

There is some discussion of this sort of question in Jenkin and Simpson, Composite Covering Systems of Minimum Cardinality, available here. In particular, it says that given a collection $$\{\,(m_1,a_1),\dots,(m_n,a_n)\,\}$$ of ordered pairs of positive integers, the question of whether there is an integer $x$ satisfying none of the congruences $x\equiv a_i\pmod{m_i}$ is NP-complete. References are given to the Garey & Johnson book, and to Stockmeyer, L.J., and Meyer, A.R., Word problems requiring exponential time, Proc. 5th Ann. ACM Symp. on Theory of Computing, Association for Computing Machinery, New York(1973), 1-9.

Conifold
  • 11,756
Gerry Myerson
  • 179,216
  • 2
    Checking a candidate cover is not so bad for me, just go over all numbers from 1 to lcm of moduli. But I don't know a better strategy for coming up with cover candidates than the greedy algorithm, select residue that covers most numbers not yet covered, but if it fails it's not a guarantee of non-existence. Thanks for the references, I'll try to find Garey-Johnson. – Conifold May 26 '14 at 23:04