You are not logged in.
27638
2 (7 - 6) + 3 + 8 = 13
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
27651
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson
Offline
27664
2 + 7 (6 / 6) + 4 = 13
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
27677
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson
Offline
27690
27 - 6 - 9 + 0! = 13
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
27703
2 x 7 - 7 + 0 + 3! = 13
A puzzle:
TWO - SEVEN - SEVEN + ZERO + THREE = 27703
Each letter in the puzzle stands for a different single-digit number from 0 to 9.
Also, one third of the reverse of the sum of the digits on the left-hand side of the equation = 13.
Find the letter values. The puzzle has a unique solution.
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson
Offline
27716
27 - 7 - 1 - 6 = 13
Also, one third of the reverse of the sum of the digits on the left-hand side of the equation = 13.
I do not understand, can you explain?
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
27729
2 + 7 - 7 + 2 + 9 = 13
I do not understand, can you explain?
One third of (the reverse of (the sum of (the digits on the left-hand side of the equation))) = 13.
ie, add up all the digits that appear on the left-hand side of the equation, reverse the answer, and divide the result by 3. The answer should be 13.
eg,
532-12677-12677+1542+50983 = 27703
5+3+2+1+2+6+7+7+1+2+6+7+7+1+5+4+2+5+0+9+8+3 = 93
93 reversed = 39
39 / 3 = 13
When a puzzle like this comprises 10 different letters it's a fluke if there's a unique solution - which I wanted to achieve - and so I added that constraint (while still maintaining a link to the number 13).
Last edited by phrontister (2015-10-09 14:06:22)
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson
Offline
27742
2*7 - 7 + 4 + 2 = 13
532-12677-12677+1542+50983 = 27703
Unfortunately, my program did not spit that out.
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
27755
2 + 7 / 7 + 5 + 5 = 13
Unfortunately, my program did not spit that out.
It wouldn't, cos those numbers are incorrect. I only used them to illustrate my example.
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson
Offline
27768
Hi phrontister;
582 - 13937 - 13937 + 4362 + 50633 = 27703
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
27781
2 x 7 + 7 - 8 x 1 = 13
Hi Bobby;
Correct!
I adapted your M code to solve it and give the sole answer. I tried doing that with Rasher's but got too tangled and scrapped the idea.
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson
Offline
27794
I used rashers code for it.
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
27807
I had used rasher's code too, for my first try at it. It gave 7 solutions, which I copied into Excel via 'Copy As'/'Plain Text', which handily automatically enters the results into separate cells. Then above those cells I entered a row containing the number of occurrences of each letter, multiplied them by the pasted values, summed the results, reversed those and divided by 3...which confirmed the unique solution. All quite quick and easy.
But then I wanted to try the Excel bit in M, which is when I struck a snag with rasher's code and so used yours instead.
EDIT: Success! I copied the adapted code (the bit that I used Excel for) from your code, pasted it into rasher's, and ran it on the 'solutions[[1]]' variable. Placing a semicolon after '// Framed]]' suppresses rasher's framed 7-solution output, leaving the unique solution as the sole output.
{t,w,o,s,e,v,n,z,r,h}
{5,8,2,1,3,9,7,4,6,0} 13
Last edited by phrontister (2015-10-10 14:17:19)
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson
Offline
27820
-2 + 7 + 8(2^0) = 13
I am adjusting rasher's code to be more versatile.
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
27833
2 x 7 + 8 - 3 x 3 = 13
Hi Bobby;
In what way/ways do you want to make rasher's code more versatile?
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson
Offline
27846
2 - 7 + 8 + 4 + 6 = 13
I want it to handle numbers and letters. To handle any number of them. To do multiplications and divisions if possible and to make into a function.
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
27859
Hi Bobby;
I guess you already know that rasher's code handles other maths operators (eg, multiplication and division) like your code does: ie, the required operators need to be manually entered into the code.
It can also handle numbers as long as the term they're in only contains numbers, and that the 'FromDigits' function is removed from the term where it appears in the 'Solve It' and 'Display Results & Checks' sections.
Ideally, I'd like to be able to just enter the equation (say, into an Input prompt) and then evaluate the notebook.
I've recently tweaked the code of my StringPosition solver (used in this puzzle) that we discussed around post #520. I'd only set it up then for 4-digit numbers, so had to apply a fix for these 5-digit numbers. Now it will handle numbers of 'any' length (within reason); and I've also restricted the 'N' output to be the exact length required.
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson
Offline
That is what I want to do too, just enter the equation and constraints and let the program figure all the rest out.
27872
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
27885
2 x 7 - (8/8)^5
x = post#:
For the contraints, you could probably leave 'mustdiffer=True' in the code, as in most (all?) cases for these puzzles all letters assume differing values.
Also, terms commencing with zero should probably be outlawed and that could be coded in too.
I wonder if that additional constraint I included in my post #2131 could have been included in rashers constraint list instead of me coding for it separately at the end? I'll look at that, I think.
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson
Offline
27898
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
27911
- 2 + 7 + 9 - 1 x 1 = 13
A puzzle:
TWO - SEVEN + NINE + ONE x ONE = 27911
Each of the eight different letters in the puzzle stands for a different single-digit number chosen from the range 0 to 9 (meaning two of these ten numbers aren't used).
Find the letter values. The puzzle has a unique solution.
Last edited by phrontister (2015-10-11 23:08:25)
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson
Offline
27924
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
27937
Correct!
Did you use rasher's code? It took my rasher's about 50 minutes to solve, but your code just 25 seconds! Looks like rasher's didn't like the fact that two values (2 & 8) were missing from its 10-number range (0 - 9), but yours didn't mind.
I set the puzzle up a bit differently than others that I've posted by including multiplication and not using up all of the numbers in the given range, just in case you wanted to try those differences out on your adjusted rasher.
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson
Offline
27950
27 - 9 - 5 - 0 = 13
I used my code.
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline