Binary relation · Exercise-BINARY-RELATION-010

Step-by-step solved exercise: Relations and functions

Let \(\displaystyle A=\{1,2,3,4\}\) and \(\displaystyle R=\{(a,b)\in A\times A : a+b \text{ is even}\}\). How many pairs does \(\displaystyle R\) have?

Step by step with comments, a check and common mistakes.

Step-by-step solution

  1. The sum \(\displaystyle a+b\) is even exactly when \(\displaystyle a\) and \(\displaystyle b\) have the same parity.

    \[\displaystyle a+b\text{ par}\iff a\equiv b \pmod 2\]
  2. In \(\displaystyle A=\{1,2,3,4\}\) there are 2 odd numbers (1 and 3) and 2 even numbers (2 and 4).

    \[\displaystyle |\{1,3\}|=2,\quad |\{2,4\}|=2\]
  3. Pairs with both components odd number \(\displaystyle 2\cdot 2=4\), and pairs with both components even number \(\displaystyle 2\cdot 2=4\).

    \[\displaystyle 2\cdot 2+2\cdot 2\]
  4. Adding both cases, \(\displaystyle R\) has 8 pairs.

    \[\displaystyle |R|=8\]

Answer

8

🎯 Build my path to this exercise