|Do you know where your variables are?|
Re: •Re: Puzzle: need a more general algorithmby Ovid (Cardinal)
|on Jul 09, 2002 at 05:03 UTC||Need Help??|
merlyn wrote: All you need is a good generating algorithm and you can brute force this!
I thought this idea was so intensely cool that I just had to try it out. However, coming up with a "good generating alorithm" escapes me. First, I took the list of possible permutations that dws created and translated it:
Then, once I was sure I understood it, I went ahead and hardcoded that so I could manipulate it and look for patterns.
Which prints the following:
Needless to say, the list seems arbitrary (even though we know it's not) and try as I might, I can't come up with a method of creating that, much less writing a generalized routine. I thought about trying to discover a pattern in the sequences, but no dice. Later, I tried creating a "picture" of the bits and swapping pairs, but I couldn't come up with a sequence for that, either. I'll start looking into permutators, but I feel like I'm missing something awfully basic here. There are only 10 possible combinations, so I didn't think generating them would be that hard :(
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.