findPrimes {QCA} | R Documentation |
There is a finite number of prime implicants for any combination of causal conditions, equal to 2^k - 1, where k is the number of causal conditions. Counting out the input combination itself, the actual number is 2^k - 2. This function computes all possible unique prime implicants for a specific set of combinations (either to explain or to exclude)
findPrimes(noflevels, input.combs)
noflevels |
a vector containing the number of levels for each causal condition |
input.combs |
a matrix with combinations of causal conditions or a vector of line numbers from the same matrix |
a vector with the line numbers of all possible prime implicants
Adrian Dusa
Romanian Social Data Archive
adi@roda.ro
Faculty of Sociology and Social Work, University of Bucharest
adi@sas.unibuc.ro
Dusa, Adrian 2007 A mathematical approach to the boolean minimization problem, http://www.compasss.org/WPShort.htm
Dusa, Adrian 2007 Enhancing Quine-McCluskey, http://www.compasss.org/WPShort.htm
'getRow', 'findSubsets'
# all three conditions are binary, having two levels: 0 and 1 noflevels <- c(2, 2, 2) findPrimes(noflevels, 14) # 2 4 5 10 11 13 14 findPrimes(noflevels, 17) # 2 7 8 10 11 16 17 # both line numbers 14 and 17 findPrimes(noflevels, c(14, 17)) # 2 4 5 10 11 13 14 7 8 16 17 # input.combs as a matrix (input.combs <- getRow(noflevels + 1, c(14, 17))) # [,1] [,2] [,3] #[1,] 1 1 1 #[2,] 1 2 1 findPrimes(noflevels, input.combs) # 2 4 5 10 11 13 14 7 8 16 17