lecture 2
lecture 2
• Example Sentence: If P is "I will go to the park" and Q is "I will watch a movie," then
P ∨ Q is "I will go to the park or watch a movie."
• Meaning: Disjunction allows for either one or both conditions to be true. The statement
is true if at least one part is true.
• Example Sentence: If P is "I will have tea" and Q is "I will have coffee," then P ⊕ Q
is "I will have either tea or coffee, but not both."
• Meaning: Exclusive disjunction is true only when one of the statements is true, but not
both. If both statements are true or both are false, the combined statement is false.
• Example Sentence: If P is "It is sunny" and Q is "We will go to the beach," then P →
Q is "If it is sunny, then we will go to the beach."
• Meaning: Implication suggests that the first condition leads to the second. The
statement is only false if the first part is true and the second part is false.
6. Biconditional (↔): "if and only if"
• Example Sentence: If P is "I will pass the test" and Q is "I study hard," then P ↔ Q is
"I will pass the test if and only if I study hard."
• Meaning: Biconditional indicates that both conditions are dependent on each other.
The combined statement is true only if both parts are true or both are false.
These examples illustrate how each logical connective works in everyday language, which
a. ¬(P∧Q)≡¬P∨¬Q
b. ¬(P∨Q)≡¬P∧¬Q
3. Implication: P→Q≡¬P∨Q
Commutative Property
Law:
P∧Q≡Q∧P
P∨Q≡Q∨P
Associative Property
Law:
(P ∧ Q) ∧ R ≡ P ∧ (Q ∧ R)
(P ∨ Q) ∨ R ≡ P ∨ (Q ∨ R)
Identity Property
Law:
P ∧ True ≡ P
P ∨ False ≡ P
Domination Property
Law:
P ∨ True ≡ True
P ∧ False ≡ False
Explanation: Any statement combined with True through ∨ or with False through
∧ results in a constant outcome.
Idempotent Property
Law:
P∧P≡P
P∨P≡P
Negation Property
Law:
P ∨ ¬P ≡ True
P ∧ ¬P ≡ False
Expression: (P ∧ ¬Q) ∨ (P ∧ Q)
Expression: P ∧ True ≡ P
Example 2:
Show that ¬(𝑝 ∨ (¬𝑝 ∧ 𝑞)) and ¬𝑝 ∧ ¬𝑞 are logically equivalent.
1. Translating English Sentences:
There are numerous justifications for translating English sentences into
expressions that incorporate logical connectives and propositional variables.
Particularly, English (and all other Other human languages are frequently
ambiguous. Transcription sentences into compound statements (and other forms
of logical expressions, which we will introduce later in this chapter) eliminates
the ambiguity.
Example 1
(You can access the Internet from campus) only if (you are a computer science
major or you are not a student). Let 𝑝, 𝑞 and 𝑟 be the propositions: 𝑝 → 𝑞
𝑝: You can access the Internet from campus. 𝑞: You are a computer science
major. 𝑟: You are a student.
Example 2
(The automated reply cannot be sent) when (the file system is full.)
OR ( ∨ )
For OR, a proposition is true if at least one of the propositions is true. In bitwise
terms, OR results in 1 if either bit is 1.
NOT ( ¬ )
The NOT operation inverts the truth value in propositional logic. In bitwise
terms, it flips the bit: 0 becomes 1, and 1 becomes 0.
Exclusive OR (XOR)
Another useful operation is XOR, or exclusive OR, which is not as common in
basic propositional logic but is very important in digital logic. XOR is true only if
one of the propositions is true, not both. In bitwise operations, XOR gives 1 if
one of the bits is 1, but not both.
Example: Find the bitwise OR, bitwise AND, and bitwise XOR of the bit strings
01 1011 0110 and
11 0001 1101. (Here, and throughout this book, bit strings will be split into
blocks of four bits to make them easier to read.)
Solution: The bitwise OR, bitwise AND, and bitwise XOR of these strings are
obtained by taking the OR, AND, and XOR of the corresponding bits,
respectively. This gives us
01 1011 0110
11 0001 1101
11 1011 1111 bitwise OR
01 0001 0100 bitwise AND
10 010 1011 bitwise XOR
2. Logic Circuits
• A logic circuit (or digital circuit) receives input signals 𝑝1 , 𝑝2 , … , 𝑝𝑛 , each a bit
[either 0 (off) or 1 (on)], and produces output signals 𝑠1 , 𝑠2 , … , 𝑠𝑛 , each a bit.
• In this course, we will restrict our attention to logic circuits with a single output
signal; in general, digital circuits may have multiple outputs.
Logic Circuits
• Complicated digital circuits can be constructed from three basic circuits, called
gates
Example 1
• Determine the output for the combinatorial circuit in the following figure.
Example 2
Build a digital circuit that produces the output (𝑝 ∨ ¬𝑟) ∧ (¬𝑝 ∨ (𝑞 ∨ ¬𝑟))
when given input bits 𝑝, 𝑞, and 𝑟.
A compound proposition that is always true, no matter what the truth
values of the propositional variables that occur in it, is called a
tautology. A compound proposition that is always
false is called a contradiction. A compound proposition that is neither a tautology
nor a contradiction is called a contingency.
Example : (𝑝 ∧ 𝑞 → 𝑝)
Example1:
THE UNIQUENESS QUANTIFIER: ∃!xP (x) [or ∃1xP (x)] states “There
exists a unique x such that P (x) is true.
Example1:
Let P(x) be the statement "x + 1 > x." What is the truth value of the
quantification Vx P(x), where the domain consists of all real numbers?
Solution: Because P(x) is true for all real numbers x, the quantification
VxP(x) is true.
Example2:
Let Q(x) be the statement "x < 2." What is the truth value of the
quantification Vx Q(x), where the domain consists of all real numbers?
Solution: Q(x) is not true for every real number x, because, for instance,
Q(3) is false. That is, x = 3 is a counterexample for the statement Vx Q(x).
VxQ(x) is false.
Example3:
Let P(x) denote the statement "x > 3." What is the truth value of the
quantification 3x P(x), where the domain consists of all real numbers?
Solution: Because "x > 3" is sometimes true-for instance,
when x = 4-the existential quantification of P(x), which is 3x P(x), is true.
Example4:
What is the truth value of 3x P (x), where P(x) is the statement "x2 > 10"
and the universe of discourse consists of the positive integers not exceeding
4?
Solution: Because the domain is {1, 2, 3, 4}, the proposition 3x P(x) is the
same as the disjunctior P(1) v P(2) v P(3) v P(4). Because P(4), which is the
statement "42 > 10," is true, it follows that 3x P(x) is true.
• 𝑃(𝑥) is the statement "𝑥 has taken a course in calculus" and the domain
consists of the students in your class.
∃𝒙𝑷(𝒙) : “At least one student in your class has taken a course in calculus"
• The negation of this statement is
"Every student in this class has not taken calculus" ¬∃𝒙𝑷(𝒙) ≡ ∀𝒙¬𝑷(𝒙)
Thank you