53 of 100: A Gram From Mars

Logic Level 2

M A R S M A R M A + M G R A M \begin{array} {ccccc} \large & & \color{#69047E}M & \color{#D61F06}A & \color{#20A900}R & \color{#3D99F6}S\\ \large & & & \color{#69047E}M & \color{#D61F06}A & \color{#20A900}R\\ \large & & & & \color{#69047E}M & \color{#D61F06}A\\ \large + & & & & & \color{#69047E}M \\ \hline \large & & \color{#EC7300}G & \color{#20A900}R & \color{#D61F06}A & \color{#69047E}M \end{array}

If each letter represents a different nonzero digit, what must A \color{#D61F06}A be?

Don't forget that when adding 4 digits, you might get a carry digit as large as 3.

1 2 3 4 5

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.

10 solutions

Kazem Sepehrinia
Jul 22, 2017

From ones place S + R + A S+R+A is divisible by 10 10 and since S + R + A < 30 S+R+A<30 , then S + R + A = 10 S+R+A=10 or S + R + A = 20 S+R+A=20 .

If S + R + A = 10 \color{#3D99F6} S+R+A=10 , then from tens place 1 + R + M 1+R+M is divisible by 10 10 . But 1 + R + M < 20 1+R+M<20 , so 1 + R + M = 10 \color{#3D99F6} 1+R+M=10 . Since G > M G>M there must be a carry over from hundreds place and since 1 + A + M < 20 1+A+M<20 it must be 1 1 . Thus 1 + A + M = 10 + R \color{#3D99F6} 1+A+M=10+R . Combine three blue relations to get A = 2 R \color{#D61F06} A=2R and S = 10 3 R \color{#D61F06} S=10-3R . Thus R R can be 1 , 2 , 3 1, 2, 3 only and gives S = 7 , 4 , 1 S=7, 4, 1 , A = 2 , 4 , 6 A=2, 4, 6 , M = 8 , 7 , 6 M=8, 7, 6 , and G = 9 , 8 , 7 G=9, 8, 7 respectively. Notice that only ( R , S , A , M , G ) = ( 1 , 7 , 2 , 8 , 9 ) \color{#D61F06} (R, S, A, M, G)= (1, 7, 2, 8, 9) contains no repeated digit and it is a solution.

If S + R + A = 20 \color{#3D99F6} S+R+A=20 , then from second column 2 + R + M 2+R+M is divisible by 10 10 . But 2 + R + M < 20 2+R+M<20 , so 2 + R + M = 10 \color{#3D99F6} 2+R+M=10 . Again, since G > M G>M one can conclude that 1 + A + M = 10 + R \color{#3D99F6} 1+A+M=10+R . Combine three blue relations to get A = 2 R + 1 \color{#D61F06} A=2R+1 and S = 19 3 R \color{#D61F06} S=19-3R . Thus R R can only be 4 4 and gives S = 7 S=7 , A = 9 A=9 , M = 4 M=4 , and G = 5 G=5 . There is a repeated digit here.

Therefore, ( R , S , A , M , G ) = ( 1 , 7 , 2 , 8 , 9 ) (R, S, {\color{#D61F06}A}, M, G)= (1, 7, {\color{#D61F06}2}, 8, 9) is the only solution.

I rechecked the solution and believe it to be correct. Congratulations. Edwin Gray

Edwin Gray - 3 years, 10 months ago

Since g is not equal to m, there must be a carry over from A + M. Therefore A + M must be greater than 10. contrary to the solutions. I think the problem is not well posed. Edwin Gray

Edwin Gray - 3 years, 10 months ago

Log in to reply

That is not certainly true. It can be possible that A + M A + M is either 8 8 or 9 9 , which actually depends on the carry digit from the tens-digit sum. Thus, we can't assume that A + M 10 A + M \geq 10 .

I believe Kazem's solution is great as he explained the approach clearly.

Michael Huang - 3 years, 10 months ago

Log in to reply

From the hundreds column we see that A + M must be at least 10. The arithmetic of the tens column implies that the number being carried is exactly 1. It cannot be 0 for the obvious reason that A is one of the terms and the number at the bottom. It also cannot be 2, because R + M is at most 17, and the number carried from the units column is at most 2. Therefore it is 1. So the sum in the hundreds column is 1 + A + M = 10 + R, since a digit must be carried to the thousands column. A value of (A+M) less than 10 would negate this equation. Contrary to what Edwin argues, a value of (A+M) = 10 does not contradict this equation. It just forces R=1. As is indicated in the solution. Checking the validity of a digit substitution problem is pretty straightforward.

8217 +821 + 82 + 8 = 9128

Richard Desper - 3 years, 10 months ago
Nikita Mahilewets
Jul 23, 2017

For me it is absolutely beyond my intelligence limits to solve such digit puzzles honestly So I prefer to solve them writing nested loops with conditions using Python That time it took 20 lines of code I have split some lines for better readability

I've been asking similar to this on a number of questions: I couldn't code to save my soul, but I did solve it by playing around with the numbers on Excel - I usually do this sort of Q by looking at the number relations, but this was above my pay grade. I don't see what's wrong with using a computer - it's a vital piece of a mathematician's kit. Sometimes you you exactly the same techniques, but it's just cleaner and neater.

Katherine barker - 3 years, 10 months ago

Log in to reply

I think that using programming languages is not cheating, but when I use them I feel myself as a cheater. I used C++ programs made by myself to solve some other problems, when I understand the process but cant handle the calculus by myself, I use the PC. Normally, in a hard problem that I cant solve, I make a guess and then I verify it with a computer program (if it is possible of course).

Stefano Gallenda - 3 years, 10 months ago

Is it considered cheating being able to code a program to do the dirty work for you? (I used C++, with comment to remind to miself the problem goal, and splitting the conditions & output lines it is around 50 lines)

Stefano Gallenda - 3 years, 10 months ago

Solving like that is bad because it doesn't actually teaches you anything Unless you are poor at programming

Nikita Mahilewets - 3 years, 10 months ago

Log in to reply

Also, for me, I'm doing these puzzles for fun, and also to give me material for my post-retirement job of tutoring kids up to 16. I'm 61 and I could live happily without learning anything new - but my life, alas, is so not like that. the thing

Katherine barker - 3 years, 10 months ago
Sundar R
Jul 23, 2017

There definitely has to be a carryover in all the additions (except the one involving the thousands) since M <> G and R +M + 1/2/3 cannot be equal to A but would be of the form 10k + A. Now, it seems reasonable to assume the carry over in all the additions (except the additions involving the units digits : S, R A, and M) is 1.

Now S + R + M + A can be 30 at max if the digits are 9,8,7 and 6 in whatever order but this results in a digit other than the 4 and hence is not possible since the sum has to end in 1 of the 4 digits.

So,

S + R + A + M = 20 + M…..(!)

or

S + R + A + M = 10 + M…(2)

Let us examine (1)

Now M + 1 = G

A + M + 1 = 10 +R

A + M = 9 + R

R + A + M + 2 (carry over of 2 from the first addition) = 10 + A

2R + 11 = 10 + A

A – 2R = 1

A = 2R + 1

Giving the possibilities R=1,A=3 / R=2, A = 5/ R = 3, A = 7,/ R = 4, A = 9

Now S + R + A = 20

Which leaves only the last possibility of R = 4, A = 9,

This gives us S = 7.

To find the value of M, we use R + A + M + 2 = 10 + A

4 + 9 + 2 + M = 19

Giving a value of M = 4 but this equals R and hence is not possible

Now we go to (2)

A + M + 1 = 10 + R..

R + (A + M + 1) = 10 + A

R + 10 + R = 10 + A

10 + 2R = 10 + A

A = 2R

2R + M + 1 = 10 + R

R + M + 1 = 10

R + M = 9

Let us start with

R = 1, A = 2, M = 8

Which works !!

The remaining digits are S = 7 (S + R + A = 10) and G = M + 1 = 9

I upvoted because I also solved it in a similar method

Kushal Dey - 3 years, 9 months ago
Syrous Marivani
Jul 23, 2017

A + R + S = 10, ! + R + M = 10, 1 + A + M = R + 10. 1 + M = G,

R + G = 10. A + G = R + 10 = 2R + G, A = 2R, 3R + S = 10 = R + G

2R + S = G, A + S = G, R + G = 10, R = 1, G = 9. M= 8, S = 7, A = 2

                                 8   2   1   7

                                       8    2   1

                                              8    2

    +                                               8

                                     9     1    2     8

LaTex: M A R S + M A R + M A + M = G R A M \Large \overline{MARS}+\overline{MAR}+\overline{MA}+\overline{M} = \overline{GRAM}

LaTex: ( 1000 M + 100 A + 10 R + S ) + ( 100 M + 10 A + R ) + ( 10 M + A ) + ( M ) = 1000 G + 100 R + 10 A + M \normalsize (1000M+100A+10R+S)+(100M+10A+R)+(10M+A)+(M) = 1000G+100R+10A+M

LaTex: ( 0 + 0 + 0 + S ) + ( 0 + 0 + R ) + ( 0 + A ) + ( M ) 0 + 0 + 0 + M ( m o d 10 ) \normalsize (0+0+0+S)+(0+0+R)+(0+A)+(M) \equiv 0+0+0+M \pmod {10}

LaTex: R + S + A 0 ( m o d 10 ) A + S 9 R ( m o d 10 ) \Large R+S+A \equiv 0 \pmod {10} \iff A+S \equiv 9R \pmod {10}

LaTex: We get too, adding in column : \large \text {We get too, adding in column :}

LaTex: S + R + A + M = M A + S 9 R ( m o d 10 ) ( I ) \Large S+R+A+M=M \iff A+S \equiv 9R \pmod {10} \; (I)

LaTex: 1 + R + A + M = A 9 M + R ( m o d 10 ) ( I I ) \Large 1+R+A+M=A \iff 9 \equiv M+R \pmod {10}\; (II)

LaTex: 1 + A + M = R A + 1 R M ( m o d 10 ) ( I I I ) \Large 1+A+M=R \iff A+1 \equiv R-M \pmod {10} \; (III)

LaTex: 1 + M = G G M = 1 G M + 1 ( m o d 10 ) ( I V ) \Large 1+M=G \iff \boxed{G-M=1} \iff G \equiv M+1 \pmod{10} \; (IV)

LaTex: ( I I ) and ( I I I ) A 2 R ( m o d 10 ) ( V ) \Large (II) \;\text {and}\; (III) \Rightarrow \color{#3D99F6}{ A \equiv 2R \pmod {10} }\; (V)

LaTex: ( I ) and ( V ) S 7 R ( m o d 10 ) ( I ) \Large (I) \;\text {and}\; (V) \Rightarrow S \equiv 7R \pmod {10} \; (I)

LaTex: A 2 R ( m o d 10 ) (A is even) A { 2 ; 4 ; 6 ; 8 } \Large \color{#3D99F6}{A \equiv 2R \pmod {10} \;\Rightarrow \text {(A is even)} \iff A \in \{2;4;6;8\} }

Latex: i f A = 8 using ( I ) ( I I ) ( I I I ) ( I V ) ( V ) : A = S = 8 unacceptable \Large if \;A=8 \Rightarrow \text{using} (I)(II)(III)(IV)(V) : A=S=8 \; \text {unacceptable}

Latex: i f A = 6 using ( I ) ( I I ) ( I I I ) ( I V ) ( V ) : A = M = 6 unacceptable \Large if \;A=6 \Rightarrow \text{using} (I)(II)(III)(IV)(V) : A=M=6 \; \text {unacceptable}

Latex: i f A = 4 using ( I ) ( I I ) ( I I I ) ( I V ) ( V ) : A = S = 4 unacceptable \Large if \;A=4 \Rightarrow \text{using} (I)(II)(III)(IV)(V) : A=S=4 \; \text {unacceptable}

Latex: i f A = 2 using ( I ) ( I I ) ( I I I ) ( I V ) ( V ) : we get : \Large if \;A=2 \Rightarrow \text{using} (I)(II)(III)(IV)(V) : \; \text {we get : }

Latex: R = 1 \Large \color{#624F41}{ \boxed{R=1}} Latex: G = 9 \Large \color{#624F41}{ \boxed{G=9}} Latex: M = 8 \Large \color{#624F41}{ \boxed{M=8}} Latex: S = 7 \Large \color{#624F41}{ \boxed{S=7}}

Latex: That solution meets the requirements of (I)(II)(III)(IV)(V), then : \Large \text {That solution meets the requirements of (I)(II)(III)(IV)(V), then : }

Latex: A = 2 \Huge \color{#D61F06}{\boxed {A = 2}}

i think the problem is not as tough as you thought.the 1st 3 variables were quite easy to find. then making condition you could have found them easily

Mohammad Khaza - 3 years, 10 months ago

Log in to reply

Everyone according to one's background resolve the problem. I found the congruence method could solve it easily, and it was. You have to know I left school when I was 16.

Frédéric Deleria - 3 years, 10 months ago
Mohammad Khaza
Jul 23, 2017

at first, as each letter represents nonzero digit, so,we can say that all the letter represents between 1 to 9 (integers).

secondly,M,A,R,S,G-------so, there will be 5 integers among 1 to 9.

now,column 4 from left side------

S + R + A + M = 10 + M…(2)...........................[if they are 9,8 7,6 it would be more than 10, but it is not possible.]

now,

Now M + 1 = G

or, A + M + 1 = 10 +R

or, A + M = 9 + R

or, R + A + M + 2 ( 2 from the first addition) = 10 + A

or, 2R + 11 = 10 + A

or, A – 2R = 1

or, A = 2R + 1

now, assuming those possibilities,

we can say that,

A + M + 1 = 10 + R..

or, R + (A + M + 1) = 10 + A

or, R + 10 + R = 10 + A

or, 10 + 2R = 10 + A

or, A = 2R

or, 2R + M + 1 = 10 + R

or, R + M + 1 = 10

or, R + M = 9...................................[1]

so, at last counting all those possibilities ,we can say that,

A=2

S=7

G=9

now, from [1], we have got that R+M=9

so, only possible value for these two which fills the condition is, R= 8 or 1 , M=1 or 8. but R=8 and M=1 fills the requirement.

so ,we can say that,

M=8

A=2

R=1

S=7

G=9 ..............................this must be the solution.

K T
Jan 11, 2019

Subtract 10A+M to simplify the problem to M A R S M 0 R M A G R 0 0 \begin{matrix} M & A & R & S \\ & M & 0 & R \\ & & M & A \\ G & R & 0 & 0 \end{matrix} From the ones column we see S + R + A = S+R+A= either 10 10 or 20 20 , so a 1 or 2 is carried to the tens column.

From the tens colums we then see R + M = R+M = either 8 8 or 9 9 (Note that the sum of 2 different digits is 17 at maximum), so a 1 is carried to the hundreds column.

From the hundreds column we then have 1 + A + M = R + 10 1+A+M= R+10 .

Substitute M = (8 or 9) R M= \textrm{(8 or 9)} -R into this, we get A = 2 R + (0 or 1) R < 5 A= 2R+ \textrm{(0 or 1)} \Rightarrow R<5

This leaves us with these possibilities R { 1 , 2 , 3 , 4 } , M { 8 R , 9 R } R \in\{1,2,3,4\}, M \in\{8-R, 9-R\} , where A,S and G are functions of R and M We check each possibility:

R M A=9+R-M S=10-R-A or 20-R-A G=M+1 comment
4 4 same digits
4 5 8 8 same digits
3 5 7 0 no 0 allowed
3 6 6 same digits
2 6 5 3 7 check: 6523+652+65+6=7246 incorrect, 7236 expected
2 7 4 4 same digits
1 7 3 6 8 check: 7316+731+73+7=8127 incorrect, 8137 expected
1 8 2 7 9 check: 8217+821+82+8=9128, correct

So the only correct solution is in the last line, and A = 2 A = \boxed{2}

Daniel Kolmogorov
Jul 29, 2017

Since A plus M and a carry of 1 gets R, then going back to S+R+A+M, A+M must be greater than 10, and A is between 1 and 5, so whatever number it gives from 11 to 19 one must write the unit digits +1 as R, since M=R, and at the same time M must have a carry of 1. We know that M is not 9, then we can omit some cases, applying this cases we are left with 5 options to try, from which just the case of letting M=8, A=2, R=1+1, and S=7, is the only one that works, because S+R+A=10 in order to get S+R+A+M=M, then from that data we get G=9.... Sorry if I don't express my idea clearly, I swear I could explain it better face to face...

Auro Light
Jul 23, 2017

First column from left gives G = M+1,
Second column shows 1+A+M=10+R,
Or, A+M = 9+R, The sum results into following equation;
1000M+100A+10R+S+100M+10A+R+10M+A+M = 1000G+100R+10A+M,
Substituting G=M+1, and M=9+R-A, and simplifying gives,
9A = 21R +S - 10,
Or, A = 2R + (3R + S - 10)/9,
This equation shows that R can not exceed 4 as A is less than 9 (A=9 is also not possible as in A+M=R+9, M can not equal R).
For values of R less than or equal to 4,
(3R + S) will have to be equal to 10 so as to avoid values of A in fraction.
This gives A = 2R or R = A/2,
and 3R+S=10 or 3A+2S = 20,
Since A is not equal to S, A and S are not equal to 4.
Similarly, A+M=9+R gives,
A + 2M = 18, and since A and M are not equal, A and M can not be 6, so from 3A+2S=20, S can not be 1.
Now, from 3A + 2S = 20, we have,
A = 6 - (S - 1)/3, for A to be a natural number,
S should be 1, 4 or 7, but we have already seen above that S can not be 1 or 4,
so S=7 and consequently A = 2.









David Conaway
Jul 23, 2017

I used matrix logic by setting up a table with rows 1-9 and columns G R A M S.

I then used facts from the system of equations you can create to eliminate all possibilities. For instance, starting with the first possibility that the carry from ones column was 1, since the thousands place column has M as input in G is the output, and we know they are not allowed to be equal, then the hundreds place has at most a carry of one. This means G = M+1 and since M,G<>0 then G<>1 and M<>9 etc...

Other facts I found, A=2R so A is even S=3R R+M=9

I added other facts I found along the way eliminating down to only one poss I added other facts I found along the way. This illuminated down to only one possibility. A=2

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...