GATE Computer ScienceHardGATE CSE · NIELIT

What is the smallest k such that every k-element subset of {1, 2, …, 30} contains two distinct elements whose sum is divisible by 7?

  1. A. 16
  2. B. 15
  3. C. 11
  4. D. 18

Correct answer: A. 16

Residue classes mod 7 (0..6) have sizes 4,5,5,4,4,4,4; a bad set takes at most one element of class 0 and the larger of each pair (1,6),(2,5),(3,4): 1+5+5+4 = 15, so k = 16.

More Discrete Mathematics questions

Exams that ask this topic