# Three valued logical problem simplification (or not?)

I have a mathematical/programming question. I have a big datafile (.mat-file) which contains sort of boolean data: it is a matrix of doubles that express the following data:

• x1 = 1, x2 = 0, x3 = 0, x4 = random(0,1), ...,xn = 1
• x1 = 0, x2 = 0, x3 = random(0,1), x4 = 1, ... xn = 0
• etc...

So each variable xi (element of the matrix) can have a value 0, 1 or a random(0,1), i.e. a value between 0 and 1. That actual value of the random number does not matter, so you can consider it to be for instance 1/2. The set of all equations form the conditions in which a variable y is true. The set of equations is extremely large (over 3 million), but I suspect that there might be quite simple underlying logical rules. Well, it is a bit more than a hunch: I tried a bit and found for instance that e.g. if x1 = 0 and x2 = 0 and x3 = 1 is common for a large portion of the equations. However, manuallly investigating the dataset to find such rules is not very practical.

My ultimate goal is to come-up with a smaller set of rules that explain when y is true (rather than listing all 3 million rules).

I'm kind of unsure how to solve this? Is this a problem of three-valued logic simplication or still binary logic by omitting a third option ? Should I see the first two expressions as ( x1 = TRUE AND x2 = FALSE AND x3 = FALSE AND x4 = UKNOWN AND ... AND xn = TRUE ) OR ( x1 = TRUE AND x2 = FALSE AND x3 = UKNOWN AND x4 = TRUE AND ... AND xn = FALSE ) OR ....

or should I consider it as ( x1 = TRUE AND x2 = FALSE AND x3 = FALSE AND ... AND xn = TRUE ) OR ( x1 = TRUE AND x2 = FALSE AND x4 = TRUE AND ... AND xn = FALSE ) OR ....

in which I have omitted the UNKOWN option.

Additionally, can you suggest software in which I can do this calculation? Thank you for all you suggestions!

-
can you say something more about variable y ?, maybe you can do it just with ORs? – Willemien Mar 6 '14 at 20:34
Taking your second question first, the programming languages I'm aware of only allow logical variables to take on one of two values. In such a language, logical variables can't be used to represent your problem. So your problem would be better modeled using a variable that takes on one of three. Some languages permit you to define your own "types" so you could define a new "type" of variable that took on one of only three values. I don't see how you could ignore the UNKNOWN values in advance. Your calculations might show them to be irrelevant but you don't know that yet, if I understand you. – MikeC Mar 7 '14 at 4:49
@Willemien What I am actually investigating is the rank of a matrix of which the elements are symbols. I would like to now for which cases (values of the symbols) the matrix is not of full rank. It is 22x22 matrix, so analytically calculating an eigenvalue decomposition is out of the question. Instead, I just tried all possible extreme values (1,0, or in between 0 and 1) and calculated it. Of all the combinations I found that in over 3 million cases, the matrix was not of full rank. I thought you can see it as 3 million expressions with OR's in between. – Valkyrie Mar 7 '14 at 10:25
@MikeC You're absolutely right. My reasoning was that by omitting the third option (UKNOWN), it would say 'this value does not matter'. But I suppose I'll need to state that value is at least different from 0 or 1. So, it looks to me like I need some sort three valued logical simplifcation procedure. Can you specifiy which languages you are referring to? ("Some languages") – Valkyrie Mar 7 '14 at 10:38
I deliberately avoided mentioning specific languages because my knowledge is outdated and I don't know your computing environment. Pascal allows user-defined types, but that's ancient history. There's a general discussion at: bit.ly/P96YSF – MikeC Mar 7 '14 at 17:30