Solution
Understanding the set :-
This is a Letter coding set.
In this letters represent digits, and the goal is to determine the unique digit each letter stands for so that the arithmetic operation (usually addition or subtraction) is numerically valid.
Here are some things you should keep in mind while solving this type of set :
- A letter can't be more than 9.
- The first digit (like in BH...) cannot be 0.
- Maximum carry can be 1 (as maximum number = 9 if added it with the same, we get maximum number = 9 + 9 = 18 , here also carry which can go is 1)
| B | H | 1 | 1 | G | F | ||
| + | 1 | H | J | F | K | F | |
| 1 | 1 | F | G | C | 1 | F |
Let's start with A
A can only be 1
As, B + A = AA
=> A is a carry when we add B + A
Now, even if we add highest numbers i.e., 9 + 9 = 18 (1 is carry)
=> carry can only be 1.
Therefore, A will be 1.
| B | H | 1 | 1 | G | 0 | ||
| + | 1 | H | J | 0 | K | 0 | |
| 1 | 1 | 0 | G | C | 1 | 0 |
Now, let's take F :-
We know, F + F = F
Which is only possible for 0 + 0 = 0
=> F = 0
| 9 | H | 1 | 1 | G | 0 | ||
| + | 1 | H | J | 0 | K | 0 | |
| 1 | 1 | 0 | G | C | 1 | 0 |
For B;
We know, B + 1 = 11
=> B = 10
But, B can't be a two digit number
=> a carry would have been added to B
(we know, maximum carry can be 1)
=> B will be 10 - 1 = 9
| 9 | 5 | 1 | 1 | G | 0 | ||
| + | 1 | 5 | J | 0 | K | 0 | |
| 1 | 1 | 0 | G | C | 1 | 0 |
For H ;
We know , H + H = 0
There are 2 possibility for that :
-
H = 0
-
H = 5
But, we already have F = 0
Therefore, H = 5
| 9 | 5 | 1 | 1 | G | 0 | ||
| + | 1 | 5 | J | 0 | K | 0 | |
| 1 | 1 | 0 | G | 2 | 1 | 0 |
For C ;
We know, A + F = C
or, 1 + 0 = C
If there is no carry,
then, C = 1
But A is 1
Therefore, there will be a carry here.
=> C = 1 + 0 + 1(carry)
=> C = 2
| 9 | 5 | 1 | 1 | G | 0 | ||
| + | 1 | 5 | J | 0 | K | 0 | |
| 1 | 1 | 0 | G | 2 | 1 | 0 |
For G ;
We know, G + K = 11
Possibilities are -
-
9 + 2 (but we have C = 2 and B = 9, therefore, case is rejected)
-
8 + 3
-
7 + 4
-
6 + 5 (but we already have H = 5, therefore, case rejected)
| 9 | 5 | 1 | 1 | 7 | 0 | ||
| + | 1 | 5 | 6 | 0 | 4 | 0 | |
| 1 | 1 | 0 | 7 | 2 | 1 | 0 |
| 9 | 5 | 1 | 1 | 8 | 0 | ||
| + | 1 | 5 | 7 | 0 | 3 | 0 | |
| 1 | 1 | 0 | 8 | 2 | 1 | 0 |
| 9 | 5 | 1 | 1 | 4 | 0 | ||
| + | 1 | 5 | 3 | 0 | 7 | 0 | |
| 1 | 1 | 0 | 4 | 2 | 1 | 0 |
Now, let's consider all the cases -
Case - 1 : G=3 and K=8, here J =2 which is not possible as C =2
Case - 2 : G=8 and K=3, J=7, a possible case.
Case - 3 : G=4 and K=7, J=3 possible
Case - 4 : G=7 and K=4, J=6 possible
| 9 | 5 | 1 | 1 | 7 | 0 | ||
| + | 1 | 5 | 6 | 0 | 4 | 0 | |
| 1 | 1 | 0 | 7 | 2 | 1 | 0 |
| 9 | 5 | 1 | 1 | 8 | 0 | ||
| + | 1 | 5 | 7 | 0 | 3 | 0 | |
| 1 | 1 | 0 | 8 | 2 | 1 | 0 |
| 9 | 5 | 1 | 1 | 4 | 0 | ||
| + | 1 | 5 | 3 | 0 | 7 | 0 | |
| 1 | 1 | 0 | 4 | 2 | 1 | 0 |
From the table it is clear that 6 cannot be represented by G.