Computer Science I / Relations
Practice question · Select all that apply

R is the relation 'has the same remainder when divided by 4' on the integers. Select every pair of numbers that R actually relates.

Hints
  1. Compute the remainder of each number on division by 4 and compare the two remainders.
  2. Two numbers are related exactly when their difference is a multiple of 4.
Show the answer
  • A. 3 and 15
  • C. 12 and 20
  • E. 7 and 11
Why

7 and 11 both leave 3; 12 and 20 both leave 0; 3 and 15 both leave 3. But 6 leaves 2 while 9 leaves 1, and 5 leaves 1 while 10 leaves 2, so those pairs are unrelated. Equivalently, the related pairs are exactly those whose difference is divisible by 4, which is why the relation partitions the integers into four classes.

Read the lesson: Relations →

Practise Relations

The app has 5 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.

More questions on Relations