0% found this document useful (0 votes)
11 views55 pages

Chapter 1-1

Uploaded by

f23mmg06
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views55 pages

Chapter 1-1

Uploaded by

f23mmg06
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 55

Logic: Logic is the study of reasoning.

It is the basic on which all the


sentence are build. OR Correct and Incorrect reasoning.

A proposition is a declarative sentence (that is, a sentence that


declares a fact) that is either true or false, but not both.
Imperative Declarative
Interrogative
1.What time is it?
2.Read this carefully.
3.x + 1 = 2.
4. x + y = z
5.I am in Class.
6.Cat is bigger than Rat.
7.1 + 2 = 5 Propositional Logic:
8.2 + 2 = 5 The area of logic that deals
with propositions.
FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists
For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists
For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Propositions
Logical I like A.I
Connectives
Logical operators are used to form new propositions
also called compound propositions from two or more
existing propositions.

A truth table is a tabular representation of all the combinations of


values for inputs and their corresponding outputs
FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists
For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Negatio
n

• I am in NOT class
• Cat cannot fly.
• Today is Sunday.

Conjunct
ion
Let p and q be propositions. The conjunction of p
and q, denoted by p Λ q, is the proposition “p and
q”. The conjunction p Λ q is true when both p and q
are true and is false otherwise.

Today is Friday AND it is raining today.


I'd like pizza AND a salad for lunch.

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Disjunction
Let p and q be propositions. The disjunction of p and q,
denoted by p ν q, is the proposition “p or q”. The disjunction p
ν q is false when both p and q are false and is true otherwise.
Inclusive or : The disjunction is true when at least one of the two
propositions is true.
“Students who have taken calculus or computer science can take this class.”

Exclusive or : The disjunction is true only when one of the proposition is true.
“Ice cream or pudding will be served after lunch.”

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
CONDITIONAL STATEMENT /
IMPLICATION:
Let p and q be propositions. The conditional statement
p → q, is the proposition “if p, then q” which is false
when p is true and q is false, and true otherwise.
p is called the hypothesis (or antecedent or
premise) and q is called the conclusion (or
consequence).

DITIONAL STATEMENT / Bi-implications:


Let p and q be propositions. 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
“You can take the flight if and only if you buy a ticket.”
FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists
For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Other Conditional Statements:
• If you are working hard, then you are a topper.
Conditional

• If you are a topper, then you are working hard. Converse

• If you are not working hard, then you are not a topper. Inverse

• If you are not topper, then you are not working hard.
Contrapositive

Show using a truth table that the conditional is Show using truth tables that neither the
equivalent to the contrapositive. converse nor inverse of an implication are
not equivalent to the implication.

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Different Ways of Expressing p →q
CONDITIONAL STATEMENT:

Let p and q be propositions. 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. In the conditional statement p → q, p
is called the hypothesis (or antecedent or premise) and q is called the
conclusion (or consequence).

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Practice Time
Write each of these statements in the form “if p, then q” in English.
[Hint: Refer to the list of common ways to express conditional statements provided in this section.]

a) You send me an e-mail message only if I will remember to send you the address.

b) To be a citizen of this country, it is sufficient that you were born in the United States.

c) If you keep your textbook, it will be a useful reference in your future courses.

d) The Red Wings will win the Stanley Cup if their goalie plays well.

e) That you get the job implies that you had the best credentials.

f) The beach erodes whenever there is a storm.

g) It is necessary to have a valid password to log on to the server.

h) You will reach the summit unless you begin your climb too late.

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Practice Time
Let p, q, and r be the propositions
p: You have the flu.
q: You miss the final examination.
r: You pass the course.
Express each of these propositions as an English sentence.

a) p→q
b) ¬q ↔ r
c) q →¬r
d) p∨q∨r
e) (p →¬r) ∨ (q →¬r)
f) (p ∧ q) ∨ (¬q ∧ r)
FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists
For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Practice Time

Let p, q, and r be the propositions


p: You get an A on the final exam.
q: You do every exercise in this book.
r: You get an A in this class.
Write these propositions using p, q, and r and logical connectives.

a) You get an A in this class, but you do not do every exercise in this book.

b) You get an A on the final, you do every exercise in this book, and you get an A in this class.

c) To get an A in this class, it is necessary for you to get an A on the final.

d) You get an A on the final, but you don’t do every exercise in this book; nevertheless, you get an A in this class.

e) Getting an A on the final and doing every exercise in this book is sufficient for getting an A in this class.

f) You will get an A in this class if and only if you either do every exercise in this book or you get an A on the final.

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Propositional Equivalences, Law of Logic
Example: p ∨¬p
⚫A tautology is a proposition which is always true.

Example: p ∧¬p
⚫A contradiction is a proposition which is always false.

⚫A contingency is a proposition which is neither a tautology nor a contradiction, such as p

⚫ Two compound propositions p and q are logically equivalent if p↔q is a tautology.


⚫ We write this as p⇔q or as p≡q where p and q are compound propositions.
⚫ Two compound propositions p and q are equivalent if and only if the columns in a truth

⚫ This truth table show ¬p ∨ q is equivalent to p → q.


table giving their truth values agree.
Propositional Equivalences, Law of Logic

Contradiction occurs when we get a statement p, such that p is true and its negation ~p is also
true.

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Truth Tables For Compound Propositions

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Propositional Equivalences, Law of Logic

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Propositional Equivalences, Law of Logic

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Propositional Equivalences, Law of Logic

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Propositional Equivalences, Law of Logic

Show that ¬(p ∨ ¬(p ∧ q)) is a contradiction

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Propositional Equivalences, Law of Logic

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Propositional Equivalences, Law of Logic

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
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 exists,
that is, when the compound proposition is false for all assignments of truth
values to its variables, the compound proposition is unsatisfiable.

• Note that a compound proposition is unsatisfiable if and only if its negation


is true for all assignments of truth values to the variables, that is, if and only
if its negation is a tautology

Satisfibale: A compound proposition is satisfiable if there is an assignment of truth


values to its variables that makes it output true.

UnSatisfiable: If no such assignments exists i.e. compound proposition is equivalent to


CONTRADICTION, then compound proposition is unsatisfiable .

Solution: Such assignment of truth value which makes a compound proposition


satisfiable is called a solution of proposition.

A TRUTH TABLE can be used to determine whether a compound propositions is


satisfiable .

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
(p ∨ ¬q) ∧ (q ∨ ¬r) ∧ (r
∨ ¬p)

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Notation

The n-Queens Problem Sudoku

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Predicates and Quantifiers

I am going to teach you Discrete Math.

x > 10

Predicate Function:
After assigning its become Proposition.
Truth Value:

“Quantifier”

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Predicates
Predicate Logic deals with predicates, which are propositions, consist
of variables.
A predicate is a sentence that contains a finite number of
variables and becomes a statement when specific values are
substituted for the variables. The domain of a predicate variable is
the set of all values that may be substituted in place of the variable.
Property of subject expression that contain variables
Why do we study it in DM, [to deal with variables]
Propositional Function
Predicate is also called propositional Function

Denote: P(Variable)

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Predicates

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Predicates

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Predicates and Quantifiers
The variable of predicates is quantified by quantifiers. There are two types of
quantifier in predicate logic - Existential Quantifier and Universal Quantifier.

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Quantifiers

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Quantifiers

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Quantifiers
Let C(x) be the statement “x has a cat,” let D(x) be the statement “x has a
dog,” and let F(x) be the statement “x has a ferret.” Express each of these
statements in terms of C(x), D(x), F(x), quantifiers, and logical connectives.
Let the domain consist of all students in your class.

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
a)

f(x) : x is flying more than 25000 miles in a year


g(x) : x takes more than 25 flights during that
year
e (x) : x qualifies as an elite flyer
b)

m(x): x is a man
c(x, y) : x has the change if previous time is less
than y
q (x) : qualifies for the marathon
c)

M: received Master's degree


H(x): took x hours for the course
W: wrote thesis
G (x, y) : graded x or higher in course y

d)
c(x) : x taken more than 21 credit hours in a
semester
A(x) : x has received all A

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Negating Quantified Expressions

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Quantifiers, De Morgan’s Laws for Quantifiers
What are the negations of the statements “There is an honest politician”
and “All Americans eat cheeseburgers”?

Solution: Let H (x) denote “x is honest.” Then the statement “There is an


honest politician” is represented by ∃x H (x), where the domain consists of
all politicians. The negation of this statement is ¬∃x H(x), which is
equivalent to ∀x ¬H(x).

This negation can be expressed as “Every politician is dishonest.”

(Note: In English, the statement “All politicians are not honest”


is ambiguous. In common usage, this statement often means
“Not all politicians are honest.”
Consequently, we do not use this statement to express this negation.)

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Quantifiers, De Morgan’s Laws for Quantifiers
What are the negations of the statements ∀x(x2 > x) and ∃x(x2 = 2)?

Solution: The negation of ∀x(x2 > x) is the statement ¬∀x(x2 > x), which is equivalent to
∃x¬(x2 > x). This can be rewritten as ∃x(x2 ≤ x).

The negation of ∃x(x2 = 2) is the statement ¬∃x(x2 = 2), which is equivalent to ∀x¬(x2 = 2).
This can be rewritten as ∀x(x2 = 2).
The truth values of these statements depend on the domain.

Show that ¬∀x(P (x) → Q(x)) and ∃x(P (x) ∧ ¬Q(x)) are logically equivalent.

Solution: By De Morgan’s law for universal quantifiers, we know that


¬∀x(P (x) → Q(x)) and ∃x(¬(P (x) → Q(x))) are logically equivalent.

By the fifth logical equivalence, we know that ¬(P (x) → Q(x)) and P (x) ∧ ¬Q(x) are logically
equivalent for every x. Because we can substitute one logically equivalent expression for
another in a logical equivalence, it follows that ¬∀x(P (x) → Q(x)) and ∃x(P (x) ∧ ¬Q(x)) are
logically equivalent.
FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists
For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Nested Quantifiers
Two quantifiers are nested if one is within the scope of the other.

∀x ∃y(x + y = 0)
∀x ∀y(x + y = y + x)

∀x ∀y ∀z(x + (y + z) = (x + y) + z)

∀x ∀y((x > 0) ∧ (y < 0) → (xy <


0))

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Nested Quantifiers, Orders

∀x ∀y P(x y)
∀x ∃y P(x y)
∃x ∀y P(x y)
∃x ∃y P(x y)

So, we concluded the new concept of Equivalency here as well.


FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists
For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Nested Quantifiers, Questions

a) This says that there exists a real number x such that for every real number y, the
product xy equals y. That is, there is a multiplicative identity for the real numbers. This
is a true statement, since x = 1 is the identity.

b) The product of two negative real numbers is always a positive real number.

c) There exist real numbers x and y such that x2 exceeds y but x is less than y. This is true,
since we can take x =2 and y =3, for instance.

d) This says that for every pair of real numbers x and y , there exists a real number z that is
their sum. In other words, the real numbers are closed under the operation of addition,
another true fact. (Some authors would include the uniqueness of z as part of the
meaning of the word closed.)
FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists
For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Nested Quantifiers, Questions
Negating Nested Quantifiers

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Rules of Inference
Proofs in mathematics are valid arguments that establish the truth of mathematical
statements. By an argument, we mean a sequence of statements that end with a conclusion.
By valid, we mean that the conclusion, or final statement of the argument, must follow from
the truth of the preceding statements, or premises, of the argument..

A rule of inference, inference rule or transformation rule is a logical form consisting of a


function which takes premises, analyzes their syntax, and returns a conclusion (or
conclusions).

Valid Arguments in Propositional Logic


“If you have a current password, then you can log onto the network.”
“You have a current password.”
Therefore,
“You can log onto the network.”

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Rules of Inference for Propositional Logic

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Rules of Inference for Propositional Logic
Modus Ponens:
The Modus Ponens rule is one of the most important rules of inference, and it states that if P and P → Q is true, then we
can infer that Q will be true. It can be represented as:

Example:

Statement-1: "If I am sleepy then I go to bed" ==> P→ Q


Statement-2: "I am sleepy" ==> P

Conclusion: "I go to bed." ==> Q.


Hence, we can say that, if P→ Q is true and P is true then Q will be true.

Modus Tollens:
The Modus Tollens rule state that if P→ Q is true and ¬ Q is true, then ¬ P will also true. It can be represented as:

Statement-1: "If I am sleepy then I go to bed" ==> P→ Q


Statement-2: "I do not go to the bed."==> ~Q
Statement-3: Which infers that "I am not sleepy" => ~P

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Rules of Inference for Propositional Logic

Hypothetical Syllogism:
The Hypothetical Syllogism rule state that if P→R is true whenever P→Q is true, and
Q→R is true. It can be represented as the following notation:

Example:
Statement-1: If you have my home key then you can unlock my home. P→Q
Statement-2: If you can unlock my home then you can take my money. Q→R
Conclusion: If you have my home key then you can take my money. P→R

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Rules of Inference for Propositional Logic
Disjunctive Syllogism:
The Disjunctive syllogism rule state that if P∨Q is true, and ¬P is true, then Q will be true. It can be
represented as:
Example:

Statement-1: Today is Sunday or Monday. ==>P∨Q


Statement-2: Today is not Sunday. ==> ¬P
Conclusion: Today is Monday. ==> Q

Addition:
The Addition rule is one the common inference rule, and it states that If P is true, then P ∨Q will be true.
Example:

Statement: I have a vanilla ice-cream. ==> P


Statement-2: I have Chocolate ice-cream.
Conclusion: I have vanilla or chocolate ice-cream. ==> (P∨Q)

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Rules of Inference for Propositional Logic
Simplification:
The simplification rule state that if P∧ Q is true, then Q or P will also be true. It
can be represented as:

Resolution:
The Resolution rule state that if P∨Q and ¬ P∧R is true, then Q∨R will also be
true. It can be represented as

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Using Rules of Inference to Build Arguments
Show that the premises “It is not sunny this afternoon and it is colder than yesterday,”
“We will go swimming only if it is sunny,” “If we do not go swimming, then we will take
a canoe trip,” and “If we take a canoe trip, then we will be home by sunset” lead to the
conclusion “We will be home by sunset.”
Let p be the proposition “It is sunny this afternoon,” q the
proposition “It is colder than yesterday,” r the proposition
“We will go swimming,” s the proposition “We will take a
canoe trip,” and t the proposition “We will be home by
sunset.” Then the premises become ¬p ∧ q,r → p, ¬r → s,
and s → t. The conclusion is simply t. We need to give a valid
argument with premises ¬p ∧ q, r → p, ¬r → s, and s → t
and conclusion t.
We construct an argument to show that our premises lead
to the desired conclusion as follows.

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Using Rules of Inference to Build Arguments
Show that the premises “If you send me an e-mail message, then I will finish writing
the program,” “If you do not send me an e-mail message, then I will go to sleep early,”
and “If I go to sleep early, then I will wake up feeling refreshed” lead to the conclusion
“If I do not finish writing the program, then I will wake up feeling refreshed.”
Solution: Let p be the proposition “You send me an e-
mail message,” q the proposition “I will finish writing
the program,” r the proposition “I will go to sleep
early,” and s the proposition “I will wake up feeling
refreshed.” Then the premises are p → q, ¬p → r, and
r → s. The desired conclusion is ¬q → s. We need to
give a valid argument with premises p → q, ¬p → r,
and r → s and conclusion ¬q → s.
This argument form shows that the premises lead to
the desired conclusion.

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Resolution
Computer programs have been developed to automate the task of reasoning
and proving theorems. Many of these programs make use of a rule of
inference known as resolution. This rule of inference is based on the
tautology Links.
The Resolution Principle are used to prove whether an argument is
CORRECT OR NOT.

Literal: A variable or negation of a variable is called a literal.


Clause: A clause is a disjunction of literals.
((p ∨ q) ∧ (¬p ∨ r)) → (q ∨ r).

The final disjunction in the resolution rule, q ∨ r, is called the Resolvent.


When we let q = r in this tautology, we obtain (p ∨ q) ∧ (¬p ∨ q) → q.
Furthermore, when we let r = F, we obtain (p ∨ q) ∧ (¬p) → q (because q ∨ F
≡ q), which is the tautology on which the rule of disjunctive syllogism is based.

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Resolution
Use resolution to show that the hypotheses “Jasmine is skiing or it is not
snowing” and “It is snowing or Bart is playing hockey” imply that “Jasmine
is skiing or Bart is playing hockey.”

Solution: Let p be the proposition “It is snowing,” q the proposition “Jasmine


is skiing,” and r the proposition “Bart is playing hockey.” We can represent the
hypotheses as ¬p ∨ q and p ∨ r, respectively. Using resolution, the
proposition q ∨ r, “Jasmine is skiing or Bart is playing hockey,” follows.

Show that the premises (p ∧ q) ∨ r and r → s imply the conclusion p ∨ s.

Solution: We can rewrite the premises (p ∧ q) ∨ r as two clauses, p ∨ r and q


∨ r. We can also replace r → s by the equivalent clause ¬r ∨ s. Using the two
clauses p ∨ r and ¬r ∨ s, we can use resolution to conclude p ∨ s.

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Fallacies
There are some common arguments which are invalid. Though at
first glace, they seem right. Such a type of argument is known as
Fallary.

The proposition ((p → q) ∧ q) → p is not a tautology, because it is


false when p is false and q is true. However, there are many
incorrect arguments that treat this as a tautology.
In other Links words, they treat the argument with premises p → q
and q and conclusion p as a valid argument form, which it is not. This
type of incorrect reasoning is called the fallacy of affirming the
conclusion.

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Fallacies
Is the following argument valid?
If you do every problem in this book, then you will learn discrete mathematics.
You learned discrete mathematics.
Therefore,
you did every problem in this book.

Solution: Let p be the proposition “You did every problem in this book.” Let q be the
proposition “You learned discrete mathematics.” Then this argument is of the form: if p →
q and q, then p.
This is an example of an incorrect argument using the fallacy of affirming the conclusion.
Indeed, it is possible for you to learn discrete mathematics in some way other than by
doing every problem in this book. (You may learn discrete mathematics by reading,
listening to lectures, doing some, but not all, the problems in this book, and so on.)
The proposition ((p → q) ∧ ¬p) → ¬q is not a tautology, because it is false when p is false
and q is true. Many incorrect arguments use this incorrectly as a rule of inference.

This type of incorrect reasoning is called the fallacy of denying the hypothesis.

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Rules of Inference for Quantified Statements
We have discussed rules of inference for propositions. We will now describe some
important rules of inference for statements involving quantifiers. These rules of
inference are used extensively in mathematical arguments, often without being
explicitly mentioned.

Universal instantiation is the rule of inference used to conclude that P(c) is true,
where c is a particular member of the domain, given the premise ∀xP(x). Universal
instantiation is used when we conclude from the statement “All women are wise”
that “Lisa is wise,” where Lisa is a member of the domain of all women.

Universal generalization is the rule of inference that states that ∀xP(x) is true, given
the premise that P(c) is true for all elements c in the domain. Universal
generalization is used when we show that ∀xP(x) is true by taking an arbitrary
element c from the domain and showing that P(c) is true. The element c that we
select must be an arbitrary, and not a specific, element of the domain. That is, when
we assert from ∀xP(x) the existence of an element c in the domain,

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Rules of Inference for Quantified Statements

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Rules of Inference for Quantified Statements

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/
Rules of Inference for Quantified Statements
Show that the premises “A student in this class has not read the book,” and
“Everyone in this class passed the first exam” imply the conclusion “Someone
who passed the first exam has not read the book.”

FREE: For Complete Playlist: https://www.youtube.com/c/FahadHussaintutorial/playlists


For Code, Slide and Books: https://fahadhussaincs.blogspot.com/

You might also like