Open rtoy opened 4 months ago
Imported from SourceForge on 2024-07-03 10:32:59 Created by macrakis on 2014-10-26 21:36:23 Original: https://sourceforge.net/p/maxima/bugs/2821/#dfb9
Yes, the algorithm is very slow and should be improved, but I don't think it's buggy.
A workaround in this case is lreduce(lambda([q,r],zhegalkin_form(q and r)),args(foo)). rreduce is a bit faster, tree_reduce is a bit slower. In general, the order can be critical.
Of course, in general, the size of the Z form of an expression is exponential in the size of the input: Z(or(a[i],i,1,n)) has 2^n-1 terms, so both intermediate and final expression blow-up is a very real possibility.
Imported from SourceForge on 2024-07-03 10:32:58 Created by robert_dodier on 2014-10-16 19:21:35 Original: https://sourceforge.net/p/maxima/bugs/2821
zhegalkin_form in share/logic takes a very long or infinite time for some relatively simple problems. I don't know what to expect for how the run time should scale, but this seems like a bug. E.g.: