All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Algorithms
Logical connectives (Posted on 2012-01-24) Difficulty: 3 of 5
Let P|Q mean "P and Q are both false." P|Q is true if P and Q are both false, and false otherwise. Define the following logical connectives just using P, Q, |, and parentheses.

1. ~P (not P)
2. P&Q (P and Q)
3. PVQ (P or Q)
4. P->Q (P implies Q)
5. P<->Q (P if and only if Q)

See The Solution Submitted by Math Man    
Rating: 4.5000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Solution if I understand the logic of -> and | Comment 3 of 6 |
1. is quite simple.  P|P is false if P is true and true if P is false so ~P=P|P.  This simple negation will come in handy below.

Let the ordered quadruplet be the values of
P true Q true
P true Q false
P false Q true
P false Q false
So according to the problem we have
P|Q=(f,f,f,t)
and we are seeking (I think.  I've never really learned logic.)
2. P&Q = (t,f,f,f)
3. PvQ = (t,t,t,f)
4. P->Q = (t,f,t,t)
5. P<->Q = (t,f,f,t)

2. We want it to be true only if both P and Q are false.  So we negate both and combine:  (P|P)|(Q|Q)
3. Is the opposite of P|Q so we just want to negate it: (P|Q)|(P|Q)
4. If you combine the opposite of one with the other it will shift where the t is:  (P|P)|Q = (f,t,f,f) so we just need to negate this:
((P|P)|Q) | ((P|P)|Q)
5. I had enough tables at this point to see that
(P|Q)|((P|P)|(Q|Q)) = (f,t,t,f) so we just need to negate this:
((P|Q)|((P|P)|(Q|Q))) | ((P|Q)|((P|P)|(Q|Q)))

I wouldn't be surprised if there were a simpler way to do this, but it seems to work for me.

  Posted by Jer on 2012-01-24 13:58:26
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (0)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2017 by Animus Pactum Consulting. All rights reserved. Privacy Information