generate(D + ~AB + B~C -> Z)
# the positive configurations in their complete DNF expansion:
expanded <- expand(D + ~AB + B~C, snames = c(A, B, C, D))
# ~A~B~CD + ~A~BCD + ~AB~CD + ~ABCD + A~B~CD + A~BCD +
# AB~CD + ABCD + ~AB~C~D + ~ABC~D + AB~C~D
# which has the equivalent simpler, initial expression:
simplify(expanded)
# D + ~AB + B~C
# same structure with different set names
# (note the mandatory use of the product sign *)
generate(Alpha + ~Beta*Gamma + Gamma*~Delta -> Omicron)
# introducing an additional, irrelevant condition
# (note the product sign is not mandatory if providing the set names)
setnames <- "Alpha, Beta, Gamma, Delta, Epsilon"
dat <- generate(Alpha + ~BetaGamma + Gamma~Delta -> Omicron, snames = setnames)
head(dat)
# Alpha Beta Gamma Delta Epsilon Omicron
# 1 0 0 0 0 0 0
# 2 0 0 0 0 1 0
# 3 0 0 0 1 0 0
# 4 0 0 0 1 1 0
# 5 0 0 1 0 0 1
# 6 0 0 1 0 1 1
minimize(dat, outcome = Omicron)
# M1: Alpha + ~Beta*Gamma + Gamma*~Delta <-> Omicron
Run the code above in your browser using DataLab