Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Chapter 8 Logic and Inference 8.2 Proposition Logic 8.3 Logical Inference 8.4 Predicate Logic 8.2 Proposition Logic Proposition is a statement in terms of a variable which should be True (1) or False (0). Example Ans. Can the proposition be classified ? (1) Primitive Proposition: Simplest one (2) Compound Proposition: More complicated Five connectives:NOT(), AND(), OR() imply(), and if and only if() e. g. p Professor Chung is our Discrete math teacher. q It rains. r The ground is wet. e. g. qr q r It rains and the ground is wet. It doesn’t rain or the ground is wet. Example q r q qr qr qr q r qr 0 0 1 0 0 1 1 1 0 1 1 0 1 1 1 0 1 0 0 0 1 0 0 0 1 1 0 1 1 1 1 1 qr q r Example Prove by contradiction. Ans. Key: Prove “(p q)” is false. p q p q p q Example Proof by contradiction example Ans. If it rains, then the ground is wet pq pq p q p q p q -q means the ground is not wet, but p means it doesn’t rain. Example Simply (1) q p q p (2) p q r q Ans. (1) q p q p q p p q p q p p q p q Ans. (2) p q r q (DeMorgan‘s law, 迪摩根律) p q r q (DeMorgan's law) p q q r (Absorption law, 吸收律) qr 8.3 Logical Inference Premises Conclusion Tautology p1 p2 ... pk C e. g. p pq q (1) p p q q p p q q p p q q p p q q p p p q q 1 p q q 1 p 1 q q p q q 1 (2) Example Is the following inference correct? p q r s q t p t rs Ans. Prove by contradiction! p q r s q t p t r s 0 r s 0 r 1& s 0 p q 0 1 q t p t 1 t 0& p 0 From p q 0 1& p 0 q0 But 1 q 1 0 0 We complete the proof. 8.4 Predicate Logic Predicate logic EQUAL( x, y ) EQUAL(5,5) 1& EQUAL(5, 6) 0 18 Quantifiers! Universal: Existential: Example P x x 4 x 3 0 Q x EVEN x x P x Q x is true x 4makesP x 1& Q x 1 19 Example “Everyone has only one strongest subject.” Ans. X:person Y:subject Z:the other subjects P(x,y):x’s strongest subject is the course y x y z P x, y z y P x, z 20 Example (1) There is a person in this city who works in City Government but does not knows anyone else in the city. (2) Express the negation of (1) such that there is no implication operator and no negation is to the left of a quantifier. 21 Ans. (1)xy C x F x, y (2) xy C x F x, y xy C x F x, y 22 Example (1)x A x B y (xA( x) xB( x)) (2)xA( x) xB( x) x( A( x) B( x)) Ans: (1) True! key: if x is in global domain for two predicates, then x is feasible to be in local domain for each predicate. (2) False! The reverse is not true. 23