The following number (percentage) of students scored in the following ranges:

Similar documents
173 Logic and Prolog 2013 With Answers and FFQ

Formal Logic: Quantifiers, Predicates, and Validity. CS 130 Discrete Structures

Predicate Logic: Sematics Part 1

Solutions to Problem Set 1

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

3.2: Compound Statements and Connective Notes

Predicate Logic: Syntax

Quantifiers Here is a (true) statement about real numbers: Every real number is either rational or irrational.

Section Summary. Section 1.5 9/9/2014

Section 3.1: Direct Proof and Counterexample 1

Mathematics for Computer Science Exercises from Chapter 3

PROBABILISTIC REASONING SYSTEMS

THE LOGIC OF QUANTIFIED STATEMENTS. Predicates and Quantified Statements I. Predicates and Quantified Statements I CHAPTER 3 SECTION 3.

Course Staff. Textbook

Introduction to Sets and Logic (MATH 1190)

Section Summary. Predicate logic Quantifiers. Negating Quantifiers. Translating English to Logic. Universal Quantifier Existential Quantifier

Final Exam Theory Quiz Answer Page

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning.

1 Propositional Logic

Proseminar on Semantic Theory Fall 2013 Ling 720 First Order (Predicate) Logic: Syntax and Natural Deduction 1

Proof. Theorems. Theorems. Example. Example. Example. Part 4. The Big Bang Theory

Section 8.3 Higher-Order Logic A logic is higher-order if it allows predicate names or function names to be quantified or to be arguments of a

Mathematical Preliminaries. Sipser pages 1-28

Predicate Calculus - Semantics 1/4

Propositional Logic Not Enough

Probabilistic Classification

Name: Exam 2 Solutions. March 13, 2017

Quantifying uncertainty & Bayesian networks

Predicate Calculus lecture 1

3. The Logic of Quantified Statements Summary. Aaron Tan August 2017

ICS141: Discrete Mathematics for Computer Science I

A. Incorrect! This inequality is a disjunction and has a solution set shaded outside the boundary points.

Higher Unit 9 topic test

cis32-ai lecture # 18 mon-3-apr-2006

Examples: P: it is not the case that P. P Q: P or Q P Q: P implies Q (if P then Q) Typical formula:

(Refer Slide Time: 02:20)

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

G52DOA - Derivation of Algorithms Predicate Logic

Knowledge Representation and Reasoning

MATH 2001 MIDTERM EXAM 1 SOLUTION

8. Reductio ad absurdum

! Predicates! Variables! Quantifiers. ! Universal Quantifier! Existential Quantifier. ! Negating Quantifiers. ! De Morgan s Laws for Quantifiers

TECHNISCHE UNIVERSITEIT EINDHOVEN Faculteit Wiskunde en Informatica. Final examination Logic & Set Theory (2IT61/2IT07/2IHT10) (correction model)

Section 3.1 Statements, Negations, and Quantified Statements

Section 2.3: Statements Containing Multiple Quantifiers

Logic and Proofs. (A brief summary)

Logic and Prolog Midterm, CSC173With Answers and FFQOct. 26, 20

Example. Logic. Logical Statements. Outline of logic topics. Logical Connectives. Logical Connectives

Logic. Logic is a discipline that studies the principles and methods used in correct reasoning. It includes:

Math 10850, fall 2017, University of Notre Dame

MAT 243 Test 1 SOLUTIONS, FORM A

Lecture 4: Proposition, Connectives and Truth Tables

Today s Lecture. ICS 6B Boolean Algebra & Logic. Predicates. Chapter 1: Section 1.3. Propositions. For Example. Socrates is Mortal

With Question/Answer Animations. Chapter 2

Discrete Structures for Computer Science

A Little Deductive Logic

COMP4418: Knowledge Representation and Reasoning First-Order Logic

MAT2345 Discrete Math

CS 1571 Introduction to AI Lecture 14. First-order logic. CS 1571 Intro to AI. Midterm

Chapter 1 Review of Equations and Inequalities

York University. Faculty of Science and Engineering MATH 1090, Section M Final Examination, April NAME (print, in ink): Instructions, remarks:

Introducing Proof 1. hsn.uk.net. Contents

Propositional and Predicate Logic

Discrete Mathematics and Its Applications

Closed Book Examination. Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE. M.Sc. in Advanced Computer Science

1. True/False (40 points) total

Logic. Quantifiers. (real numbers understood). x [x is rotten in Denmark]. x<x+x 2 +1

Quantifiers. P. Danziger

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

Logic. Stephen G. Ware CSCI 4525 / 5525

8. Reductio ad absurdum

Logic. Propositional Logic: Syntax

Bayesian Networks. Motivation

Conceptual Explanations: Simultaneous Equations Distance, rate, and time

Math.3336: Discrete Mathematics. Nested Quantifiers/Rules of Inference

Predicate Calculus - Syntax

A Little Deductive Logic

Mathematical Reasoning. The Foundation of Algorithmics

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

Questions Q1. * A circuit is set up as shown in the diagram. The battery has negligible internal resistance.

CISC681/481 AI Midterm Exam

Algebra Exam. Solutions and Grading Guide

First-Order Logic (FOL)

Predicate Logic combines the distinctive features of syllogistic and propositional logic.

Handout on Logic, Axiomatic Methods, and Proofs MATH Spring David C. Royster UNC Charlotte

Propositional and Predicate Logic

CSE 311: Foundations of Computing. Lecture 6: More Predicate Logic

For all For every For each For any There exists at least one There exists There is Some

Logic. Propositional Logic: Syntax. Wffs

CS 220: Discrete Structures and their Applications. Predicate Logic Section in zybooks

Propositional Logic Basics Propositional Equivalences Normal forms Boolean functions and digital circuits. Propositional Logic.

Informatics 2D Reasoning and Agents Semester 2,

Topics in Logic and Proofs

HW1 graded review form? HW2 released CSE 20 DISCRETE MATH. Fall

Preparing for the CS 173 (A) Fall 2018 Midterm 1

Logic Overview, I. and T T T T F F F T F F F F

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 1

Logic - recap. So far, we have seen that: Logic is a language which can be used to describe:

CS 730/730W/830: Intro AI

Variable Names. Some Ques(ons about Quan(fiers (but answers are not proven just stated here!) x ( z Q(z) y P(x,y) )

Transcription:

The following number (percentage) of students scored in the following ranges: 100: 6 (18%) 95-99: 11 (33%) 90-94: 5 (15%) [22 (67%) scored 90 or better] 85-89: 3 (9%) 80-84: 3 (9%) [28 (85%) scored 80 or better] 70-79: 4 (12%) <70 : 1 (3%) The following number (percentage) of students missed points on these problems: 1. All students answered this problem correctly. 2. 2 (6%) students missed points. 3. 3 (9%) students missed points. 4. 21 (64%) students missed points. 5. 7 (21%) students missed points. 6. 2 (6%) students missed points. 7. (was mis-labeled 6, on the back) 1 (3%) students missed points. 8. (was mis-labeled 7, on the back) 12 (36%) students missed points. 9. (was mis-labeled 8, on the back) 11 (33%) students missed points. Problem #4: ANALYSIS OF COMMON ERRORS. Write down an FOPC sentence such that every world in which it is true contains exactly one object. Remember that every FOPC sentence (wff = well formed formula) separates possible worlds into two sets: (1) the set of worlds in which the wff is true, and (2) the set of worlds in which the wff is false. You were asked to produce a wff that is true in exactly those possible worlds with exactly one object, and false in all possible worlds with two or more objects. (By convention, all possible worlds must contain at least one object.) (a) One common mistake was to quantify over x and y and treat them as if they were truth values that could be connected by the Boolean connectives, e.g., x y ( x y ) ( x y ) or y x x y or x y ( x y ) ( x = y ) or x y x [ y ( x = y ) ]

or x y x y ( x = y ) or x y x y or!x ( true x ) or x ( x x ) This is a type error --- any variable bound to a quantifier automatically quantifies over all objects in some possible world. Thus, any variable is equivalent to a term, and may be used only as the argument to a function or predicate. An object does not have a Boolean truth value. Only predicates and complex sentences have truth values. (b) Another common mistake was to quantify over x and y and treat one of them as if it were a possible world, then write a Contains(x,y) predicate that tries to assert that world x contains object y, e.g., x y World(x) Contains(x, y) or x World(x) = True x! or x y World(x) Object(y) Contains(x, y) or x!y True(x) Contains(x, y) or x World(x) Round(x) This is a type error --- x and y quantify over objects in some possible world, but are not themselves possible worlds. (c) Another common mistake was to introduce some arbitrary predicate, often P(x), and then assert uniqueness in the quantifier using P(x) as the body of the wff, e.g., or!x P(x)!x American(x) President(x) But these wffs simply asserts that there is one unique object in the world that satisfies the predicate P. In particular, it fails to assert that there are no other objects in the world (e.g., there may be many other objects in the world that fail to satisfy the predicate P). The same thing holds when P(x) = American(x) President(x). (d) Some students apparently confused the universal and existential quantifiers, e.g., x y ( x = y ) This would be the correct answer with the universal quantifier. However, as written, it asserts that there exists an object that equals itself, which is true in every world. (e) Some students inserted explicit Object(x) predicates, e.g., or x Object(x) y Object(y) Different(x, y) x y Object(x) ( y = x Object(y)

This is correct, but unnecessary, because in FOPC x and y can only be objects. Nevertheless, these students received full credit, because their wff was correct. Problem #5: ANALYSIS OF COMMON ERRORS. (a) One common error was to try to unify functions of variables, not the variables themselves, e.g., 5.d. F(x) / F( F(z) ) should be x / F(z) 5.d. F(John) / F( F(John) ) should be x / F(z) 5.f. F(x) / F( G(y) ) should be x / G(y) 5.f. F(John) / F( G(John) ) should be x / G(y) Remember that only variables can be substituted, not function calls. (b) Another common error was to unify functions with different names, e.g., 5.e. F(x) / G(z) should be None (c) Another somewhat common error was to stop after the first substitution, without providing the rest of the substitutions needed to make the unification complete. Problem #8 (was mis-labeled 7, on the back): ANALYSIS OF COMMON ERRORS. By far the most common error occurred in substituting table values for variables that were designated as false, e.g., m=f or a=f or b=f. Many students failed to subtract the probability given in the table from 1, and instead used the positive probability. Remember that the probabilities given in the tables are for the TRUE case, and you must subtract them from 1 in order to obtain the probability of the FALSE case. Problem #9 (was mis-labeled 8, on the back): ANALYSIS OF COMMON ERRORS. 9.b. (was 8.b.) For every child, there is a jellybean that the child likes. Correct answer was: H x y Child(x) [ JB(y) Likes(x, y) ] Popular wrong answers included: E x y [ Child(x) JB(y) ] Likes(x, y) This wff is true in any world in which everything likes at least one thing, because then the consequent will always be true, and so the implication will always be true --- even if there are no jellybeans in that world. It is also true in any world in which everything is a child and at least one thing is not a jellybean, because then the antecedent will always be false, and so the implication will always be true --- even if there are no jellybeans in that world. And yet, if the world contains at least one child,

then the English sentence asserts that it must contain at least one jellybean. So, it is a mistake that the wff can be true in worlds that contain a child and no jellybeans. It may be easiest to see the mistake by converting to CNF: x y [ Child(x) JB(y) ] Likes(x, y) x y [ Child(x) JB(y) ] Likes(x, y) x y [Child(x) JB(y) ] Likes(x, y) This wff is true in a world in which everything is a child and at least one thing is not a jellybean. It is also true in any world in which everything likes at least one thing. Both these conditions admit worlds in which there is at least one child and no jellybeans. C x y Child(x) JB(y) Likes(x, y) This wff asserts that everything is a child ( x... Child(x)... ). G y x JB(y) [ Child(x) Likes(x, y) ] This wff is true in any world that contains ANY object that is NOT a jellybean, because that one object will make the antecedent always be false ( y... JB(y)... ), and so will make the implication always be true. Yet the English sentence makes an assertion about every child, not worlds that contain an object that is not a jellybean. 9.c. (was 8.c.) For every jellybean, there is a child that likes that jellybean. Correct answer was: F y x JB(y) [ Child(x) Likes(x, y) ] Popular wrong answers included: D x y Child(x) [ JB(y) Likes(x, y) ] This wff asserts that there exists a child ( x... Child(x)... ) and that the child likes every jellybean (... y... [ JB(y) Likes(x, y) ] ). But this is the answer to 9.d, below. Here, we assert instead something about all jellybeans ( y... JB(y)... ). G y x JB(y) [ Child(x) Likes(x, y) ] This wff is true in any world that contains ANY object that is NOT a jellybean, because that one object will make the antecedent always be false ( y... JB(y)... ), and so will make the implication always be true. Yet the English sentence makes an assertion about jellybeans, not worlds that contain an object that is not a jellybean. 9.d. (was 8.d.) There is a child that likes every jellybean. Correct answer was: D x y Child(x) [ JB(y) Likes(x, y) ]

Popular wrong answers included: C x y Child(x) JB(y) Likes(x, y) This wff asserts that everything is a child ( x... Child(x)... ). F y x JB(y) [ Child(x) Likes(x, y) ] This wff was the correct answer to 9.c., above. It asserts something about all jellybeans ( y... JB(y)... ). Please compare the two logical forms carefully.

CS-271, Intro to A.I. Quiz#4 Spring Quarter, 2013 20 minutes YOUR NAME & EMAIL ADDRESS: YOUR ID: ID TO RIGHT: ROW: NO. FROM RIGHT: 1. (5 pts) Definition of conditional probability. Write the definition of P(H D) in terms of P(H), P(D), P(H D), and P(H D). P(H D) = P(H D) / P(D) 2. (5 pts) Bayes' Rule. Write the result of applying Bayes' Rule to P(H D). P(H D) = P(D H) P(H) / P(D) 3. (5 pts) Conjunction. Write the definition of P(H D) in terms of P(D), P(H), and P(H D). P(H D) = P(D) + P(H) - P(H D) 4. (5 points) Logic and possible worlds. Write down an FOPC sentence such that every world in which it is true contains exactly one object. x y, x=y [ ( x y, x=y) is also OK because all worlds must contain at least one object.] [(! x, x=x) is also OK (iff there s an appropriate predicate after! x, ); it s just syntactic sugar] 5. (20 pts total, 4 pts each) Unifiers and Unification. Write the most general unifier (or MGU) of the two terms given, or None if no unification is possible. Write your answer in the form of a substitution as given in your book, e.g., {x / John, y / Mary, z / Bill}. The first one is done for you as an example. 5a. UNIFY( Knows( John, x ), Knows( John, Jane ) ) { x / Jane } 5b. UNIFY( Knows( y, x ), Knows( John, Jane ) ) { x / Jane, y / John } 5c. UNIFY( Knows( John, x ), Knows( y, Father (y) ) ) { y / John, x / Father (John) } 5d. UNIFY( Knows( John, F(x) ), Knows( y, F(F(z)) ) ) { y / John, x / F (z) } 5e. UNIFY( Knows( John, F(x) ), Knows( y, G(z) ) ) None 5f. UNIFY( Knows( John, F(x) ), Knows( y, F(G(y)) ) ) { y / John, x / G (John) } 6. (15 pts total, -5 for each error, but not negative) Bayesian Networks. Write down the factored conditional probability expression corresponding to this Bayesian Network. B E A D C F P(A B) P(B C, D) P(C D, F) P(D E, F) P(E) P(F) **** TURN QUIZ OVER. QUIZ CONTINUES ON THE REVERSE. ****

6. (15 pts total, -5 for each error, but not negative) Bayesian Networks. Draw the Bayesian Network corresponding to this factored conditional probability expression. Draw left-to-right, as in Problem 5. A B P(A C) P(B C, E) P(C D) P(D F) P(E D, F) P(F) C 7. (15 pts total, -5 for each error, but not negative) Bayesian Networks. Shown below is the Bayesian network corresponding to the Burglar Alarm problem, P(J A) P(M A) P(A B, E) P(B) P(E). (Burglary) B (John calls) D E A F (Alarm) (Earthquake) E (Mary calls) P(B).001 B E P(A) t t.95 t f.94 f t.29 f f.001 P(E).002 J M A P(J) t.90 f.05 A P(M) t.70 f.01 Write down an expression that will evaluate to P( j=t m=f a=f b = F e = T). Express your answer as a series of numbers (numerical probabilities) separated by multiplication symbols. You do not need to carry out the multiplication to produce a single number (probability). SHOW YOUR WORK. P( j=t m=f a=f b = F e = T) = P( j=t a=f) * P( m=f a = F) * P( a=f b=f e=t) * P( b=f) * P(e=T) =.05 *.99 *.71 *.999 *.002 8. (15 pts total, 5 pts each) FOPC translation. Write on the left the letter for the best corresponding wff on the right. Use Child(x) for x is a child, JB (x) for x is a JellyBean, and Likes(x, y) for x likes y. The first one is done for you as an example. Note: There are more FOPC than English sentences. 8.a. A Every child likes every jellybean. 8.b. (5 pts) H For every child, there is a jellybean that the child likes. 8.c. (5 pts) F For every jellybean, there is a child that likes that jellybean. 8.d. (5 pts) D There is a child that likes every jellybean A x y [ Child(x) JB(y) ] Likes(x, y) B x y [ Child(x) JB(y) ] Likes(x, y) C x y Child(x) JB(y) Likes(x, y) D x y Child(x) [ JB(y) Likes(x, y) ] E x y [ Child(x) JB(y) ] Likes(x, y) F y x JB(y) [ Child(x) Likes(x, y) ] G y x JB(y) [ Child(x) Likes(x, y) ] H x y Child(x) [ JB(y) Likes(x, y) ] I y x [ Child(x) JB(y) ] Likes(x, y) J x y Child(x) JB(y) Likes(x, y)