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?
- A. 16
- B. 15
- C. 11
- 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
- How many integers from 1 to 2000 inclusive are divisible by none of 3, 5, 7 and 11?
- How many of the 256 assignments to x₁, …, x₈ satisfy all of: x₁ → x₂, x₂ → x₃, x₃ → x₄, x₅ → x₆, x₆ → x₇, x₇ → x₈, x₄ → ¬x₅ and x₈ → x₁?
- A Boolean function f(x, y, z) is monotone if a ≤ b componentwise implies f(a) ≤ f(b). How many monotone functions satisfy f(1, 0, 0) = 0…
- A Boolean function f of four variables is self-dual if f(x̄₁, x̄₂, x̄₃, x̄₄) = ¬f(x₁, x₂, x₃, x₄) for every input, and monotone if a ≤ b…
- Out of the 16 binary Boolean operators, how many are BOTH commutative and associative?
- Which of the following sets of connectives are functionally complete? I. {→, ⊥} II. {↔, ⊕} III. {→, ⊕} IV. {∧, ∨, →} V. {↛, ⊤} (↛ is 'p…