Covers: Lesson 07 Difficulty: Intermediate to Advanced
Domain: robots, sensors, firmware versions, tests. Predicates: Rx = x is a robot, Sx = x is a sensor, Fx = x is a firmware version, Ox = x is operational, Dx = x is defective, Ux = x needs updating, Pxy = x passed test y, Hxy = x has component y.
A. “All robots are operational.”
B. “Some sensors are defective.”
C. “No firmware version needs updating.”
D. “Every robot has at least one sensor.”
E. “Some robots passed every test.”
F. “No robot passed all tests.”
G. “If any sensor is defective, then some robot is not operational.”
H. “Only operational robots passed the safety test.” (Let s = the safety test)
Using the same predicates as Problem 1:
A. ∃x(Rx · Dx)
B. ∀x(Sx ⊃ ~Dx)
C. ∀x∀y((Rx · Sy · Hxy) ⊃ ~Dy)
D. ~∃x(Rx · ∀y(Sy ⊃ Hxy))
Rewrite each statement using the equivalent quantifier.
A. ~∀x(Rx ⊃ Ox) →
B. ~∃x(Sx · Dx) →
C. ∀x~(Rx · Dx) →
D. “It’s not the case that every test was passed.” →
Derive the conclusion from the premises.
A.
1. ∀x(Rx ⊃ Sx) (All robots have sensors)
2. ∀x(Sx ⊃ Cx) (All things with sensors need calibration)
∴ ∀x(Rx ⊃ Cx) (All robots need calibration)
B.
1. ∀x(Fx ⊃ Bx) (All devices with old firmware have the bug)
2. ∃x(Rx · Fx) (Some robot has old firmware)
∴ ∃x(Rx · Bx) (Some robot has the bug)
C.
1. ∀x(Rx ⊃ Ox) (All robots are operational)
2. ∃x(Rx · ~Tx) (Some robot didn't pass the test)
∴ ∃x(Ox · ~Tx) (Something operational didn't pass the test)
Show that each argument is invalid by providing a counterexample (a domain where premises are true but conclusion is false).
A.
∀x(Px ⊃ Qx) (All P are Q)
∀x(Rx ⊃ Qx) (All R are Q)
∴ ∀x(Px ⊃ Rx) (All P are R)
B.
∃x(Rx · Dx) (Some robot is defective)
∃x(Rx · Ox) (Some robot is operational)
∴ ∃x(Rx · Dx · Ox) (Some robot is defective and operational)
Symbolize each statement.
A. “Exactly one robot failed the test.” (Use Fx = x is a robot, Tx = x failed the test)
B. “At least two sensors are defective.” (Use Sx = x is a sensor, Dx = x is defective)
C. “Only Robot-42 has the SPI bug.” (Use Bx = x has the SPI bug, r = Robot-42)
Translate this system requirement into predicate logic:
“For every robot in the fleet, if its battery level drops below 15%, then either it must return to dock within 5 minutes or an operator must be notified, unless the robot is currently carrying a critical payload.”
Let: Rx = x is a robot, Bx = x has battery below 15%, Dx = x returns to dock within 5 min, Nx = an operator is notified about x, Px = x is carrying a critical payload.
1. ∀x(Rx ⊃ Sx) Premise
2. ∀x(Sx ⊃ Cx) Premise
[For arbitrary a:]
3. Ra ⊃ Sa UI 1
4. Sa ⊃ Ca UI 2
5. Ra ⊃ Ca HS 3, 4
6. ∀x(Rx ⊃ Cx) UG 5
1. ∀x(Fx ⊃ Bx) Premise
2. ∃x(Rx · Fx) Premise
3. Ra · Fa EI 2 (EI first — fresh name 'a')
4. Fa ⊃ Ba UI 1 (instantiate for 'a')
5. Fa Simp 3 (Com then Simp)
6. Ba MP 4, 5
7. Ra Simp 3
8. Ra · Ba Conj 7, 6
9. ∃x(Rx · Bx) EG 8
1. ∀x(Rx ⊃ Ox) Premise
2. ∃x(Rx · ~Tx) Premise
3. Ra · ~Ta EI 2
4. Ra ⊃ Oa UI 1
5. Ra Simp 3
6. Oa MP 4, 5
7. ~Ta Simp 3 (Com, Simp)
8. Oa · ~Ta Conj 6, 7
9. ∃x(Ox · ~Tx) EG 8