News for hackers. Stuff that matters.
Re:The Knapsack Problem Is All Around Us by owenshen24 on Tuesday March 10, 2020 @12:58AM (#22532856)
I think you could get by with ~50 checks if you just used selection sort.

I'm not sure what brute-forcing means in this context. Do you mean hard-coding every way to order 10 unique elements?

Re:The Knapsack Problem Is All Around Us by the8472 on Tuesday March 10, 2020 @01:58AM (#22533134)
Brute force sorting would be generating permutations and checking if they're sorted. The non-deterministic version that uses random permutations is commonly called bogosort[0]

[0] https://en.wikipedia.org/wiki/Bogosort

Re:The Knapsack Problem Is All Around Us by mjevans on Tuesday March 10, 2020 @03:13PM (#22538561)
The thread switched problems and I didn't catch that. The 10 factorial was trying out all possible packing solutions and filtering for only the ones that were 'valid' (probably with an added step of also keeping the best valid configuration).