Learn R Programming

QCA (version 1.0-4)

allExpressions: Create an Implicant Matrix

Description

This function creates an implicant matrix. The implicant matrix consists of all supersets of a truth table's configurations, including the configurations themselves as well as the empty set.

Usage

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

Arguments

noflevels
The number of levels for each condition
raw
Logical, return the implicant matrix with "don't care" indicator
arrange
Logical, try to arrange the result matrix for visual inspection (takes a lot of additional time for large matrices)

Value

  • A matrix with $\prod_{j = 1}^{k}{p_j + 1}$ rows

Details

The formula for the number of implicants is $\prod_{j = 1}^{k}{p_j + 1}$, where $p_j$ is the number of levels for condition $j$ and $k$ is the number of conditions. As the matrix grows exponentially, it is not recommended to run this function for a large number of conditions ($k > 15$).

See Also

createMatrix

Examples

Run this code
# three conditions with two levels each
allExpressions(noflevels = rep(2, 3))

# three conditions with three levels each
allExpressions(noflevels = rep(3, 3))

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

# with "don't care" indicator
allExpressions(noflevels = rep(3, 3), raw = TRUE)

Run the code above in your browser using DataLab