找到独特的元组在重新$ P $的关系由BDD psented [英] Find unique tuples in a relation represented by a BDD

查看:200
本文介绍了找到独特的元组在重新$ P $的关系由BDD psented的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

让我们假设我用BDD重新present的元组的关系。为简单起见考虑的元组0或1的值。例如: R = {< 0,0,1>,< 1,0,1>,< 0,0,0>}重新present在BDD三元关系有三个变量,例如x,y和Z(一个用于每个元组的元素)。我要的是实现给定一个BDD像R和多维数据集C回到R,它将包含唯一的元组时,C中的变量被抽象的子集的操作。

Let's suppose I use a BDD to represent the set of tuples in a relation. For simplicity consider tuples with 0 or 1 values. For instance: R = {<0,0,1>, <1,0,1>, <0,0,0>} represent a ternary relation in a BDD with three variables, say x, y and z (one for each tuple's element). What I want is to implement an operation that given a bdd like for R and a cube C returns the subset of R that contains unique tuples when the variables in C are abstracted.

有关例如,如果C含有变量x(其中重新presents第一元件中的每个元组)的函数的结果必须是{&所述; 0,0,0>}。请注意,当x被抽象出来的​​元组&LT; 0,0,1>和&lt; 1,0,1>成为相同的

For instance, if C contains the variable x (which represents the first element in each tuple) the result of the function must be {<0,0,0>}. Notice that when x is abstracted away tuples <0,0,1> and <1,0,1> become "the same".

现在假设R = {&LT; 0,0,1>,&LT; 1,0,1>,&LT; 0,0,0>,&LT; 1,0,0>},我们要抽象x再次。在这种情况下,我会想到恒虚的结果,因为没有独特的元组在研发抽象后面的x。

Now suppose R = {<0,0,1>, <1,0,1>, <0,0,0>, <1,0,0>} and we want to abstract x again. In this case I would expect the constant false as result because there is no unique tuple in R after abstracting x.

任何帮助是非常AP preciated。

Any help is highly appreciated.

推荐答案

这可能是三个简单的步骤完成的:

This could be done in three simple steps:

  • 请2 BDDS与要抽象变量的限制值:
    • 研究[X = 0] =限制R,其中X = 0
    • 研究[X = 1] =限制R,其中X = 1
    • Make two BDDs with restricted value of the variable you want to abstract:
      • R[x=0] = restrict R with x = 0
      • R[x=1] = restrict R with x = 1
      • 问:= R [X = 0] XOR - [R [X = 1]

      应用到您的例子:

      • 在R = {&LT; 0,0,1>,&LT; 1,0,1>,&LT; 0,0,0>} =(¬x∧¬y∧Z)∨(X∧¬y∧ Z)∨(¬x∧¬y∧¬z)
      • 研究[X = 1] = {&LT; 0,1>} =(¬y∧Z)
      • 研究[X = 0] = {&LT; 0,1>,&LT; 0,0>} =(¬y∧Z)∨(¬y∧¬z)
      • 问:= R [X = 1] XOR - [R [X = 0] =(¬y∧¬z)

      直觉这里要说的是异或将取消发生在两个BDDS条目。
      这是很容易的(但与指数的复杂性)推广到几个抽象的变量的情况。

      Intuition here is that XOR will cancel entries that occur in both BDDs.
      This is easily (but with exponential complexity) generalized to the case with several abstracted variables.

      这篇关于找到独特的元组在重新$ P $的关系由BDD psented的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆