Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

complexity

Number of combinations at a given complexity layer


Description

This function calculates the number of all possible combinations of conditions (including all levels for each condition), at a given complexity layer.

Usage

complexity(n, layers, noflevels)

Arguments

n

Numeric scalar, the number of input conditions.

layers

Numeric vector, the complexity layer(s) with values from 1 to n.

noflevels

Numeric vector containing the number of levels for each of the n conditions.

Details

These are the number of combinations which the CCubes algorithm (Dusa, 2018) checks to determine the prime implicants from a minimization process.

In the bottom-up approach, CCubes first checks for single conditions (combinations of both presence and absence, or more levels if multi-value), then all possible combinations of levels for two conditions etc.

The precise equation that partitions the search space into complexity layers is:

∑_{c = 1}^{k} {k\choose c} ∏_{s = 1}^{c} l_s

where l stands for the number of levels for each combination of c conditions out of k.

Value

A numeric vector.

Author(s)

Adrian Dusa

References

Dusa, A. (2018) “Consistency Cubes: A Fast, Efficient Method for Boolean Minimization”, R Journal, doi: 10.32614/RJ-2018-080

Examples

complexity(3) # all layers from 1 to 3

complexity(5, layers = 2)

QCA

Qualitative Comparative Analysis

v3.11
GPL (>= 3)
Authors
Adrian Dusa [aut, cre, cph] (<https://orcid.org/0000-0002-3525-9253>), Ciprian Paduraru [ctb] (<https://orcid.org/0000-0002-4518-374X>), jQuery Foundation [cph] (jQuery library and jQuery UI library), jQuery contributors [ctb, cph] (jQuery library; authors listed in inst/gui/www/lib/jquery-AUTHORS.txt), lp_solve [cph] (http://lpsolve.sourceforge.net), Vasil Dinkov [ctb, cph] (jquery.smartmenus.js library), Dmitry Baranovskiy [ctb, cph] (raphael.js library), Emmanuel Quentin [ctb, cph] (raphael.inline_text_editing.js library), Jimmy Breck-McKye [ctb, cph] (raphael-paragraph.js library), Alrik Thiem [aut] (from version 1.0-0 up to version 1.1-3)
Initial release
2021-01-21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.