|
-
Jan 11th, 2009, 02:10 AM
#1
Solve Puzzles
Hai friends,
When puzzles of this type put on, how effecinetly solve them insted of trying 100's of patters and wasting time
example
-----------
Question:Using 1 through 9 in order, and using only addition or subtraction, create an equation that equals 100.
<Note:I have 10kinds of answers for this>
i.e:. Look at the following example:
Notice that the digits 1 through 9 are used in order to arrive at 106.
1 + 23 - 4 + 5 - 6 + 78 + 9 = 106
---------------
-
Jan 11th, 2009, 03:52 AM
#2
My usual boring signature: Something
-
Jan 11th, 2009, 04:27 AM
#3
Re: Solve Puzzles
dclamp,
Great!
But, i did not expect the answer here 
Just want to no how to approach to solve it 
how many attempts you tried neally?
-
Jan 11th, 2009, 04:29 AM
#4
My usual boring signature: Something
-
Jan 11th, 2009, 04:33 AM
#5
Re: Solve Puzzles
Try working backwards... takes a few attempts.
-
Jan 11th, 2009, 06:51 AM
#6
-
Jan 11th, 2009, 10:14 AM
#7
Re: Solve Puzzles
Well he doesn't have a girlfriend, per se, but google shows him lots of dirty pictures so it's close enough
-
Jan 11th, 2009, 02:38 PM
#8
Re: Solve Puzzles
Between each digit you can have one of three things:
"+"
or
"-"
or
""
So that gives you 6561 possible equations, the vast majority of which do not equal 100.
Brute forcing this would be the easiest algorithm but the execution time would be terribly slow. It would be exponentially computationally expensive if you used a larger radix (hexadecimal or base32 etc).
Depends if you want to find ANY single correct answer or ALL correct answers.
You could always use a Genetic Algorithm or a Monte Carlo method, those would both certainly be very efficient for this puzzle if the radix is not specified before-hand.
I don't live here any more.
-
Jan 12th, 2009, 06:10 AM
#9
Re: Solve Puzzles
 Originally Posted by wossname
Between each digit you can have one of three things:
"+"
or
"-"
or
""
So that gives you 6561 possible equations, the vast majority of which do not equal 100.
Brute forcing this would be the easiest algorithm but the execution time would be terribly slow. It would be exponentially computationally expensive if you used a larger radix (hexadecimal or base32 etc).
Depends if you want to find ANY single correct answer or ALL correct answers.
You could always use a Genetic Algorithm or a Monte Carlo method, those would both certainly be very efficient for this puzzle if the radix is not specified before-hand.
Thans wossi for the explanation
-
Jan 13th, 2009, 11:47 PM
#10
Re: Solve Puzzles
12345679 * 9 = 111111111
12345679 * 18 = 222222222
12345679 * 27 = 333333333
12345679 * 36 = 444444444
12345679 * 45 = 555555555
12345679 * 54 = 666666666
12345679 * 63 = 777777777
12345679 * 72 = 888888888
12345679 * 81 = 999999999
-
Jan 14th, 2009, 12:18 AM
#11
Re: Solve Puzzles
 Originally Posted by MartinLiss
12345679 * 9 = 111111111
12345679 * 18 = 222222222
12345679 * 27 = 333333333
12345679 * 36 = 444444444
12345679 * 45 = 555555555
12345679 * 54 = 666666666
12345679 * 63 = 777777777
12345679 * 72 = 888888888
12345679 * 81 = 999999999
oh cool
-
Jan 14th, 2009, 03:17 PM
#12
Re: Solve Puzzles
This BASH command will give you the equations that match...
Code:
for i in {"1+","1-","1"}{"2+","2-","2"}{"3+","3-","3"}{"4+","4-","4"}{"5+","5-","5"}{"6+","6-","6"}{"7+","7-","7"}{"8+","8-","8"}"9"; do echo "$i = $[i]"; done | grep " = 100$"
Try doing that in MSDOS
Last edited by wossname; Jan 14th, 2009 at 03:28 PM.
I don't live here any more.
-
Jan 14th, 2009, 03:58 PM
#13
Fanatic Member
Re: Solve Puzzles
 Originally Posted by wossname
This BASH command will give you the equations that match...
Code:
for i in {"1+","1-","1"}{"2+","2-","2"}{"3+","3-","3"}{"4+","4-","4"}{"5+","5-","5"}{"6+","6-","6"}{"7+","7-","7"}{"8+","8-","8"}"9"; do echo "$i = $[i]"; done | grep " = 100$"
Try doing that in MSDOS 

I blame Jacob Roman.
-
Jan 15th, 2009, 07:56 AM
#14
Hyperactive Member
-
Jan 15th, 2009, 09:25 AM
#15
Re: Solve Puzzles
1+2+3+4+5+6+7+8+9=45
1*2*3*4*5*6*7*8*9=362880
362880/45 = 8064
-
Jan 15th, 2009, 12:13 PM
#16
Re: Solve Puzzles
 Originally Posted by mudcake
1+2+3+4+5+6+7+8+9=45
1*2*3*4*5*6*7*8*9=362880
362880/45 = 8064
A system of mathematical statements whose end result is of no significance to anything!
-
Jan 15th, 2009, 12:59 PM
#17
Re: Solve Puzzles
aka "Statistics"
*ba-dum-tish*
I don't live here any more.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|