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)
- A. 27
- B. 45
- C. 9
- 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
- How many onto functions f : {1, …, 7} → {a, b, c, d} have exactly one element of the codomain with a single preimage?
- How many functions f : {1, …, 6} → {1, …, 6} satisfy f(f(f(x))) = f(x) for every x?
- How many permutations π of {1, …, 7} satisfy π⁶ = identity but π² ≠ identity?
- What is the largest size of a subset S of {1, 2, …, 40} such that 7 ∈ S and no element of S divides another element of S?
- How many integers from 1 to 1000 are divisible by exactly two of the three numbers 4, 6 and 10?
- A family F of subsets of {1, 2, 3} is union-closed if A ∪ B ∈ F whenever A, B ∈ F. How many union-closed families (including the empty…