Re: four digits must total 24



On Dec 19, 12:32�pm, The Translucent Amoebae <transamoe...@xxxxxxxxxx>
wrote:
On Dec 10, 8:08 pm, azure <k...@xxxxxx> wrote:





Given four digits, �use each only once, use +, -, *, /, �to make the
total of 24.
Some newspapers print such a puzzle, some are easy (relatively) some
more obscure, but how would a computer program solve such a puzzle?
2,7,8,9 � = 2(7+9)-8
3,5,5,7 � = �(3*5 -7) *3
1,2,7,7 � = (7*7 - 1 )*2
There are hundreds of possible numbers that can be used �1,1,1,8 �is
the lowest (1+1+1)*8 � the highest (in ascending order of course) is
around �6,6,6,6 �or a bit higher.
I think one would have to build a database of all solutions, and then
compare the given digits to the db? �I don't think a program could be
written to solve it.
My bio-organic CPU (aka brain) looks for the factors of 24,
1,2,3,4,6,8,12 � and tries to get one or more of these.
Any other suggestions?

My Solution would be to first discover all ways of creating 24 with 2
digits
Using each of the Operators that are allowed.

This quickly yields 4 * 6
And since you need 2 more numbers to make it work,
Try reducing 4 & 6 in the same manner
4(2*3)
hmmm...
(9-5)(2*3)
Is that it?

That's one. How 'bout the other 4139 solutions?
And what if you're given the digits and only allowed
to choose the operators?
.



Relevant Pages

  • Re: four digits must total 24
    ... Some newspapers print such a puzzle, ... more obscure, but how would a computer program solve such a puzzle? ... This is similar to the UK TV show Countdown where up to 6 numbers, have to be arranged by contestants to form a target 100 to 999. ...
    (rec.puzzles)
  • Re: four digits must total 24
    ... Some newspapers print such a puzzle, ... more obscure, but how would a computer program solve such a puzzle? ... compare the given digits to the db? ...
    (rec.puzzles)
  • Re: four digits must total 24
    ... Some newspapers print such a puzzle, ... more obscure, but how would a computer program solve such a puzzle? ... compare the given digits to the db? ...
    (rec.puzzles)
  • Re: four digits must total 24
    ... Some newspapers print such a puzzle, ... more obscure, but how would a computer program solve such a puzzle? ... compare the given digits to the db? ...
    (rec.puzzles)
  • four digits must total 24
    ... Some newspapers print such a puzzle, ... more obscure, but how would a computer program solve such a puzzle? ...
    (rec.puzzles)

Loading