Arranging Numbers

  1. Arrange the five odd digits into a five-digit number, such that the first two digits (as a 2-digit number) times the last two digits (as a 2-digit number) minus the center digit results in a number composed of repetitions of one digit. [Can the same be done with the five even digits? - I'm guessing not - KD.]
  2. In how many different ways can you arrange the nine digits 1-9 in a 3x3 grid such that no square shall have a smaller number than its own below it or to the right of it?

Source: The Best of Discover Magazine's Mind Benders, 1984. #81, #83.


Solutions were received from Lorenzo Justo, Sudipta Das, Dan Ghinea, Stephane Higueret, Joseph DeVincentis, Bill Webb, Colin Bown.

For problem 1, answers are 39157 and 57139.
For problem 2, there are 42 different arrangements.
Full solutions follow:

  1. From Lorenzo Justo:
    Knowing that:
    1) If all digits are odd then the last digit of the product is odd.
    2) Adding or subtracting two odds results in even.
    
    Then the only possible solutions are S={666, 888, 2222, 4444, 6666 and 8888}
    
    Analyzing the case where the first and fourth digits are 7 and 9, in any order, than the product of the two numbers will be between 6300 and 8000 which than implies that the only possible result is 6666.  The last digit is determined by the last digit of the product of two of the remaining three numbers less the other:
    N1 x N3 - 5 = N8
    N1 x N5 - 3 = N2
    N3 x N5 - 1 = N4
    And there is no possible answer.
    
    The only cases where this is possible are: 
    (5N, 7N) having 4444 as possible solution with (N1 x N3 - 9 = N4)
    (3N, 5N) having 2222 as possible solution with (N1 x N9 - 7 = N2) or (N7 x N9 - 7 = N2)
    
    On the first case both possibilities are not solutions:
    51 x 73 - 9 = 3714     
    53 x 71 - 9 = 3754 
    
    And on the second case:
    31 x 59 - 7 = 1822
    39 x 51 - 7 = 1982
    37 x 59 - 1 = 2182
    39 x 57 - 1 = 2222 is a solution.
    
    So the possible answers are 39157 and 57139.
    
  2. From Colin Bown:
     Problem has diagonal symmetry so we can double the number of
       solutions for which m(2,1) < m(1,2).
    
    
       1 2 3
       4 5 6 maximal mixing between bot-left to top-right diagonal heirarchy
       7 8 9
    
       1 2 3                
       4 a b 4 solutions   for a in {5, 6} and b in {7, 8}
       a b 9                
    
       1 2 a
       3 a b 4 solutions   for a in {4,5,7}, b in {6,8} 7 in corner opposite 6
       a b 9 
    
       1 2 a
       3 a b 12 solutions  for a in {4,5,6}, b in {7,8}
       a b 9 
    
       Total number of solutions : 42 hmm... makes me want to code this in Python
    

Mail to Ken