QCA (version 1.1-3)

createMatrix: Create Configuration and Implicant Matrices

Description

This function creates configuration and implicant matrices. It is mainly used for internal and demonstration purposes.

Usage

createMatrix(noflevels, logical = FALSE)

Arguments

noflevels
The number of levels (values) for each condition variable.
logical
Logical, return the matrix in logical values (only bivalent data).

Details

Configuration matrices contain all unique and complete intersections that can be formed from all values of $k$ variables. The total number of configurations $d$ is given by $d = \prod_{j = 1}^{k}{p_{j}}$, where $p_{j}$ is the number of values for condition variable $j$ and $k$ is the total number of condition variables. A configuration matrix is an essential part of a truth table. 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)}$. For demonstration purposes, implicant matrices should be created by the function allExpressions().

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

allExpressions, truthTable

Examples

Run this code
# a configuration matrix with three bivalent condition variables
noflevels <- rep(2, 3)
createMatrix(noflevels)

# with logical values
createMatrix(noflevels, logical = TRUE)

# its implicant matrix ("-1" stands for an eliminated value)
createMatrix(noflevels + 1) - 1

# a configuration matrix (the second variable has three values) 
noflevels <- c(2, 3, 2)
createMatrix(noflevels)

# its implicants matrix
createMatrix(noflevels + 1) - 1

Run the code above in your browser using DataLab