Author |
Topic: Each Letter Represents A Number - But Which One? (Read 2824 times) |
|
MathsForFun
Full Member
Posts: 153
|
|
Re: Each Letter Represents A Number - But Which On
« Reply #25 on: Aug 6th, 2010, 5:52am » |
Quote Modify
|
on Aug 6th, 2010, 5:25am, Grimbal wrote:As it happens, the original problem has always an excess of 1. I also felt cheated when I saw that. |
| Sorry about that. At the time I posted the puzzle, it didn't occur to me that I had created this vulnerability. I only realised when JohanC's post caused me to think again about solution methods. I would point out that I am not alone in making such a mistake - history is littered with mathematicians who thought they were making a cipher stronger when in fact they were making it weaker (the reflection wheel in the Enigma machine is an obvious example). Also, I give myself credit for correctly guessing that counting would be the first line of attack! Quote:I also though of optimization under constraint, but I don't know of any library right now so I would have had to find one and learn how to use it. |
| With a good setup, it could probably be done with a spreadsheet solver.
|
« Last Edit: Aug 6th, 2010, 5:55am by MathsForFun » |
IP Logged |
Everything is interesting if you look at it closely enough
|
|
|
towr
wu::riddles Moderator Uberpuzzler
Some people are average, some are just mean.
Gender:
Posts: 13730
|
|
Re: Each Letter Represents A Number - But Which On
« Reply #26 on: Aug 6th, 2010, 6:09am » |
Quote Modify
|
on Aug 6th, 2010, 5:25am, Grimbal wrote:I also though of optimization under constraint, but I don't know of any library right now so I would have had to find one and learn how to use it. |
| I've had swi-prolog's constraint library have a go at it, but after two hours it still had nothing. Maybe my computer isn't fast enough. (Well, it definitely isn't, in general.)
|
|
IP Logged |
Wikipedia, Google, Mathworld, Integer sequence DB
|
|
|
JohanC
Senior Riddler
Posts: 460
|
|
Re: Each Letter Represents A Number - But Which On
« Reply #27 on: Aug 6th, 2010, 9:50am » |
Quote Modify
|
Still wondering... The trick with real numbers wouldn't always solve the general problem when real inequalities are involved, I suppose. It might get attrackted to an optimal real solution which is not easily converted back to integers. MathsFF, which soduko-solver approach did you use? Would you eventually get all solutions to Grimbals puzzle? Or are you using constraint programming, which I also feel wouldn't always find the solution. The wiki page mentions a stochastic search, similar to the one I proposed. Did somebody try something like that?
|
|
IP Logged |
|
|
|
MathsForFun
Full Member
Posts: 153
|
|
Re: Each Letter Represents A Number - But Which On
« Reply #28 on: Aug 6th, 2010, 10:43am » |
Quote Modify
|
on Aug 6th, 2010, 9:50am, JohanC wrote:MathsFF, which soduko-solver approach did you use? |
| Integer programming. I once wrote a brute-force sudoku solver, but a friend pointed out that while it had no trouble with "normal" puzzles with, say, 30 clues, it could not manage "difficult" ones with, say 18 clues (more details on difficult sudoku puzzles in the previously linked wikipedia article), so I wrote a second one based on integer programming, and it can solve any sudoku puzzle without difficulty. Quote:Would you eventually get all solutions to Grimbals puzzle? |
| Yes - it would (it might be a slow process, though, because Grimbal's puzzle appears to have a large number of solutions - but it would find them many orders of magnitude more quickly than brute force).
|
|
IP Logged |
Everything is interesting if you look at it closely enough
|
|
|
towr
wu::riddles Moderator Uberpuzzler
Some people are average, some are just mean.
Gender:
Posts: 13730
|
|
Re: Each Letter Represents A Number - But Which On
« Reply #29 on: Aug 6th, 2010, 2:28pm » |
Quote Modify
|
on Aug 6th, 2010, 9:50am, JohanC wrote:Or are you using constraint programming, which I also feel wouldn't always find the solution. |
| As I understand it, constraint programming would always find the solutions, but it may take very, very long. It uses the constraints to limit the search space, but does search everywhere there might be a solution afaik.
|
|
IP Logged |
Wikipedia, Google, Mathworld, Integer sequence DB
|
|
|
|