1 - Logic Flashcards
What is a proposition? What is NOT a proposition?
A statement that is true or false.
Questions and commands (“have a nice day”) are NOT propositions
True or False: A proposition’s truth value must be known.
False. A proposition is still a proposition regardless of whether the truth value is known to be true, known to be false, unknown, or a matter of opinion.
“Monday will be cloudy” and “the movie was funny” = STILL propositions
What is a compound proposition?
Individual propositions connected by a logical operation (and, or)
What is a conjunction operation? When is it true? What symbol is used?
p ∧ q = “p and q” = the conjunction of p and q
p ∧ q is true ONLY when both p and q are true
What is a disjunction operation? When is it true? What symbol is used?
p ∨ q = “p or q” = disjunction of p and q
p ∨ q is true when either p or q is true
What is this: p ⊕ q? When is it true?
Exclusive or - true ONLY when one proposition is true and the other proposition is false
What is negation? What is its symbol?
negation operation reverses the truth value of the proposition
¬p = “not p”
What is the order of operations for compound propositions?
Parentheses first, then “NAO” =
Not
And
Or
How many rows in a truth table? How do you choose which truth values go where for the initial variables?
for n variables, 2 to the n rows. 3 variables = 8 rows.
First column: half T, half F
Second column: 1/4 T, 1/4 F, 1/4 T, 1/4 F
…last column: T F T F T F…
What is the rule w/ symbol ∧ ?
“∧” = and = ONE F = F lambda = lANDa
What is the rule w/ symbol ∨ ?
“∨” = or = ONE T = T
vOR
What is the converse of p → q ?
q → p
What is the inverse of p → q ?
¬p → ¬q
What is the contrapositive of p → q ?
¬q → ¬p
When is p → q False?
p → q is false ONLY when p=T and q=F
T → F is FALSE
otherwise, TRUE!
When is p ↔ q true?
When p and q have the same truth value