What is the mathematical approach to solving letter/digit code puzzles?

  • Thread starter Thread starter t_n_p
  • Start date Start date
  • Tags Tags
    Code Puzzle
Click For Summary
SUMMARY

The discussion focuses on solving letter/digit code puzzles, where letters represent digits in equations like FUN + JOKE = HAHA. Participants highlight that while trial and error is a common method, algebraic manipulation can provide shortcuts. For example, grouping like terms can simplify the problem, but the complexity increases with more unknowns. The consensus is that brute force is often necessary, and not all puzzles guarantee a unique solution.

PREREQUISITES
  • Understanding of basic algebraic manipulation
  • Familiarity with digit representation in equations
  • Knowledge of logical reasoning in problem-solving
  • Experience with trial and error methods in puzzles
NEXT STEPS
  • Research advanced techniques in combinatorial optimization
  • Explore algorithms for solving constraint satisfaction problems
  • Learn about digit substitution methods in cryptarithms
  • Investigate logical deduction strategies for puzzle-solving
USEFUL FOR

Mathematicians, puzzle enthusiasts, educators, and anyone interested in enhancing their problem-solving skills in letter/digit code puzzles.

t_n_p
Messages
593
Reaction score
0

Homework Statement



I was flicking through the newspaper the other day and noticed there is a type of puzzle where words are added together to form a sum.

Each letter represents one of the digits 0-9,

for example:

FUN
+JOKE
=HAHA

and the aim of the puzzle is to find which letters correspond to which digits

I was just wondering if there is any mathematical basis to solving this puzzle or whether trial and error is the only way to do these.

Cheers
 
Physics news on Phys.org
A little algebraic short-cut would be to ignor the actual words and group the like terms.

E.g. for your example you could write: FUN + JOKE = 2H +2A

Of course this equation has more than one unknown quantity so clearly more information would (and probably was) be provided. If this is not the case then you would have to write out ABCDE..., index each with 12345... and then begin some simple manipulation of the indoexes until you get a fit to the equation given.

Hope this helps ;)
 
DJsTeLF said:
A little algebraic short-cut would be to ignor the actual words and group the like terms.

E.g. for your example you could write: FUN + JOKE = 2H +2A

Of course this equation has more than one unknown quantity so clearly more information would (and probably was) be provided. If this is not the case then you would have to write out ABCDE..., index each with 12345... and then begin some simple manipulation of the indoexes until you get a fit to the equation given.

Hope this helps ;)

fyi, you cannot write FUN + JOKE = 2H +2A.

The letters merely are a direct substitute for the numbers. For example if H = 1, A = 2 then HAHA = 1212 ≠ 2(1) + 2(2) = 6.

No further information is provided, hence why I am asking if there is a better way than trial and error.
 
t_n_p said:
The letters merely are a direct substitute for the numbers. For example if H = 1, A = 2 then HAHA = 1212 ≠ 2(1) + 2(2) = 6.

Oops, so it is (not). Point conceeded, I believe my second point still stands though..
 
well I figured it out,

FUN = 741
JOKE = 8652
HAHA = 9393

But my original question still stands, trial and error or is there a better way!
 
Assuming decimal system

1000J + 100(F+O) + 10(U+K) + N + E = 1010H + 101A

There is additional information that all unknowns are small integers. Not every question of this type has a solution, not every question has a unique solution. It can be solved by brute force, I am not aware of any faster general method. Sometimes it is possible to get some specific information from simple logical analysis - for example, assuming each letter is assigned different digit, it is obvious that H=J+1.
 
Borek said:
Assuming decimal system

1000J + 100(F+O) + 10(U+K) + N + E = 1010H + 101A

There is additional information that all unknowns are small integers. Not every question of this type has a solution, not every question has a unique solution. It can be solved by brute force, I am not aware of any faster general method. Sometimes it is possible to get some specific information from simple logical analysis - for example, assuming each letter is assigned different digit, it is obvious that H=J+1.

Ah this bold part does help a little bit. But you mentioned not every question of this type has a solution. Why do you say that? These sorts of questions get published in newspaper back pages alongside soduku and crossword, so I would be hoping they have solutions! Nevertheless I do understand that in some cases there may be more than 1 solution as you have pointed out.

Also yes, I did recognise the H=J+1, which makes things slightly easier but I think so far from the replies I've received the general concencus is that brute force trial and error is the best (and only?) way to do these questions.
 
t_n_p said:
But you mentioned not every question of this type has a solution. Why do you say that? These sorts of questions get published in newspaper back pages alongside soduku and crossword, so I would be hoping they have solutions!

Those published should have solutions, but it doesn't mean you can write something random and assume it can be solved - IT+IS+NOT<>POSSIBLE.
 
^^^

yes of course I am aware of this.
 

Similar threads

  • · Replies 37 ·
2
Replies
37
Views
4K
  • · Replies 5 ·
Replies
5
Views
5K
Replies
13
Views
4K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
29
Views
5K
  • · Replies 26 ·
Replies
26
Views
5K