jeudi 28 avril 2016

Code to solve a system of conditional binary equations

I have a set of dependent and independent boolean variables with given rules. I am trying to find the values of independent variables to satisfy all the rules.

For example, n1,n2,n3 and out are dependent boolean variables and a,b,c are independent boolean variables. How to search for all values of a,b,c such that out will be 1? Is there any code already available to solve this kind of problems?

n1=0 if a!=b;
n1=a if a==b;
n2=a if a!=b;
n2=1 if a==b;
n3=~n1 if b!=c;
n3=n2 if b==c;
out=~n3;

Aucun commentaire:

Enregistrer un commentaire