B. Sc. CSIT 5th Semester
By Bal Krishna Subedi1
Home Works for Logic
Propositional Logic
1. 7.4, 7.5, 7.7, 7.8 & 7.12 from Textbook (R&N)
2. The logical operator  is read “if and only if”. P Q is defined as being
equivalent to (P Q) ^ (Q  P). Based on this definition, show that (P Q) is
logically equivalent to (P  Q)  (Q ^ P).
a. By using truth table.
b. By a series of substitutions (use identities on page on Page 210)
3. Consider the knowledge base:
If it is raining out then Ann puts the top up on her convertible. Ann did not put
the top up on her convertible.
(a) Describe a set of propositional letters which can be used to represent the
knowledge base.
(b) Translate the KB into propositional logic using your propositional letters from
part a.
(c) Is it raining? Answer this question by using logical inference rules with the KB.
Predicate Logic
1. 8.2, 8.3, 8.4, 8.6, 8.7 & 8.9.
2. 9.2, 9.4, 9.9, 9.10, 9.11, 9.17, 9.18 & 9.19
3. Consider the following sentence in FOL:
3. Attempt to unify the following pair of expressions. Either show their most general
unifiers or explain why they will not unify.
a. P(X, Y) and p(a, Z)
b. p(X, X) and p(a, b)
B. Sc. CSIT 5th Semester
By Bal Krishna Subedi2
c. ancestor(X,Y) and ancestor (bill, father(bill))
d. ancestor (X, father(X)) and ancestor(david, george)
e. q(X) and q(a)
4. The following story is from N. Wirth’s (1976)
I married a widow (let’s call her W) who has a grown-up daughter (call her D).
My father (F), who visited us quite often, fell in love with my step daughter and
married her. Hence my father becomes my son-in-law and my step-daughter
becomes my mother. Some months later, my wife gave birth to a son (S1), who
becomes the brother-in-law of my father, as well as my uncle. The wife of my
father, that is, my step-daughter, also had a son (S2).
Using the predicate logic, create a set of expressions that represent the situation in
the above story. Add expressions defining basic family relationships such as the
definition of father-in-low and use modus ponen on this system to prove the
conclusion that “I am my own grandfather”.

Logic homework

  • 1.
    B. Sc. CSIT5th Semester By Bal Krishna Subedi1 Home Works for Logic Propositional Logic 1. 7.4, 7.5, 7.7, 7.8 & 7.12 from Textbook (R&N) 2. The logical operator  is read “if and only if”. P Q is defined as being equivalent to (P Q) ^ (Q  P). Based on this definition, show that (P Q) is logically equivalent to (P  Q)  (Q ^ P). a. By using truth table. b. By a series of substitutions (use identities on page on Page 210) 3. Consider the knowledge base: If it is raining out then Ann puts the top up on her convertible. Ann did not put the top up on her convertible. (a) Describe a set of propositional letters which can be used to represent the knowledge base. (b) Translate the KB into propositional logic using your propositional letters from part a. (c) Is it raining? Answer this question by using logical inference rules with the KB. Predicate Logic 1. 8.2, 8.3, 8.4, 8.6, 8.7 & 8.9. 2. 9.2, 9.4, 9.9, 9.10, 9.11, 9.17, 9.18 & 9.19 3. Consider the following sentence in FOL: 3. Attempt to unify the following pair of expressions. Either show their most general unifiers or explain why they will not unify. a. P(X, Y) and p(a, Z) b. p(X, X) and p(a, b)
  • 2.
    B. Sc. CSIT5th Semester By Bal Krishna Subedi2 c. ancestor(X,Y) and ancestor (bill, father(bill)) d. ancestor (X, father(X)) and ancestor(david, george) e. q(X) and q(a) 4. The following story is from N. Wirth’s (1976) I married a widow (let’s call her W) who has a grown-up daughter (call her D). My father (F), who visited us quite often, fell in love with my step daughter and married her. Hence my father becomes my son-in-law and my step-daughter becomes my mother. Some months later, my wife gave birth to a son (S1), who becomes the brother-in-law of my father, as well as my uncle. The wife of my father, that is, my step-daughter, also had a son (S2). Using the predicate logic, create a set of expressions that represent the situation in the above story. Add expressions defining basic family relationships such as the definition of father-in-low and use modus ponen on this system to prove the conclusion that “I am my own grandfather”.