# a simple PI chart, formatted using internal function prettyTable()
PIs <- c("A", "B", "c", "D") # all prime implicants; the complete sum
FPs <- c("AbCD", "AbCd", "aBcd", "aBCD") # the fundamental products
chart <- demoChart(PIs, FPs)
prettyTable(chart)
# minimal sum: first or second PI: A + B
solveChart(chart)
# all sums: first or second PI (A + B);
# first or third or fourth PI (A + c + D)
solveChart(chart, all.sol = TRUE)
Run the code above in your browser using DataLab