Yo !

>> 1) Make it run in your head with a boolean function f constant to "False". 
>> It will enumerate the 2^n no-sets.
>
> corner cases are hard, in theory too :-)
> You can certainly add a pre-testing by evaluating f on all singletons and 
> pairs, say.
> (and this would also speed up things for functions having some NO singletons 
> and pairs quite a bit)

This is not a corner case. What it tells you is that you do not
enumerate inclusionwise minimal no-sets, and that you will pay for it.
Make it run with lambda x: len(x)<5 on a set X of size 15, same
result.

> not necessarily faster. Your code completely ignores the polyhedral nature of 
> the problem; e.g. the ILP can potentially terminate quite fast,
> due to it finding that the polyhedron defined at some point is already empty, 
> while your code will keep looking for non-existing things...

It will not. And you can think of the "polyhedral nature" of binary
vectors all you want, if you need to enumerate them just do it the
straightforward way, not with a LP solver.

In this special case I don't see how a LP could beat a code where
feasibility is checked by intersection of bitsets. But if you care I
would be glad to see by how much it beats the LP method :-P

Nathann

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to