|
|
|
Your skill will accomplish what the force of many cannot |
|
| PerlMonks |
Re^4: Evolving a faster filter? (optimal?)by tye (Cardinal) |
| on Jan 04, 2013 at 21:32 UTC ( #1011722=note: print w/ replies, xml ) | Need Help?? |
|
That's not enough to prove it. You certainly get a solution that can't be improved by a single swapping of adjacent filters. And if your sort order using that algorithm is well-defined, then you will get an optimal solution. That is, if you never get the $a < $b < $c < $a case. Update: No, maybe not even that (unless someone can convince me that "of adjacent filters" is not needed above). Update: I thought I had already found a case where it wasn't optimal. But the total cost was reported as identical as the first cost despite a different ordering being chosen. So it might be hard to find a case where it isn't optimal. I bet it makes doing anything more than that not worth the effort for Ovid's usage, at least. :) - tye
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||