CSC 203 Discrete Structures Note 2
CSC 203 Discrete Structures Note 2
Example 1:
• If it is raining, then the streets will be wet.
• It’s raining.
• Therefore, the streets will be wet.
Example 2:
• If Aliu exercises regularly, then he will be healthy.
• Aliu exercises regularly.
• Therefore, Aliu will be healthy.
Example 3:
• If I study hard and attend all my classes, then I will pass the exam.
• I am studying hard and attending all my classes.
• Therefore, I will pass the exam
2. Modus tollens (Denying the Consequent)
Rule: If P, then Q. Q is false; therefore, P is false.
Example 1:
• If it is raining, then the streets will be wet.
• The streets are not wet.
• Therefore, it is not raining.
Example 2:
• If a John is a doctor, then he has a medical degree
• John does not have a medical degree.
• Therefore, John is not a doctor.
3. Disjunctive Syllogism
Rule: p or q. Not p. Therefore, q.
Example 1:
It is either raining or sunny.
It is not raining.
Therefore, it is sunny
Example 2:
John is either a citizen of the United States or a citizen of Canada.
John is not a citizen of the Canada.
Therefore, John is a citizen of the United States
4. Hypothetical Syllogism
Rule: if p, then q, if q, then r. Therefore, if p, then r.
Example 1:
If a person is a lawyer, then the person has a law degree.
If a person has a law degree, then the person can practice law.
Therefore, if a person is a lawyer, then the person can practice law
Example 2:
If a team wins the championship, then the team will receive a trophy.
If a team receives a trophy, then the team will be recognized as the best
team.
Therefore, if a team wins the championship, then the team will be
recognized as the best team.
PREDICATE LOGIC (FIRST ORDER LOGIC)
In Predicate logic, a predicate is a statement that contains variables and
expresses a property or relationship between the variables. Here are
some examples of predicates:
• A(x) = x is an animal
• G(x,3) = x is greater than 3
• F(x, y) = x is a friend of y
• T(x,y,z) = x is taller than y and z
• C(x, Ghana) = x is a citizen of Ghana
3. A kid is angry
∃x (K(x) Ʌ A(x))
Interpretation
∃x: there exist some x
K(x): x is a Kid
A(x): x is angry
4. Some friends are loving and caring
∃x (F(x) ∧ L(x) ∧ C(x))
Interpretation
∃x: there exist some x (a variable representing a “friend”)
F(x): x is a friend
L(x): x is loving
C(x): x is caring
∧: “And” operator indicates that all conditions hold together