Author
|
Topic: Curly's Puzzles (Read 16424 times)
|
|
|
|
Rene
|
For Signal to Noise Ratio ( pivotis): hogirorThat was tough, very tough. I started out with one approach, but could not get it to handle all special cases (quite a view for this level). I tried another approach, but did not go anywhere with that either. Then I reverted back to the first approach again, and painstakingly got everything to work. I have no room to spare. The solution I settled on is a parallel solution: all cycles are detected in parallel, and the smallest cycle that has not failed yet is continuously selected as solution. The hardest trick was to find out which one is the smallest: the valve head of the 15 cylinder engine that forms the solution. The alternative I tried was a sequential approach: try the 1 cycle first, if that fails, try the 2 cycle, etc, with both 0 and F as special cases.
|
|
|
|
|
Logged
|
|
|
|
|
curly
|
For Signal to Noise Ratio ( pivotis): hogirorThat was tough, very tough. I started out with one approach, but could not get it to handle all special cases (quite a view for this level). I tried another approach, but did not go anywhere with that either. Then I reverted back to the first approach again, and painstakingly got everything to work. I have no room to spare. The solution I settled on is a parallel solution: all cycles are detected in parallel, and the smallest cycle that has not failed yet is continuously selected as solution. The hardest trick was to find out which one is the smallest: the valve head of the 15 cylinder engine that forms the solution. The alternative I tried was a sequential approach: try the 1 cycle first, if that fails, try the 2 cycle, etc, with both 0 and F as special cases. I didn't expect it to be that tough when I created it but I spent almost a week trying to solve it without success before posting it. I'm glad you didn't find it easy. My attempts at a sequential solution always ran out of space. I knew there would be a parallel solution but I didn't know how to build that. I had to study yours for ages to work out how it works. Very cool. I even like the little bit that multiplexes the input and output streams to save some extra space.
|
|
|
|
|
Logged
|
|
|
|
|
 |