0

I am trying to export an existing BDD as a Boolean expression string. Ideally I would like a minimal length string or minimal normal form but I am guessing that this is a hard problem itself. Do you know a way to convert BDDs into short strings? Currently I am using the function

Cudd_FactoredFormString

but the result is pretty much unreadable, even for BDDs with few variables.

Lunivore
  • 17,277
  • 4
  • 47
  • 92
Leevi L
  • 1,538
  • 2
  • 13
  • 28
  • What operations do you allow in your Boolean expression? Just disjuction, conjunction, negation, and exclusive or? Or are "let expressions" also allowed (https://en.wikipedia.org/wiki/Let_expression)? If they are allowed, then getting a short expression is quite simple. But obtaining **the** shortest expression is indeed a computationally very difficult problem (should be Pi_2 or Sigma_2 complete). – DCTLib Aug 19 '16 at 19:59
  • can you give an example? I think "let examples" are excluded. I am interested in genuine Boolean expressions. – Leevi L Aug 20 '16 at 13:37
  • Boolean expressions have different definitions - sometimes you are concerned with the size of the formula, sometimes it's the length you are interested in (In "size" you care about the DAG size of the expression). An example for a let expression would be "((a & z) | (a & v)) for a=(x|z & w|y)" as an expression over the variables v,w,x,y,z. All of the expressions are "genuine". – DCTLib Aug 22 '16 at 07:53
  • so you're asking because with let expressions there is a neat way of getting shorter expressions? Basically the current conversion is pretty bad, so I am interested in any improvement. Ideally involving only the common logical connectives including implication, equivalence and xor. – Leevi L Aug 22 '16 at 08:57
  • note: isn't it trivial to convert a let expression into a common Boolean expression by just substituting? in that case let expression are ok because they are short and human readable and I can transform them easily into the types of expression that other programs need. – Leevi L Aug 22 '16 at 09:21
  • Yes, you can perform substitution, but it gives you an exponential blow-up, and that may be too much for your application. – DCTLib Aug 22 '16 at 09:54
  • but do you know how to use CUDD to generate a let expression from a BDD? – Leevi L Aug 22 '16 at 10:26

0 Answers0