All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 More than one way to skin a cat (Posted on 2010-03-24)
You start with a zero and try to reach exactly 100 in 4 stages, each stage consisting of either increasing or decreasing your current number by a factorial n!( number like 1,2,6,24,120,720 etc) .
How many sequences exist to accomplish this task?

 See The Solution Submitted by Ady TZIDON No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 Let me count the ways -- computer solution | Comment 4 of 6 |
`   5   dim H(4)  10   gosub *AddOn  20   end1010   *AddOn1020   local I,Ch1030   inc Lvl1040   for I=1 to 401045      Ch=!(I)1050      Tot=Tot+Ch:H(Lvl)=Ch1060      if Lvl=4 and Tot=100 then Ways=Ways+1:print Ways,H(1);H(2);H(3);H(4)1070      if Lvl<4 then gosub *AddOn1080      Tot=Tot-2*Ch:H(Lvl)=-Ch1090      if Lvl=4 and Tot=100 then Ways=Ways+1:print Ways,H(1);H(2);H(3);H(4)1100      if Lvl<4 then gosub *AddOn1110      Tot=Tot+Ch1200   next1210   dec Lvl1250   return`
`finds`
`1       2  2 -24  1202       2  2  120 -243       2 -24  2  1204       2 -24  120  25       2  120  2 -246       2  120 -24  27      -2  6 -24  1208      -2  6  120 -249      -2 -24  6  12010     -2 -24  120  611     -2  120  6 -2412     -2  120 -24  613      6 -2 -24  12014      6 -2  120 -2415      6 -24 -2  12016      6 -24  120 -217      6  120 -2 -2418      6  120 -24 -219     -24  2  2  12020     -24  2  120  221     -24 -2  6  12022     -24 -2  120  623     -24  6 -2  12024     -24  6  120 -225     -24  120  2  226     -24  120 -2  627     -24  120  6 -228      120  2  2 -2429      120  2 -24  230      120 -2  6 -2431      120 -2 -24  632      120  6 -2 -2433      120  6 -24 -234      120 -24  2  235      120 -24 -2  636      120 -24  6 -2`

That's 36 ways, but really only two fundamentally different sets of numbers: -24, 2, 2 and 120; and -24, -2, 6 and 120, with 12 permutations of the former and 24 of the latter.

 Posted by Charlie on 2010-03-24 12:49:05

 Search: Search body:
Forums (45)
Random Problem
Site Statistics
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox: