Dag Sverre Seljebotn wrote:
>As a fun aside, once you get into nested expressions like this:
> 
> if (a is not None and b is not None and c == 2) or (a is None and c == 1  ...
> 
> then we've got an instance of SAT (i.e. can't solve in polynomial time
> "unless P = NP"). But I think there's a rather natural cutoff point for
> the complexity of expressions we consider.
> 

Nope, I am now fairly sure that this is wrong. I now think it is 
polynomial time (as you only need to know whether a or b is forced to 
None or not-None in isolation without having to consider the other one).

But I digress (I love those few precious moments where 
NP-completeness-theory is useful in a real program though).

-- 
Dag Sverre
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to