factorize: Factorize Configurational Expressions

Description Usage Arguments Details Value Contributors Author(s) References See Also Examples

Description

This function finds all possibilities for factorizing a configurational expression.

Usage

1
2
factorize(expression, and.split = "", sort.factorizing = FALSE, 
          sort.factorized = FALSE)

Arguments

expression

A string representing a configurational expression or a QCA solution object of class “qca” generated by eQMC().

and.split

The AND-operator (if any).

sort.factorizing

Logical, sort results beginning with largest number of factorizing elements.

sort.factorized

Logical, sort results beginning with largest number of factorized elements.

Details

In Boolean algebra, the “*”-operator is distributive over the “+”- operator such that for any three literals a, b and c, the following law holds: (a*b) + (a*c) = a*(b + c) (Hohn 1966, pp.78-80; South 1974, p.12). The 'factorize' function finds all possible a for any configurational expression. Factorized versions of the initial expression(s) can be sorted in decreasing order by the number of factorizing literals or in decreasing order by the number of factorized literals.

Value

A list with the following components:

initial

The initial expression.

factored

The factorizations of the initial expression.

Contributors

Dusa, Adrian: development, programming, testing
Thiem, Alrik: development, documentation, testing

Author(s)

Alrik Thiem (Personal Website; ResearchGate Website)

References

Hohn, Franz E. 1966. Applied Boolean Algebra: An Elementary Introduction. 2nd ed. New York: Macmillan.

South, G. F. 1974. Boolean Algebra and Its Uses. New York: Van Nostrand Reinhold.

See Also

eQMC

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# factorize a disjunction of two two-way conjunctions;
# if single letters are used, argument "and.split" is not needed
factorize("AB + AC")

# "and.split" is needed in these cases
factorize("one*TWO*four + one*THREE + THREE*four", and.split = "*")
factorize("~ONE*TWO*~FOUR + ~ONE*THREE + THREE*~FOUR", and.split = "*")
factorize("one&TWO&four + one&THREE + THREE&four", and.split = "&")

# factorize solution objects directly
data(d.represent)
KRO.sol <- eQMC(d.represent, outcome = "WNP")
factorize(KRO.sol)

AlrikThiem/QCApro documentation built on May 5, 2019, 4:55 a.m.