Monday, July 18, 2011

Tautology practice for Summer 2011.


When a logical statement is a tautology, the bitstring created when performing all the necessary operations is all 1s.  In the following problems we will have two logical variables p and q, so p = 1100 and q = 1010.  The AND operator is ^.
The OR operator is v.
The NOT operator is ~.
The IMPLIES operator should be an arrow pointing right, but since that single symbol is not an option in .html, I will use => instead.  Remember that p => q can be changed to ~p v q.

Determine if each of these logical statements is a tautlogy or not.

1) p v (p => q)



2) p ^ (p => q)


3) (p v ~p) => q


4) (p ^ ~p) => q


Answers in the comments.


 

1 comment:

Prof. Hubbard said...

Recall that p = 1100 and q = 1010.

1) p v (p => q)

p => q is the same as ~p v q.

~p v q =
~1100 v 1010 =
0011 v 1010 =
1011

if we take the answer and OR with p, we get 1100 v 1011 = 1111, so this statement is a tautology.



2) p ^ (p => q)

Again, p => q becomes ~p v q.

~p v q =
~1100 v 1010 =
0011 v 1010 =
1011

if we take the answer and AND with p, we get 1100 ^ 1011 = 1000, so this statement is NOT a tautology.

3) (p v ~p) => q

(p v ~p) =
1100 v 0011 =
1111

1111 => 1010 =
~1111 v 1010 =
0000 v 1010 =
1010

This statement is NOT a tautology.




4) (p ^ ~p) => q


(p ^ ~p) =
1100 ^ 0011 =
0000

0000 => 1010 =
~0000 v 1010 =
1111 v 1010 =
1111

This statement is a tautology.