Skip to content
Prev 390988 / 398506 Next

Is there a Truth Table Generator in R?

There are 2^(2^length(tt)) possible "truth" vectors for the inputs defined in tt. AND-ing all of the inputs only gives one of those possibilities. Some popular named cases for 2 inputs are shown here [1], but it is common to use combinations of !, & and | to specify a particular truth vector. There is also the problem of reverse-engineering such a boolean expeession [2] in simplest form from a given truth vector, but I don't know if anyone has implemented such algorithms in R.

[1] https://en.wikipedia.org/wiki/Truth_table

[2] https://en.wikipedia.org/wiki/Karnaugh_maps
On March 12, 2022 2:17:32 PM PST, Bert Gunter <bgunter.4567 at gmail.com> wrote: