Not your average table of operations

Consider the 10-digit integer

N = A B C D E F G H I J N=\overline { ABCDEFGHIJ}

(where A , B , C , D . . J A,B,C,D..J are the digits of N N ). Each digit of N N is a number between 0 0 and 9 9 inclusive and all digits of N N are different from each other.

What must be the value of N N so that the three vertical and three horizontal operations in the table below are correct?

E D J H ÷ J F = A A + + E D B × I = E H C G = = = E E I D D J = E E A E \begin{matrix} \overline { EDJH } & \div & \overline { JF } & = & \overline { AA } \\ - & \quad & + & \quad & + \\ \overline { EDB } & \times & \overline { I } & = & \overline { EHCG } \\ \quad = & \quad & = & \quad & = \\ \overline { EEID } & - & \overline { DJ } & = & \overline { EEAE } \end{matrix}

Details and assumptions

You may assue that only one value of N N satisfies the constraints above.


The answer is 5793146082.

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.

5 solutions

Jon Haussmann
Apr 14, 2014

A systematic approach is possible. For example, the units digit of E E I D D J = E E A E EEID - DJ = EEAE tells us that J + E D ( m o d 10 ) J + E \equiv D \pmod{10} . The tens digit of J F + I = D J JF + I = DJ tells us that D = J + 1 D = J + 1 . Therefore, E = 1 E = 1 .

Then the hundreds digit of A A + E H C G = E E A E AA + EHCG = EEAE tells us that H + 1 = E H + 1 = E , so H = 0 H = 0 . All the other digits can be worked out similarly.

Yes, I did it this way too. It, surprisingly, did not take that long to do.

Hint: don't use the division and multiplication rows. They are too hard to mess with.

Daniel Liu - 7 years, 1 month ago
Thaddeus Abiy
Apr 11, 2014

Here is a pure programming solution:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from itertools import *
from operator import add
Map = {chr(i+65):i for i in range(10)}

def Get_Number(permutation,String):
    Number = ''
    for Letter in String:
        Number += permutation[Map[Letter]]
    return float(Number)

def Satisfies(permutation):
    p , I = permutation , Get_Number
    if I(p,'EDJH') / I(p,'JF') != I(p,'AA'):
        return False
    elif I(p,'EDB') * I(p,'I') != I(p,'EHCG'):
        return False
    elif I(p,'EEID') - I(p,'DJ') != I(p,'EEAE'):
        return False
    elif I(p,'EDJH') - I(p,'EDB') != I(p,'EEID'):
        return False
    elif I(p,'JF') + I(p,'I') != I(p,'DJ'):
        return False
    elif I(p,'AA') + I(p,'EHCG') != I(p,'EEAE'):
        return False
    print reduce(add,permutation)
    return True

for permutation in permutations('0123456789'):
    if permutation[0]=='0':continue
    if Satisfies(permutation):
        break

Zeeshan Ali
Apr 11, 2015

You WON'T believe what I have just done to get the number.....!!

Sudip Maji
Aug 15, 2014

My solution using python bruteforce:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
import itertools
def comb():
    s = '0123456789'
    for i in itertools.permutations(s, 10):
        if i[0] == '0':
            continue
        yield i
def concat(*args):
    return int("".join(args))

for i in comb():
    a, b, c, d, e, f, g, h, i, j = i
    if concat(e,d,j,h)/concat(j,f)==concat(a,a) and \
        concat(e,d,b)*concat(i)==concat(e,h,c,g) and \
        concat(e,e,i,d)-concat(d,j)==concat(e,e,a,e) and \
        concat(e,d,j,h)-concat(e,d,b)==concat(e,e,i,d) and \
        concat(j,f)+concat(i)==concat(d,j) and \
        concat(a,a)+concat(e,h,c,g)==concat(e,e,a,e):
        print concat(a, b, c, d, e, f, g, h, i, j)
        break

Answer: 5793146082

Amit Patel
Apr 17, 2014

Approach like constrain satisfaction problem . For example take the equation with addition and subtraction first and try to get the solution for same variable , the Equation JF + I = DJ gives us D = J + 1, and the equation EEID - DJ = EEAE gives us D %10 = J + E from these two we can get E = 1 , and from equation AA + EHCG = EEAE gives us H + 1 = E , therefore H = 0, and C =9 , because, C + A = A from same equation we can get 1 carry from G + A = E .. in this similar approach we can solve for all the alphabet ..

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...