Learn R Programming

QCA (version 1.1-2)

allExpressions: Create Implicant Matrices

Description

This function creates implicant matrices. An implicant matrix consists of all truth table configurations and their supersets, including the empty set.

Usage

allExpressions(noflevels, raw = FALSE, arrange = FALSE)

Arguments

noflevels
The number of levels (values) for each condition variable.
raw
Logical, return implicant matrix with indicator for value elimination .
arrange
Logical, arrange for easier visual inspection.

Value

  • A matrix with $\prod_{j = 1}^{k}{(p_{j} + 1)}$ rows and $k$ columns.

Details

An implicant matrix consists of all truth table configurations and their supersets, including the empty set (Dusa 2007, 2010). The number of implicants $q$ is given by $q = \prod_{j = 1}^{k}{(p_{j} + 1)}$, where $p_{j}$ is the number of values for condition variable $j$ and $k$ is the total number of condition variables. If raw = TRUE, the indicator for value elimination (-1) is used.

References

Dusa, Adrian. 2007. Enhancing Quine-McCluskey. COMPASSS: WP 2007-49. Available from: http://www.compasss.org/wpseries/Dusa2007b.pdf. Dusa, Adrian. 2010. A Mathematical Approach to the Boolean Minimization Problem. Quality & Quantity 44 (1):99-113.

See Also

createMatrix

Examples

Run this code
# three condition variables with two values each;
# first row is empty set
allExpressions(noflevels = rep(2, 3))

# two condition variables with three values each
allExpressions(noflevels = rep(3, 2))

# arranged differently
allExpressions(noflevels = rep(3, 2), arrange = TRUE)

# with internal indicator for eliminated values
allExpressions(noflevels = rep(3, 2), raw = TRUE)

Run the code above in your browser using DataLab