CSE261 Chapter1
Logic and bit operators
1 = true 0 = false
Propositional Satisfiability
A compound proposition is satisfiable if there is an assignment of truth values to its variables that makes it true. When no such assignments exist, the compound proposition is unsatisfiable -A compound proposition is unsatisfiable if and only if its negation is a tautology.
Consistent System Specifications
A list of propositions is consistent if it is possible to assign truth values to the proposition variables so that each proposition is true.
Translate the statement ∀x(C(x)∨ ∃y(C(y)∧F(x, y))) where C(x) is "x has a computer," and F(x,y) is "x and y are friends," and the domain for both x and y consists of all students in your school.
Every student in your school has a computer or has a friend who has a computer.
If R(x,y)= "x relies upon y" translate ∀x(∃y R(x,y))= ∃y(∀x R(x,y))= ∃x(∀y R(x,y))= ∀y(∃x R(x,y))=
Everyone has someone to rely on. There is a person whom everyone relies on including him/herself There is a person who relies on everyone Everyone relies upon everybody (including themselves)
Hypothesis and conclusion
In the conditional statement p → q, p is called the hypothesis (or antecedent or premise) and q is called the conclusion (or consequence).
tautology
Proposition which is always true. Example: p ∨¬p
Negating Quantified Expressions ∀x (De Morgan's Laws for Quantifiers)
Symbolically ¬∀x J(x) and ∃x ¬J(x) are equivalent "Every student in your class has taken a course in Java." Negating the original statement gives "It is not the case that every student in your class has taken Java." This implies that "There is a student in your class who has not taken Java."
Implication
The conditional statement p → q is the proposition "if p, then q." The conditional statement p → q is false when p is true and q is false, and true otherwise.
Converse
The proposition q → p is called the converse of p → q.
Inverse
The proposition ¬p → ¬q is called the inverse of p → q
Precedence of qualifiers
The quantifiers ∀ and ∃ have higher precedence than all the logical operators. For example, ∀x P(x) ∨ Q(x) means (∀x P(x)) ∨ Q(x)
Translate the statement ∃x∀y∀z((F(x,y)∧F(x,z)∧(y≠z))→¬F(y,z))
There is a student none of whose friends are also friends with each other.
Logically equivalent (p≡q)
Two compound propositions p and q are logically equivalent if p↔q is a tautology.
Contradiction
a proposition which is always false. Example: p ∧¬p
Arguments in Propositional Logic
an argument is a sequence of propositions, all but the final proposition are called premises; the last statement is the conclusion. the argument is valid if the premises imply the conclusion
Predicate logic (FOL: first-order logic)
distinguishes the subject of a sentence from its predicate. Variables: x, y, z Predicates: P(x), M(x) Quantifiers: used to express the meaning of English words including all and some
Proof by contraposition (indirect proof)
ex. proving p → q by assuming ¬q and show ¬p is true also. If we give a direct proof of ¬q → ¬p then we have a proof of p →q
Vacuous proof
if we know p is false then, p → q is true
trivial proof p → q
if we know q is true, then p → q is true as well
Identity Laws
p ^ T ≡ p p ∨ F ≡ p
Conditional statements and their contrapositive always have the same truth value (the inverse and converse are also equivalent)
p → q and ¬q → ¬p are equivalent
Distributive Laws
p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r) p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r)
Negation Laws
p ∨ ¬p ≡ T p ^ ¬p ≡ F
Double Negation Law
¬(¬p) ≡ p
Negation
¬p It is not the case that p
Disjunction
∨ p ∨ q "p or q." The disjunction p ∨ q is false when both p and q are false and is true otherwise.
Exclusive Or
⊕ p ⊕ q true when exactly one of p and q is true and is false otherwise.
Absorption Laws
p ∨ (p ∧ q) ≡ p p ∧ (p ∨ q) ≡ p
Domination Laws
p ∨ T ≡ T p ^ F ≡ F
Idempotent Laws
p ∨ p ≡ p p ^ p ≡ p
Conditional statements are true if the conclusion is true, regardless of the hypothesis
"If Juan has a smartphone, then 2 + 3 = 5" is true from the definition of a conditional statement, because its conclusion is true. (The truth value of the hypothesis does not matter then.)
Universal Quantifier
"for all" symbol: ∀ ∀x P(x) asserts P(x) is true for every x in the domain. ∀x P(x) is read as "For all x, P(x)" or "For every x, P(x)
Terminology used to express p → q
"if p, then q" "p is sufficient for q" "q if p" "q when p" "a necessary condition for p is q" "q unless ¬p" "p implies q" "p only if q" "a sufficient condition for q is p" "q whenever p" "q is necessary for p" "q follows from p"
Terminology used to express p ↔ q
"p is necessary and sufficient for q" "if p then q, and conversely" "p iff q."
Fallacy of denying the hypothesis
"p→q is true, and p is false, so q must be false." (No, because F→T is true.) a.k.a ((p→q)∧¬p) →¬q
Fallacy of affirming the conclusion
"p→q is true, and q is true, so p must be true." (No, because F→T is true.) a.k.a ((p→q)∧q)→p
Existential Quantifier
"there exists" symbol: ∃ ∃x P(x) asserts P(x) is true for some x in the domain. ∃x P(x) is read as "For some x, P(x)", or as "There is an x such that P(x)," or "For at least one x, P(x)."
Associative Laws
(p ∧ q) ∧ r ≡ p ∧ (q ∧ r) (p ∨ q) ∨ r ≡ p ∨ (q ∨ r)
Implication Law
(p→q)⇔(¬p∨q)
Number of rows in a truth table with n propositional variables
2^n
Conjunction
p ∧ q, "p and q." "p but q" The conjunction p ∧ q is true when both p and q are true and is false otherwise.
Negating Quantified Expressions ∃x (De Morgan's Laws for Quantifiers)
Symbolically ¬∃ x J(x) and ∀ x ¬J(x) are equivalent "There is a student in this class who has taken a course in Java." Negating the original statement gives "It is not the case that there is a student in this class who has taken Java." This implies that "Every student in this class has not taken Java"
Biconditional
The biconditional statement p ↔ q is the proposition "p if and only if q." The biconditional statement p ↔ q is true when p and q have the same truth values, and is false otherwise. Biconditional statements are also called bi-implications.
argument form
an argument that is valid no matter what propositions are substituted into its propositional variables. In an argument form, if the premises are p1,p2,...,pn and the conclusion is q then (p1 ∧p2 ∧ ...∧pn ) → q is a tautology.
Contrapositive
contrapositive of p → q is the proposition ¬q → ¬p
Commutative Laws
p ∧ q ≡ q ∧ p p ∨ q ≡ q ∨ p
De Morgan's Laws
¬(p ∧ q) ≡ ¬p ∨ ¬q ¬(p ∨ q) ≡ ¬p ∧ ¬q
"Every mail message larger than one megabyte will be compressed." Let L(m, y) be "Mail message m is larger than y megabytes." Let C(m) denote "Mail message m will be compressed."
∀m(L(m,1) → C(m))
Shorthand
∀x>0 P(x) is shorthand for "For all x that are greater than zero, P(x)." =∀x (x>0 → P(x)) ∃x>0 P(x) is shorthand for "There is an x greater than zero such that P(x)." =∃x (x>0 ∧ P(x))
Uniqueness Quantifier
∃!x P(x) means that P(x) is true for one and only one x in the universe of discourse (i.e. domain) "There is a unique x such that P(x)." "There is one and only one x such that P(x)"
"If a user is active, at least one network link will be available." Let A(u) represent "User u is active." Let S(n, x) represent "Network link n is in state x."
∃u A(u) →∃nS(n, available)