I'm working on an algorithm for a product I'm writing. I believe the problem can be expressed best as some sort of manipulation of a Boolean algebra expression. But this is a new field for me. So I'm going to go pretty light on the symbols and stuff. I suspect what I'm looking for is the name of an existing algorithm, that somebody might just know.
I have a set of variables: [A, B, C, ...]. I also have a set of sets of values: [[Av1, Bv1, Cv1, ...], [Av2, Bv2, Cv2, ...], ...]. The sets of values express allowable combinations of values for the variables. You could think of them as a DNF: (A=Av1 AND B=Bv1 AND C=Cv1) OR (A=Av2 AND B=Bv2 AND C=Cv2)) onward.
What I'm trying to do is convert this to a form like the following:
((A=Av1 OR A=Av2) AND (B=Bv2) AND (C=Cv1 OR C=Cv2)) OR (...))
The idea here is my original set of values might be too complex. And of course might not express all possible combinations just all allowable ones. Or it might simply have lots of duplicate expressions. I'm looking to simplify these and group them up by complexity in some way. To get the smallest number of outer "ORs", with the largest number of inner ORs. Because I need to convert the output to a format that can represent that cleanly, and want to save space in that format.
I know a little about Boolean simplification. And how it's a hard problem. I messed around a little with the Espresso program. But I don't think that is exactly what I'm looking for. I've even tried to think through this as a graph problem. Maybe in that format it could be translated to something like the maximal clique problem? I don't know. Been thinking this through periodically for a couple months now.