> Is there a name for an iteration of the powerset which is more useful for binary search? I.e. instead of starting with null set, start with the "middle" ( r/2 ).
>
> Maybe a bit OT, but is there a name for such a combinatorial search?
Not that I know of, especially since this has the unfortunate drawback that you're going through the largest part of the search space first. Usually, I find that I want to do the opposite from this; go from both ends simultaneously.
Hasan, if you recall that the powerset is just
`yield from S choose k for k from 0 to |S|+1`,
you see that that is exactly the implementation in the examples page.
Best regards,
Pål GD