Do you know where your variables are?  
PerlMonks 
Re^5: Evolving a faster filter? (optimal!)by LanX (Chancellor) 
on Jan 04, 2013 at 21:42 UTC ( #1011723=note: print w/replies, xml )  Need Help?? 
Well my argument is sufficient to show that a solution where two adjacent filters don't follow this order can't be optimal, because otherwise swapping those adjacent filters f[i] and f[i+1] would improve the result. So any optimal solution must follow this strict order criteria. ¹ qed! =)
Cheers Rolf PS: I'm glad I didn't start implementing the B&B algorithm :) UPDATE: ¹) and it's easy to see that all ordered solutions (plural b/c adjacent filters can have the same weight) imply the same total cost.
In Section
Seekers of Perl Wisdom

