3 ms·
I have wondered how to extend this to combinations of elements. What if the bad outcome only happens when two or more elements are enabled? Is there a general
by tantalor 4y ago
I have wondered how to extend this to combinations of elements.
What if the bad outcome only happens when two or more elements are enabled?
Is there a generalization of binary search for powersets?
Can this be done efficiently?
- lozenge 4y agoYou might want to look at Hypothesis, a testing library that can also randomly generate test cases and reduce examples to a more minimal case. It supports many data types and "strategies".
- kevinventullo 4y agoIf I understand your problem correctly, you could iterate through the elements disabling one at a time and checking whether the bad outcome still occurs. Assuming this works, it should be optimal: if you’re only getting a binary outcome at each step, you’ll never do better than lg(2^n) = n.
- tekknolagi 4y agoThis does work for combinations -- often I get JIT lists with two functions on it and the issue has to do with something in the call path itself.