How do you express system specifications using logical propositions p, q, and r?

  • Thread starter Thread starter VinnyCee
  • Start date Start date
  • Tags Tags
    Logic
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
5 replies · 27K views
VinnyCee
Messages
486
Reaction score
0

Homework Statement



Express the system specifications using the propositions p "The user enters a valid password," q "Access is granted," and r "The user has paid the subscription fee" and logical connectives.

a) The user has paid the subscription fee, but does not enter a valid password.

b) Access is granted whenever the user has paid the subscription fee and enters a valid password.

c) Access is denied if the user has not paid the subscription fee.

d) If the user has not entered a valid password but has paid the subscription fee, then access is granted.

Homework Equations



p = "The user enters a valid password"
q = "Access is granted"
r = "The user has paid the subscription fee"

The Attempt at a Solution



a) [tex]r\,\wedge\,\neg\,p[/tex]

b) [tex]q\,\longleftrightarrow\,(r\,\wedge\,q)[/tex]

c) [tex]\neg\,r\,\longrightarrow\,\neg\,q[/tex]

d) [tex](\neg\,p\,\wedge\,r)\,\longrightarrow\,q[/tex]Do these answers look right?
 
Physics news on Phys.org
Everything looks right, except you made a typo (I guess) in b), it should be [tex]q\,\longleftrightarrow\,(r\,\wedge\,p)[/tex], unless I'm missing something.
 
Even modulo typos, b is not right. The implication is not both ways. It does not assert that the only way to get access is with subscription and a valid password.
 
matt grime said:
Even modulo typos, b is not right. The implication is not both ways. It does not assert that the only way to get access is with subscription and a valid password.

Excuse my mistake, it should be [tex](r \wedge p) \Rightarrow q[/tex].
 
So they are all right except that B is really [tex](r\,\wedge\,p)\,\longrightarrow\,q[/tex]?
 
VinnyCee said:
So they are all right except that B is really [tex](r\,\wedge\,p)\,\longrightarrow\,q[/tex]?

Yes, you already have two answers which implied that. :wink: