Those are some friendly numbers

Let S S be the set of all two-digit positive integers that do not contain the digit 0. Two numbers in S S are called friendly if their largest digits are equal and their smallest digits differ by 1. For example, the numbers 68 and 85 are friendly, the numbers 78 and 88 are friendly, but the numbers 58 and 75 are not friendly.

Determine the size of the largest possible subset of S S that contains no two friendly numbers.


The answer is 45.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Stewart Gordon
Feb 18, 2017

Since in each friendly pair the two numbers have the same greater digit, we can easily construct a maximal set of pairwise unfriendly numbers for each greater digit.

The numbers with greater digit 9 are 19, 29, 39, 49, 59, 69, 79, 89, 99, 98, 97, 96, 95, 94, 93, 92, 91 In this list, each adjacent pair is friendly, therefore taking every other number gives an upper bound for the number of pairwise unfriendly numbers we can find in this list. Indeed, taking every other number satisfies this requirement: the 9-element set {19, 39, 59, 79, 99, 97, 95, 93, 91} obviously contains no friendly pair.

In the same way, the 8-element set {18, 38, 58, 78, 87, 85, 83, 81} is the maximal set for numbers with greater digit 8.

This pattern continues, down to the set {11} for greater digit 1, therefore the total is r = 1 9 r = 45 \sum_{r=1}^9 r = \boxed{45} .

I like this approach because it's very natural way to think about the structure finder - structure avoider of construction

Calvin Lin Staff - 4 years, 3 months ago
Sharky Kesa
Feb 10, 2017

The largest possible subset has 45 elements, which can be attained using the following construction.

  • Take the 17 numbers whose smallest digit is 1 - namely, 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 , 21 , 31 , 41 , 51 , 61 , 71 , 81 , 91 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 31, 41, 51, 61, 71, 81, 91 .

  • Take the 13 numbers whose smallest digit is 3 - namely, 33 , 34 , 35 , 36 , 37 , 38 , 39 , 43 , 53 , 63 , 73 , 83 , 93 33, 34, 35, 36, 37, 38, 39, 43, 53, 63, 73, 83, 93 .

  • Take the 9 numbers whose smallest digit is 5 - namely, 55 , 56 , 57 , 58 , 59 , 65 , 75 , 85 , 95 55, 56, 57, 58, 59, 65, 75, 85, 95 .

  • Take the 5 numbers whose smallest digit is 7 - namely, 77 , 78 , 79 , 87 , 97 77, 78, 79, 87, 97 .

  • Take the 1 numbers whose smallest digit is 9 - namely, 99 99 .

Now, consider the diagram below, where each square represents one of the numbers in S S . We consider the square in row i i and column j j to denote the 2 digit number i j \overline{ij} .

Nine of the squares are shaded grey, while the remaining 72 squares are divided into 36 pairs.

It is easy to check that each of these pairs denotes two friendly numbers. Therefore, at most one of the elements in each pair can be in our set. Also, the 9 shaded square are not friendly either.

Therefore, we have a maximum of 36 + 9 = 45 36+9=\boxed{45} elements in our set.

@Sharky can you please elaborate on the approach please?

Prithwish Roy - 4 years, 3 months ago

Log in to reply

How so? I feel that there is sufficient explanation above.

Sharky Kesa - 4 years, 3 months ago

For the first part, organizing it by the largest digit would make it easier to check that there are no friendly pairs.

This would also likely lead to @Stewart Gordon 's solution, which provides a "nicer arrangement" of your shaded grey squares approach. (IE just look at each layer of max digit, and you can figure out what is allowed).

Calvin Lin Staff - 4 years, 3 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...