Let $S$ be the set of two-digit numbers that do not contain the digit 0. Two numbers in $S$ are called friends if their largest digits are equal, and if the difference between their smallest digits is equal to 1. For example, 68 and 85 are friends, 78 and 88 are friends, but 58 and 75 are not friends.
Determine the largest integer $m$ such that there exists a subset $T$ of $S$ with $m$ elements, such that any two elements of $T$ are not friends.
Answer: 45. We can take for $T$ the set of numbers whose smallest digit is odd.
Conversely, if $x=\overline{a b}$ with $1 \leqslant b<a \leqslant 9$ then $x$ and $x+1$ are friends. If $x=\overline{a b}$ with $2 \leqslant a<b \leqslant 9$ and $a$ even, then $x$ and $x+10$ are friends. We have thus found 36 disjoint pairs of friends. Consequently, among the 72 numbers $\geqslant 21, T$ can contain at most 36 numbers, so $|T| \leqslant 9+36=45$.