Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have N variables, say $V_1, V_2, ..., V_n$. and I have several logical conditions like $[(V_1 > V_2) \cap (V_2 + V_3 > V_1) \cap (V_1*V_1 > 2*V_2)] \cup [..]$ You can consider they are in the disjunction normal form.

What I am concerning is finding the number of n-tuples $(V_1, V_2, ..., V_n)$ satisfying these conditions. Provided that all $V_i$ are 32 bit integer numbers.

I believe that Mathematica is able to do that, but I just don't know how it does.


share|improve this question
You could try expressions like Reduce[a > BitAnd[b, c + d], Integers], etc –  belisarius Oct 3 '13 at 4:29
@belisarius: Can you explain a bit more about your expression? –  Loi.Luu Oct 3 '13 at 4:31
Not much to explain. BitAnd[]is the bitwise intersection and BitOr[] the bitwise union. Of course some care should be taken for overflows, etc. And the results are rather clumsy if your inequalities don't have nice symmetric properties –  belisarius Oct 3 '13 at 4:35
BTW That isn't an answer to your question about counting results, but just a comment. –  belisarius Oct 3 '13 at 4:39
@belisarius thank you anw :) –  Loi.Luu Oct 3 '13 at 4:40
show 1 more comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.