From: Marcel Ward Date: 2007-01-31T21:20:04+09:00 Subject: Re: Counting Toothpicks (#111) On 28/01/07, Frank Fischer wrote: > On 2007-01-28, Daniel Lucraft wrote: > > According to my program here are the first ten integers that need two > > '+'s: > > ...(snip)... > I think you're wrong. Some of those numbers don't need two '+', for > example: > ||||x|||||||x|||||||||||||+|||x||| = 373 (38 Toothpicks) > ||x||||x|||||||x|||||||||||||||||||+||||| = 1069 (45 Toothpicks) > |||x|||||x|||||||x|||||||||||+||x||||| = 1165 (43 Toothpicks) > so my program says the first ten numbers with two '+' - but without > warranty - are: > > |||x|||x|||x|||||x|||||||+|||x||||+| = 958 (43 Toothpicks) > ||||x|||||x|||||x|||||||||||+|||x||||+| = 1113 (45 Toothpicks) > ||||x|||||x|||||x|||||||||||+||||x||||+| = 1117 (46 Toothpicks) > ||||x|||||x|||||x|||||||||||+|||x||||||+| = 1119 (47 Toothpicks) > |||x||||x||||x||||x||||||+||||x||||+| = 1169 (44 Toothpicks) > |||x|||x||||x|||||x|||||||+|||x||||+| = 1273 (44 Toothpicks) > ||||x||||x||||x||||x|||||+|||x||||+| = 1293 (43 Toothpicks) > |||x|||x|||x|||x||||x||||+|||x|||||||+|| = 1319 (48 Toothpicks) > |||x|||x|||x|||||||x|||||||+|||x||||||+| = 1342 (47 Toothpicks) > |||x|||x||||x||||||x|||||||+||||x||||+| = 1529 (46 Toothpicks) > > > Anyone know which the first one to need 3 is? > Not yet :) Well, after over 13 hours of CPU time (2GHz laptop)... ... on the 3rd revision of my code to ensure that it's only using 170Mb of memory well into the 700_000s range (my initial version's "|" * 700_000 is NOT the most efficient calculation at this stage and what results is certainly not going to be of any use!)... .... I am pleased (and relieved) to announce the first and (I think) the lowest toothpick calculation with 3 plusses... :-) 775437: |||x||||x||||x||||x||||x||||x||||||x||||||x|||||||+||||x||||x||||x||||x|||||+|||x||||+| (103) I sense some kind of exponential increase so I'm not going to even think about trying to attempt finding 4 plusses. -- Marcel