Logical Solutions

Logic Level 4

A A A B B B + C C C D D D \begin{array}{ccccccc} & & \color{#3D99F6}{A} & \color{#3D99F6}{A} &\color{#3D99F6}{A} \\ & & \color{#D61F06}{B} & \color{#D61F06}{B} & \color{#D61F06}{B} \\ + & & \color{#20A900}{C} & \color{#20A900}{C} & \color{#20A900}{C} \\ \hline & & D & D & D\\ \end {array}

The above represents a cryptogram such that each letter represents a distinct single digit positive integer. Find the number of solutions to the above cryptogram.


The answer is 42.

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.

6 solutions

Eli Ross Staff
Nov 17, 2015

Great problem, @Anish Harsha -- Thanks for sharing it!

To everyone -- there are a few methods to solve this. How did you solve it? Post your solution!


Here's one method: Note that the three digit numbers are in the form 100 A + 10 A + A = 111 A , 100A + 10A + A = 111A, so we have 111 ( A + B + C ) = 111 D A + B + C = D . 111(A+B+C) = 111\cdot D \quad \iff \quad A+B+C = D.

Let's fix a value for D . D. Then, for any combination of unique digits that sum to D D there are 3 ! = 6 3!=6 possibilities for ( A , B , C ) . (A,B,C).

If D = 6 , D =6, the only possibility is 1 + 2 + 3. 1+2+3.

If D = 7 , D=7, the only possibility is 1 + 2 + 4 , 1+2+4, since 1 + 3 + 3 1+3+3 would not give unique digits.

If D = 8 , D=8, we can have 1 + 2 + 5 1+2+5 or 1 + 3 + 4 1+3+4 .

If D = 9 , D=9, we can have 1 + 2 + 6 1+2+6 or 1 + 3 + 5 1+3+5 or 2 + 3 + 4 2+3+4 .

Thus, there are a total of 6 ( 1 + 1 + 2 + 3 ) = 6 7 = 42 6(1+1+2+3) = 6\cdot 7 = \boxed{42} unique solutions to this cryptogram.

Thanks Eli Ross and great solution.

Anish Harsha - 5 years, 6 months ago

about the same way of thinking

Noel Lo - 3 years, 11 months ago
Paddy MacMahon
Nov 21, 2015

Since each line is divisible by 111, this is equivalent to finding the number of different solutions to A+B+C=D, where A, B, C, D are distinct single digit values. There are 7 possible choices for the set {A, B, C}, whose sum does not exceed 9, namely {1,2,3}, {1,2,4}, {1,2,5}, {1,2,6}, {1,3,4}, {1,3,5}, {2,3,4}. Each of these has 6 possible orderings for the three digits, giving 42 solutions. How does this qualify as level 4? It seems a little straightforward...

Lu Chee Ket
Dec 13, 2015

No carry forwards and only positive integers:

1
2
3
4
5
6
1   1   1   1   1   1   2   
2   2   2   2   3   3   3   
3   4   5   6   4   5   4   
6   7   8   9   8   9   9   

6   6   6   6   6   6   6   42

3! permutations for each. Total = 6 × \times 7 = 42

Answer: 42 \boxed{42}

1
2
3
4
5
6
7
8
from itertools import permutations
count=0
for a,b,c,d in permutations('0123456789',4):
  if '0' in (a,b,c,d):
    continue
  if int(a+a+a)+int(b+b+b)+int(c+c+c)==int(d+d+d):
    count+=1
print(count)

Shyam R
Nov 19, 2015

Nice problem. First when all are unique digits, and the end sum cannot have a carry. So the numbers that sum to a single digit when 3 are selected from them in any combo are 1,2,3,4. Then the other 3 digit combos that give a single digit summation are 512, 513 and 612. When considering other higher numbers as part of the summation, the 3numbers cannpt be unique, positive and result in single digit sum. So for 1,2,3,4 number of 3 set selections can be made are 4c3 -> 4. For each 3set, permutations is 6. So (4+3)*6 -> 42

It has to be 9 \ge A + B + C and A, B, C have to be distinct \Rightarrow the posibilities are (A,B,C) = (1,2,3), (1,2,4), (1,2,5) , (1,2,6), (1,3,4),(1,3,5) or (2,3,4) and there are 6 permutations for each one of these posibilities. Total = 42 ways

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...