"Flawless Harmony" Puzzle

Source: AUSTMS Puzzle Corner 35

Problem:

Call a nine-digit number flawless if it has all the digits from 1 to 9 in some order. An unordered pair of flawless numbers is called harmonious if they sum to 987654321. Note that (a, b) and (b, a) are considered to be the same unordered pair.

Without resorting to an exhaustive search, prove that the number of harmonious pairs is odd.

Update (23 Oct 2014):
Solution: Posted by me (Pratik Poddar) in comments!


Comments

  1. Proof at https://www.austms.org.au/Publ/Gazette/2014/May14/Puzzle.pdf

    As an example, one harmonious pair is given by (123456789, 864197532).
    If we switch the order of the last two digits, the new pair (123456798, 864197523)
    also happens to harmonious.

    This is not a coincidence. In general, suppose we have a pair (m, n) with m = 100X + 10a + b, n = 100Y + 10c + d, where 2 ≤ a, b, c, d ≤ 9. In order for (m, n) to be harmonious, or m+n = 987654321, we must have a + c = b + d = 11. Then it is clear that the pair (m' , n') given by m' = 100X + 10b + a, n' = 100Y + 10d + c
    also satisfies m' + n' = 987654321. Thus (m', n') is harmonious as well.

    In most cases, the pairs (m, n) and (m', n') are different. The notable exception is when we have m = n' and n = m'. This can only happen if A = C, a = d and b = c. It is easy to check (by working out the digits of A = C backwards) that the only pair satisfying these equalities is given by (493827156, 493827165).

    Therefore the number of harmonious pairs must be odd.

    ReplyDelete
    Replies
    1. Your statement "only pair satisfying these equalities is given by (493827156, 493827165)" isn't that state forward! Can u pls elaborate its proof.

      Delete
  2. Fair - here is the skeleton. The involution: if (m, n) is harmonious, swap the last two digits of BOTH numbers; the column sums are unchanged, so you get another harmonious pair. Orbits have size 2 UNLESS the swapped pair equals the original pair (as an unordered pair), i.e. m-with-digits-swapped = n. Write m = 100X + 10a + b, n = 100Y + 10c + d; the condition becomes X = Y, c = a, d = b, so a self-paired harmonious pair looks like (100X + 10a + b, 100X + 10b + a). Summing: 200X + 11(a + b) = 987654321. Now a+b must make the units work: 11(a+b) ends in the last two digits of the sum minus 200X... solving mod 100: 11(a+b) ≡ 21 (mod 100) forces a+b = 11 (the only option giving valid digits), and then 200X = 987654321 - 121 = 987654200, X = 4938271. Remaining digits for {a, b} from the unused pool {5, 6} with sum 11 - consistent, unique up to order. Hence exactly one self-paired pair, all others pair up, and the total count is odd. (Full detail in the AUSTMS PDF linked in the post.) (replied using AI)

    ReplyDelete

Post a Comment

Popular posts from this blog

Polya's Urn Problem: Expected Balls in the Smaller Urn

Lion and Man in a Circular Cage: Can the Lion Catch the Tamer?

Expected Tosses for Consecutive Heads: 2 Heads vs 3 Heads Puzzle