Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Creating Truth Tables

  1. Sep 8, 2012 #1
    I am having a little bit of difficulty in arranging the truth value of a each propositional variable, specifically when the amount of propositional variables exceeds 2. I know if I have three propositional variables, then I have eight combinations, meaning my first column would look like:


    Is there a general pattern to follow for creating columns for, say, Q and R?
  2. jcsd
  3. Sep 8, 2012 #2

    Stephen Tashi

    User Avatar
    Science Advisor

    Think of doing a countdown in binary arithmetic.
    If you read down the columns, the entries have a periodic pattern. The period of a column is half the period of the column to its left.
  4. Sep 10, 2012 #3


    User Avatar

    Count the number of distinct sentence letters, say this number is n. Then the total number of rows will be 2n. For your first sentence letter divide 2n in half. Say the result is m. So make m T's and m F's under the first letter. Then take m and divide it in half coming up with, say, p, and make p T's and p F's under the next letter. Then divide p in half and make that many T's and that many F's under the next sentence letter. Continue this process until the number you obtain by dividing in half is the number one. Then make one T and one F under the last letter until you reach the end.

    As an example for 3 sentence letters there are eight possibilities. So for the first letter we make 4 (8/2) T's and 4 F's. Then we make 2 (4/2) T's and 2 F's until we reach the end. Finally, we make 1 (2/2) T and 1 F down the column until we reach the eighth row.

    I have a computer program that I've written for making truth tables that uses this algorithm for filling in the possibilities.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook