algorithm - Transforming a logical condition with AND and OR -



algorithm - Transforming a logical condition with AND and OR -

i have complex condition, ands , ors, illustration : (c1 or c2) , (c3 or c4 or c5)

this equivalent :

(c1 , c3) or (c1 , c4) or (c1 , c5) or (c2 , c3) or (c2 , c4) or (c2 , c5)

this status can exploded in list of conditions contains , :

c1 , c3 c1 , c4 c1 , c5 c2 , c3 c2 , c4 c2 , c5

is transformation possible ? , algorithm ?

conditions stored in memory trees, eg :

or / \ , c1 / ! \ c2 c3 c4

i think should seek "move" or upwards tree, using distributivity :

(a or b) , c = (a , c) or (b , c).

is approach ?

take @ disjunctive normal form (or conjunctive one). both uses not and , or not too.

note: if restricted ors , ands (and cannot utilize other boolean function), can't express boolean function because of post's functional completeness theorem (and , or both truth-preserving , don't form basis). hence maybe there formula, can't transformed.

algorithm condition

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -