Compound Statement, Truth Table

CharliePark·2020년 9월 5일
0

TIL

목록 보기
24/67

Statement

A statement (or proposition) is a sentence that is either true or false (but not both)

2+2 = 5 : False → statement

My brother Jonn is a stutdent → statement

Fridays are nice → not a statement

x+y > 0 → not statement

Compound Statement

Logical Connectives :

and \land : conjunction

or \lor : disjunction

xor ,\veebar, \oplus : exclusive disjunction

not ¬\neg : negation

e.g.p:x>0,q:x<3,r:x=3, thenpq0<x<3qrx3p(qr)0<x3e.g. p : x>0, q : x<3, r: x=3\\ ,\ then\\ p \land q \equiv 0 < x < 3\\ q \lor r \equiv x \le 3\\ p \land (q \lor r) \equiv 0<x\le3

Truth Tables

 pqpqpqpqTTTTFTFFTTFTFTTFFFFF\begin{matrix} p & q & p \land q & p \lor q & p \oplus q \\ \hline T & T & T & T & F \\ T & F & F & T & T \\ F & T & F & T & T \\ F & F & F & F & F \end{matrix}

 

 

 

 example1:(pq)¬rpqrpq¬r(pq)¬rTTTTFTTFTFFFFTTFFFFFTFFFTTFTTTTFFFTTFTFFTTFFFFTTexample 1 : (p \land q) \lor \neg r\\ \begin{matrix} p & q & r & p \land q & \neg r & (p \land q) \lor \neg r \\ \hline T & T & T & T & F & T \\ T & F & T & F & F & F \\ F & T & T & F & F & F \\ F & F & T & F & F & F \\ T & T & F & T & T & T \\ T & F & F & F & T & T \\ F & T & F & F & T & T \\ F & F & F & F & T & T \end{matrix}

 

 

 example2:(pq)¬(pq)pqpq¬(pq)(pq)(pq)¬(pq)TTTFTFTFFTTTFTFTTTFFFTFFexample 2 : (p \lor q) \land \neg(p \land q)\\ \begin{matrix} p & q & p \land q & \neg(p \land q) & (p \lor q) & (p \lor q) \land \neg(p \land q) \\ \hline T & T & T & F & T & F \\ T & F & F & T & T & T \\ F & T & F & T & T & T \\ F & F & F & T & F & F \\ \end{matrix}

so (pq)¬(pq)pq(p \lor q) \land \neg(p \land q) \equiv p \oplus q

0개의 댓글