GATE Computer ScienceVery hardGATE CS (PYQ pattern)

On the integers define a R b iff a³ ≡ b³ (mod 504). How many equivalence classes does R have? (504 = 8 · 7 · 9)

  1. A. 27
  2. B. 45
  3. C. 9
  4. D. 72

Correct answer: B. 45

The classes correspond to the distinct cubes mod 504, and by CRT these are triples of cubes mod 8, 7 and 9. Mod 8: odd numbers cube to themselves (1, 3, 5, 7) and evens cube to 0, giving 5. Mod 7: {0, 1, 6} = 3. Mod 9: {0, 1, 8} = 3. So 5 × 3 × 3 = 45.

More Discrete Mathematics questions

Exams that ask this topic