Intersection of BDD/ZDD using CUDD

谁都会走 提交于 2020-06-09 03:01:09

问题


I have some sets of combinations and I want to find out the intersection function between say two of them. Then I want to represent the intersected results in ZDD.

I am thinking about using the CUDD package to do this.

An example:

All the 4-bit strings having hamming distance >= 2 with 1100 =

{ 0001, 0010, 0011,0101, 0110, 0111, 1001, 1010, 1011 }

All the 4-bit strings having hamming distance >= 2 with 0000 =

{ 0011, 0101, 0110, 1001, 1010, 0111, 1011, 1101, 1110 }

Intersected elements of the set (what I want):

{0011, 0101, 0110, 1010, 1001 }

From what I understand, I need to be able to express those sets of combinations first, with boolean functions, e.g. ( f = a b c d ) to represent their corresponding BDDs, convert them to ZDDs and then find out the intersection? Someone experienced with the CUDD package please help.


回答1:


Your reasoning is correct. You can first build BDDs corresponding to the two string sets, convert them to ZDDs, and then build the intersection (logical AND).

However, you can also first compute the intersection (logical AND) and then translate the result to a ZDD.

It is however not clear what you mean by "find out the intersection" - what do you want to do with it? Print out all the elements? Count the number of elements? Depending what what is your aim, the translation to ZDDs may be unnecessary (or the use of CUDD altogether).



来源:https://stackoverflow.com/questions/59815531/intersection-of-bdd-zdd-using-cudd

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!