Class 12 Maths, Worked in Full Past papersGet updates
Chapter 1 · Relations and Functions

Example 6: Same parity on {1, …, 7}

ExamplesEquivalence relations · Section 1.2
The question

Let RR be the relation defined in the set A={1,2,3,4,5,6,7}A = \{1, 2, 3, 4, 5, 6, 7\} by R={(a,b):R = \{(a, b) : both aa and bb are either odd or even}\}⁠. Show that RR is an equivalence relation. Further, show that all the elements of the subset {1,3,5,7}\{1, 3, 5, 7\} are related to each other and all the elements of the subset {2,4,6}\{2, 4, 6\} are related to each other, but no element of the subset {1,3,5,7}\{1, 3, 5, 7\} is related to any element of the subset {2,4,6}\{2, 4, 6\}⁠.

Exam answer

Reflexive: For any a∈Aa \in A⁠, aa and aa are both odd or both even, so (a,a)∈R(a, a) \in R⁠. Thus RR is reflexive.

Symmetric: Let (a,b)∈R(a, b) \in R⁠. Then a,ba, b are both odd or both even, so b,ab, a are both odd or both even and (b,a)∈R(b, a) \in R⁠. Thus RR is symmetric.

Transitive: Let (a,b),(b,c)∈R(a, b), (b, c) \in R⁠. If bb is odd, then aa and cc are both odd. If bb is even, then aa and cc are both even. In both cases (a,c)∈R(a, c) \in R⁠. Thus RR is transitive.

Hence RR is an equivalence relation.

All elements of {1,3,5,7}\{1, 3, 5, 7\} are odd, so they are all related to each other. All elements of {2,4,6}\{2, 4, 6\} are even, so they are all related to each other.

An element of {1,3,5,7}\{1, 3, 5, 7\} is odd and an element of {2,4,6}\{2, 4, 6\} is even, so they are not related.

∴\therefore No element of {1,3,5,7}\{1, 3, 5, 7\} is related to any element of {2,4,6}\{2, 4, 6\}⁠. Hence proved.

Want the reason behind every step, the basics and the checks?

The one idea this problem is built on

"Both aa and bb are either odd or even" means aa and bb have the same parity: both odd, or both even. Every number has exactly one parity, so the relation is really "parity of aa = parity of bb". A relation that says two things share a label is always an equivalence relation, because equality of labels is reflexive, symmetric and transitive. Its equivalence classes are the groups with the same label: the odd numbers {1,3,5,7}\{1,3,5,7\} and the even numbers {2,4,6}\{2,4,6\}⁠.

Given, to show, and the plan
Given
A={1,2,3,4,5,6,7}A = \{1,2,3,4,5,6,7\} and (a,b)∈R(a,b)\in R exactly when a,ba, b are both odd or both even.
To show
(i) RR is reflexive, symmetric and transitive. (ii) Within {1,3,5,7}\{1,3,5,7\} every element is related to every other, and the same within {2,4,6}\{2,4,6\}⁠. (iii) No element of {1,3,5,7}\{1,3,5,7\} is related to any element of {2,4,6}\{2,4,6\}⁠.
Plan
Rewrite the rule as p(a)=p(b)p(a) = p(b)⁠, where p(x)p(x) is the parity of xx⁠. Prove the three properties for arbitrary elements using properties of equality. Then read off the two subsets and check the "related" and "not related" claims.

Basics you need

1Odd and even

A whole number is even if it is 2k2k and odd if it is 2k+12k+1 for a whole number kk⁠. Every integer is exactly one of the two. In AA⁠: odd numbers are 1, 3, 5, 7 and even numbers are 2, 4, 6. Basics: integers, even and odd

2The three properties and equivalence

Reflexive: (a,a)∈R(a,a)\in R for every aa⁠. Symmetric: (a,b)∈R⇒(b,a)∈R(a,b)\in R \Rightarrow (b,a)\in R⁠. Transitive: (a,b),(b,c)∈R⇒(a,c)∈R(a,b),(b,c)\in R \Rightarrow (a,c)\in R⁠. An equivalence relation has all three (Definition 4). Basics: reflexive, symmetric, transitive

3Equality is reflexive, symmetric and transitive

x=xx = x⁠; x=y⇒y=xx = y \Rightarrow y = x⁠; x=yx = y and y=z⇒x=zy = z \Rightarrow x = z⁠. These hold for any kind of label, including the words "odd" and "even".

4Equivalence classes

The class of aa is the set of all elements related to aa⁠. The classes of an equivalence relation do not overlap and together make up the whole set. Basics: equivalence classes

Part (i): RR is an equivalence relation

  1. Rewrite the rule as an equation

    For x∈Ax\in A let p(x)p(x) be its parity: p(x)=oddp(x) = \text{odd} or p(x)=evenp(x) = \text{even}⁠. The phrase "both aa and bb are either odd or even" means "both odd, or both even", that is

    (a,b)∈R  ⟺  p(a)=p(b).(a,b)\in R \iff p(a) = p(b).

    For example (3,7)∈R(3,7)\in R (both odd), (2,6)∈R(2,6)\in R (both even), but (3,4)∉R(3,4)\notin R (one odd, one even).

    Each number has exactly one parity (Basic 1), so "both odd or both even" is the same as "same parity". Writing it as an equation lets us use the three properties of equality directly, which makes each step a one-line argument instead of a case split.
    Every integer is either even or odd, and never both (Basic 1).
  2. Reflexive

    Take any a∈Aa\in A⁠. Clearly p(a)=p(a)p(a) = p(a)⁠: aa has the same parity as itself. So (a,a)∈R(a,a)\in R for every a∈Aa\in A⁠, and RR is reflexive.

    This is the textbook's "both aa and aa must be either odd or even". If aa is odd then "both" are odd; if aa is even then "both" are even. Either way the pair (a,a)(a,a) satisfies the rule.
    Equality is reflexive (Basic 3).
  3. Symmetric

    Suppose (a,b)∈R(a,b)\in R⁠, so p(a)=p(b)p(a) = p(b)⁠. Then p(b)=p(a)p(b) = p(a)⁠, which says (b,a)∈R(b,a)\in R⁠. Hence RR is symmetric.

    The condition "aa and bb have the same parity" does not depend on the order in which we name them. Equality read backwards is still equality.
    Equality is symmetric (Basic 3).
  4. Transitive

    Suppose (a,b)∈R(a,b)\in R and (b,c)∈R(b,c)\in R⁠. Then p(a)=p(b)p(a) = p(b) and p(b)=p(c)p(b) = p(c)⁠, so p(a)=p(c)p(a) = p(c)⁠, that is (a,c)∈R(a,c)\in R⁠. Hence RR is transitive.

    In words: if bb is odd then aa is odd (same as bb⁠) and cc is odd (same as bb⁠); if bb is even then both aa and cc are even. In either case aa and cc share a parity.

    The middle element bb fixes one parity, and both aa and cc must agree with it. This is the textbook's "all elements a,b,ca, b, c must be either even or odd simultaneously". Two things that match the same thing match each other.
    Equality is transitive (Basic 3).
  5. Conclude part (i)

    RR is reflexive, symmetric and transitive, so by Definition 4 RR is an equivalence relation on AA⁠.

    This is Example 5 restricted to a small set: two integers have the same parity exactly when their difference a−ba-b is even, so this RR is the relation "2 divides a−ba-b" on {1,…,7}\{1,\dots,7\}⁠. Restricting an equivalence relation to a subset always gives an equivalence relation, since the three properties only talk about elements of the set.
    Same parity   ⟺  \iff a−ba - b even. See Example 5.

Part (ii) and (iii): the two subsets

  1. Within {1,3,5,7}\{1,3,5,7\}⁠, and within {2,4,6}\{2,4,6\}⁠, everything is related

    Take any a,b∈{1,3,5,7}a, b\in\{1,3,5,7\} (they may be equal). Both are odd, so p(a)=p(b)=oddp(a) = p(b) = \text{odd} and (a,b)∈R(a,b)\in R⁠. That gives 4×4=164\times4 = 16 pairs. Similarly, any a,b∈{2,4,6}a, b\in\{2,4,6\} are both even, so (a,b)∈R(a,b)\in R⁠, giving 3×3=93\times 3 = 9 more pairs.

    "All elements related to each other" is a claim about every pair from the subset. One reason covers all of them at once: every element of the subset has the same parity.
    If a set has nn elements, it gives n2n^2 ordered pairs (Basic: ∣S×S∣=n2|S\times S| = n^2⁠). Basics: sets and A × B
  2. No element of {1,3,5,7}\{1,3,5,7\} is related to any element of {2,4,6}\{2,4,6\}

    Take any a∈{1,3,5,7}a\in\{1,3,5,7\} and b∈{2,4,6}b\in\{2,4,6\}⁠. Then aa is odd and bb is even, so p(a)≠p(b)p(a)\ne p(b) and (a,b)∉R(a,b)\notin R⁠. By symmetry (or the same argument) (b,a)∉R(b,a)\notin R as well. That rules out 4×3=124\times 3 = 12 pairs in each direction, 24 in all.

    So RR contains exactly 16+9=2516 + 9 = 25 of the 72=497^2 = 49 pairs in A×AA\times A⁠, and the other 2424 are the mixed-parity pairs.

    the 25 pairs of R (row a, column b) 1234567 1234567 gold: odd with odd (16), blue: even with even (9) 1357246 class [1] = {1, 3, 5, 7}: odd class [2] = {2, 4, 6}: even no pair links the two groups
    Left: the whole of A×AA\times A⁠, with the 25 pairs of RR shaded. The checkerboard pattern appears because (a,b)∈R(a,b)\in R exactly when a+ba+b is even. Right: the same information as two equivalence classes. Every number is related to every number in its own group and to nothing in the other group.
    A pair with one odd and one even entry can never satisfy "same parity". This is part (iii) of the question. Together with part (ii) it says that {1,3,5,7}\{1,3,5,7\} and {2,4,6}\{2,4,6\} are exactly the equivalence classes of RR⁠.
    Equivalence classes of an equivalence relation are disjoint and their union is the whole set (Section 1.2, after Example 5). Here {1,3,5,7}∩{2,4,6}=∅\{1,3,5,7\}\cap\{2,4,6\} = \varnothing and {1,3,5,7}∪{2,4,6}=A\{1,3,5,7\}\cup\{2,4,6\} = A⁠. Basics: equivalence classes
Result

RR relates two numbers exactly when they have the same parity, so it is reflexive, symmetric and transitive: an equivalence relation. All elements of {1,3,5,7}\{1,3,5,7\} are related to each other (all odd), all elements of {2,4,6}\{2,4,6\} are related to each other (all even), and no odd element is related to an even one. These two subsets are the equivalence classes [1]={1,3,5,7}[1] = \{1,3,5,7\} and [2]={2,4,6}[2] = \{2,4,6\}⁠.

Play this problem

Class Catcher, in the chapter’s Games tab. Level 1 is this example: sort 1 to 7 into the two baskets {1, 3, 5, 7} and {2, 4, 6}. Play Class Catcher ↗

Check it with numbers

Count the pairs: 1616 odd-odd plus 99 even-even gives 2525 pairs in RR⁠, and 49−25=24=2×(4×3)49 - 25 = 24 = 2\times(4\times 3) mixed pairs outside RR⁠. Transitivity sample: (3,7)∈R(3,7)\in R and (7,1)∈R(7,1)\in R⁠, and indeed (3,1)∈R(3,1)\in R (both odd). Cross check: 5−2=35 - 2 = 3 is odd, so (5,2)∉R(5,2)\notin R⁠, matching "no odd element is related to an even one". The verification script checks reflexivity, symmetry and transitivity by brute force over all 25×25=62525\times 25 = 625 ways of choosing two pairs of RR⁠.

Common mistakes
  1. Misreading the rule. "Both aa and bb are either odd or even" does not mean "aa is odd or bb is even". It means both odd, or both even.
  2. Forgetting pairs like (3,3)(3,3) and (5,1)(5,1)⁠. "Related to each other" includes each element with itself and both orders.
  3. Proving transitivity with one triple. (1,3),(3,5)⇒(1,5)(1,3),(3,5)\Rightarrow(1,5) is an example, not a proof. Argue with arbitrary a,b,ca, b, c⁠, as in Part (i) Step 4.
  4. Calling {1,3,5,7}\{1,3,5,7\} and {2,4,6}\{2,4,6\} "relations". They are subsets of A (the equivalence classes); the relation is the set of 25 pairs.
What to take away
  1. "Same label" relations (same parity, same remainder, same length) are always equivalence relations, by the properties of equality.
  2. The equivalence classes are the groups of elements sharing a label. They never overlap and they fill the set.
  3. This example is Example 5 ("2 divides a−ba-b") on the finite set {1,…,7}\{1,\dots,7\}⁠, where every claim can also be checked by listing pairs.

Every fact used, and where it comes from

FactUsed inSource
Every integer is exactly one of odd, evenPart (i) Step 1Definition of odd and even (Basics: even and odd)
Equality is reflexive, symmetric, transitivePart (i) Steps 2–4Basic properties of equality
Reflexive, symmetric, transitive; equivalence relationPart (i) Steps 2–5Definitions 3 and 4, Section 1.2 (Lesson: types of relations)
Same parity   ⟺  \iff a−ba-b evenPart (i) Step 5Example 5
Equivalence classes are disjoint and cover the setPart (ii) and (iii) Steps 1, 2Section 1.2, after Example 5 (Lesson: equivalence relations)
Pair counts 16, 9, 25, 24Part (ii) and (iii) Steps 1, 2; CheckCounted by brute force in the site's verification script
Found an error, or want more?

Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →