Title: | Matrix Computation Based Identification of Prime Implicants |
---|---|
Description: | Computes the prime implicants or a minimal disjunctive normal form for a logic expression presented by a truth table or a logic tree. Has been particularly developed for logic expressions resulting from a logic regression analysis, i.e. logic expressions typically consisting of up to 16 literals, where the prime implicants are typically composed of a maximum of 4 or 5 literals. |
Authors: | Holger Schwender |
Maintainer: | Holger Schwender <[email protected]> |
License: | LGPL (>= 2) |
Version: | 1.1.6 |
Built: | 2024-10-31 22:26:32 UTC |
Source: | CRAN |
Generates the truth table or the prime implicants, respectively, for a logic tree built in a logic regression,
generateTruthTab(ltree) getPImps(ltree, type)
generateTruthTab(ltree) getPImps(ltree, type)
ltree |
an object of class |
type |
the type of the logic regression model that has been fitted. |
Holger Schwender, [email protected]
Computes the minimal disjuntive normal form for a given truth table.
minDNF(mat)
minDNF(mat)
mat |
a matrix containing only 0's and 1's. Each column of |
An object of class minDNF
containing a vector comprising a minimized set of prime implicants. If more than
one solution exist, then a list is returned containing all solutions.
Holger Schwender, [email protected]
Schwender, H. (2007). Minimization of Boolean Expressions Using Matrix Algebra. Technical Report, SFB 475, Department of Statistics, TU Dortmund University.
## Not run: # Generate the truth table considered in Schwender (2007). mat <- matrix(c(rep(0, 4), rep(1, 6), rep(0, 6), rep(1, 4), 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1), ncol=4) colnames(mat) <- paste("X", 1:4, sep="") # Computing the minimal disjunctive normal form. minDNF(mat) ## End(Not run)
## Not run: # Generate the truth table considered in Schwender (2007). mat <- matrix(c(rep(0, 4), rep(1, 6), rep(0, 6), rep(1, 4), 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1), ncol=4) colnames(mat) <- paste("X", 1:4, sep="") # Computing the minimal disjunctive normal form. minDNF(mat) ## End(Not run)
Computes the prime implicants of a given truth table.
prime.implicants(mat)
prime.implicants(mat)
mat |
a matrix containing only 0's and 1's. Each column of |
An object of class primeImp
containing a vector vec.primes
comprising the prime implicants
and a matrix mat.primes
representing the prime implicant table.
Holger Schwender, [email protected]
Schwender, H. (2007). Minimization of Boolean Expressions Using Matrix Algebra. Technical Report, SFB 475, Department of Statistics, TU Dortmund University.
## Not run: # Generate the truth table considered in Schwender (2007). mat <- matrix(c(rep(0, 4), rep(1, 6), rep(0, 6), rep(1, 4), 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1), ncol=4) colnames(mat) <- paste("X", 1:4, sep="") # Determining the prime implicants. prime.implicants(mat) ## End(Not run)
## Not run: # Generate the truth table considered in Schwender (2007). mat <- matrix(c(rep(0, 4), rep(1, 6), rep(0, 6), rep(1, 4), 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1), ncol=4) colnames(mat) <- paste("X", 1:4, sep="") # Determining the prime implicants. prime.implicants(mat) ## End(Not run)