3.41 permit : Selection of subset

Format

$obj$.permit($zdd1$) $\rightarrow $ $zdd2$

Description

For itemsets included in $obj$, select the term that is included in at least 1 itemset contained in $zdd1$.

More precisely, $\alpha _ i$ is the set of items that make up $obj$ where the weight of term $T_ i$ is removed, assuming that $\beta _ j$ represents the same itemsets in $zdd1$, if at least one $j$ satisfy $\alpha _ i \subseteq \beta _ j$, select term $T_ i$ that corresponds to $\alpha _ i$ from $obj$.

In relation, the conditional expression $\alpha _ i \subseteq \beta _ j$ is changed to $\alpha _ i \supseteq \beta _ j$ and become restrict function.

Example

Example 1: Basic Example

> require 'zdd'
> a=ZDD::itemset("a")
> b=ZDD::itemset("b")
> c=ZDD::itemset("c")
> d=ZDD::itemset("d")
> x=5*a + 3*b + b*c + 2
> y=a + b + d
> z=a*c
> x.show
 5 a + b c + 3 b + 2
> y.show
 a + b + d
> z.show
 a c

# 4 itemsets a,bc,b,Φ (the term for empty itemset has a weight of 2) in x, 
# 3 itemsets a,b,d in y are included in itemset 
# a and b and Φ (empty itemset is also considered for inclusion as itemset).
# Therefore, select terms a,b,Φ from x. 
> x.permit(y).show
 5 a + 3 b + 2

# Among 4 itemsets a,bc,b,Φ contains in x, 
# itemset z contains ac, which includes itemset a and Φ. 
# Therefore, terms a and Φ are selected from x.
> x.permit(z).show
 5 a + 2

# Among 4 itemsets a,bc,b,Φ contain in x, 
# itemset c includes itemset Φ. 
# Therefore, term Φ is selected from x.
> x.permit(c).show
 2

See Also

restrict : Selection of superset