Learn R Programming

QCA (version 1.0-4)

findSubsets: Find all Possible Subsets of an Implicant

Description

This function finds all row numbers in the implicant matrix which correspond to all possible subsets of an implicant.

Usage

findSubsets(noflevels3k, row.no, maximum)

Arguments

noflevels3k
A vector containing the number of levels for each condition incremented by 1
row.no
The row number of the implicant in the implicant matrix
maximum
The highest row number to be returned

Value

  • A vector of the line numbers of all possible subsets in the implicant matrix

Details

All subsets of an implicant can be found in the implicant matrix. The implicant matrix consists of all configurations and their supersets, including the empty set. 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 (Dusa, 2007, 2010). The findSubsets() function finds all row numbers in the implicant matrix which correspond to all possible subsets of an implicant.

References

A. Dusa. Enhancing Quine-McCluskey. WP 2007-49, COMPASSS, 2007. URL: http://www.compasss.org/wpseries/Dusa2007b.pdf.

A. Dusa. A Mathematical Approach to the Boolean Minimization Problem. Quality & Quantity, 44(1):99-113, 2010.

See Also

findSupersets

Examples

Run this code
# three conditions with two levels each
noflevels <- c(2, 2, 2)

# the second row of the implicant matrix corresponding to the first level of 
# the rightmost condition
getRow(noflevels = noflevels + 1, row.no = 2) - 1

# the row numbers of the implicant matrix which correspond to subsets of this level  
(rows <- findSubsets(noflevels = noflevels + 1, 2))

# the corresponding matrix representation of these rows 
getRow(noflevels = noflevels + 1, row.no = rows) - 1

# stopping at row number 20
getRow(noflevels = noflevels + 1, row.no = findSubsets(noflevels + 1, 2, 20)) - 1

Run the code above in your browser using DataLab