Most of the times, this function takes a truth table object as the input
for the minimization procedure, but the same argument can refer to a data frame
containing calibrated columns.
For the later case, the function minimize() originally had some additional
formal arguments which were sent to the function truthTable():
outcome, conditions, n.cut,
incl.cut, show.cases, use.letters and
inf.test.
All of these parameters are still possible with function minimize(), but
since they are sent to the truthTable() function anyway, it is
unnecessary to duplicate their explanation here. The only situation which does need
an additional description relates to the argument outcome, where
unlike truthTable() which accepts a single one, the function
minimize() accepts multiple outcomes and performs a minimization for
each of them (a situation when all columns are considered causal conditions).
The argument include specifies which other truth table rows are
included in the minimization process. Most often, the remainders are included but
any value accepted in the argument explain is also accepted in the
argument include.
The argument dir.exp is used to specify directional expectations, as
described by Ragin (2003). They can be specified using SOP (sum of products)
expressions, which opens up the possibility to experiment with conjunctural
directional expectations. "Don't care" conditions are simply left unspecified.
If at least one of the conditions included in the analysis is multi-value, the
entire dir.exp expression should be specified in multi-value
notation using squared brackets. If a condition X is crisp or fuzzy, the
multi-value notation X[0] is interpreted as its absence, as in the ~X notation.
Activating the details argument has the effect of printing parameters
of fit for each prime implicant and each overall model, the essential prime
implicants being listed in the top part of the table. It also prints the truth
table, in case the argument input has been provided as a data frame
instead of a truth table object.
The default method (when all.sol = FALSE), is to find the minimal number
(k) of prime implicants needed to cover all initial positive output
configurations (minterms), then exhaustively search through all possible disjunctions of
k prime implicants which do cover those configurations.
The minimal number k is determined by solving the set covering problem on
the PI chart. During prime implicant generation, duplicate and dominated coverage
columns are marked and omitted from the chart passed to every solver backend; the
complete PI chart remains available for output and solution enumeration. Every
available backend returns a proven minimum. By default, the internal hybrid solver combines
a level-2 Lagrangian relaxation bound with
reduced-cost fixing and a progress-adaptive branch-and-bound search. When that search is
inconclusive, the reduced core is completed by the internal lp_solve backend (see
findmin() for details). Setting hybrid = FALSE instead uses
an integer programming formulation, solved with the Gurobi library when available or with
the internal lp_solve library otherwise. The choice of backend can therefore
only affect the solving time, never the solutions.
Once the PI chart is constructed using the prime implicants found in the previous
stages, the argument row.dom can be used to further eliminate
irrelevant prime implicants when solving the PI chart, applying the principle of row
dominance: if a prime implicant A covers the same (intial) positive output
configurations as another prime implicant B and in the same time covers
other configurations which B does not cover, then B is irrelevant and eliminated.
A large number of causal conditions (i.e. over 15), combined with a large number of cases
(i.e. hundreds) usually produce a very large number of prime implicants, resulting in a huge
and extremely complex PI chart with sometimes thousands of rows and hundreds of columns.
For such a complex PI chart, even finding a minimum is a formidable task, and exhaustively
solving it is very likely impossible in polynomial time. For this reason, after each level
of complexity the CCubes algorithm determines if the PI chart is too difficult, by
calculating the total number of combinations of minimum k PIs necessary to
cover all columns.
The argument max.comb controls this maximum number of combinations. It is a
rational number counted in (fractions of) billions, defaulted at zero to signal searching
to the maximum possible extent. If the total number of combinations exceeds a positive
value of max.comb, the PI chart is determined as too complex, the search is
stopped and CCubes attempts to return all possible models using the PIs from the previous
levels of complexity, when the PI chart was still not too complex.
In the extreme situation even this is not feasible, the argument first.min
controls returning only one (the very first found) minimal model, if at all possible.
For ordinary truth-table minimization, CCubes uses one stalled complexity level
as a trigger for exact checks. With first.min = TRUE, a bounded
weighted integer search and a native SAT solver check whether a smaller binary
cover can exist. A one-term cover is already minimal for a nonempty outcome.
When the check finds a smaller cover is possible, generation continues so that the
systematic chart contains the terms needed for a minimum model.
With the default first.min = FALSE, the check instead asks whether
a legal term exists that contains none of the chart's prime implicants as a
subterm. CCubes uses the complete chart to enumerate models. The native checks
are bounded and apply to ordinary point tables with up to 15 conditions.
Inconclusive checks continue through the applicable systematic depth.
For searches using pi.cons or sol.cons, an
independent finite-domain verifier reconstructs eligible prime implicants from
the truth table and calibrated cases. A complete-family proof may end PI
generation at a stalled level. After model search, the verifier checks a
smallest returned model and exhaustively excludes all smaller PI models.
It uses the same ordered double sums, membership operations and threshold
tolerances as QCA, with no rounded integer weights or floating-point pruning
bounds. With sol.cons > 0, feasibility uses the case-wise union's
consistency and sol.cov; otherwise it requires covering the positive
truth-table rows. The domain consists of eligible prime implicants, not arbitrary
narrower conjunctions that might have better fit.
The returned certification component reports whether minimum size
was independently certified. Its scope is global when PI depth is unrestricted,
or relative to pi.depth otherwise. A minimum-size certificate does
not assert that all returned irredundant models have that size, or that all
minimum models have been enumerated under other search limits. Verification
uses bounded work and memory: exhaustion leaves the existing search and
PI-chart fallbacks, including lp_solve, available and reports an inconclusive
certificate. It never changes an inconclusive check into a minimum claim.
Consistency-based PI generation also respects that depth. In the CCubes search with remainders,
a positive pi.depth imposes a hard limit on the number of conditions
in each prime implicant, regardless of pi.cons or
all.sol. The default pi.depth = 0 leaves conjunction
depth unrestricted by the user and retains automatic stopping. A positive limit
can exclude deeper terms and increase the minimum number of terms in a model;
any minimum is then relative to the permitted terms. The limit is respected even
if no cover exists within it. A positive max.comb can also limit
the search.
With sol.cons > 0, model sizes are searched in increasing order,
so the first successful size establishes the minimum for the generated prime
implicants. The default sol.depth = 0 no longer imposes a seven-term
cap. With max.comb = 0, consistency-based enumeration stops once
all branches are redundant with accepted models or provably unable to meet the
fit thresholds at any larger size. A size with no new models is not sufficient
to stop. Larger irredundant models remain available with all.sol = TRUE.
A positive sol.depth is an explicit model-size limit. See
causalChain for the data-derived upper bound and resource behavior.
This stopping rule concerns consistency-based enumeration, not Petrick's method.
The arguments pi.cons and sol.cons are not specific to the
traditional QCA minimization, that uses crisp (truth table) values of 0s and 1s. They
mimic a CNA-style search with granular consistency levels for both prime implicants
and / or solution models.