Name: CSCI E-220: Artificial Intelligence Midterm Exam, Fall Term 2001

Similar documents
CS 540: Introduction to Artificial Intelligence

Module 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur

Section 2.2: Introduction to the Logic of Quantified Statements

CSL105: Discrete Mathematical Structures. Ragesh Jaiswal, CSE, IIT Delhi

Computation Club: Gödel s theorem

CS Introduction to Artificial Intelligence

Knowledge Representation

CS 540: Introduction to Artificial Intelligence

Lisp: Question 1. Dr. Zoran Duric () Midterm Review 1 1/ 13 September 23, / 13

Fall 2013 Midterm Exam 10/22/13. This is a closed-book, closed-notes exam. Problem Points Score. Various definitions are provided in the exam.

CS 416, Artificial Intelligence Midterm Examination Fall 2004

CSE505, Fall 2012, Midterm Examination October 30, 2012

CS Introduction to Artificial Intelligence

Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras. Lecture - 37 Resolution Rules

Artificial Intelligence. Chapters Reviews. Readings: Chapters 3-8 of Russell & Norvig.

CS-171, Intro to A.I. Mid-term Exam Fall Quarter, 2014

Homework #6 (Constraint Satisfaction, Non-Deterministic Uncertainty and Adversarial Search) Out: 2/21/11 Due: 2/29/11 (at noon)

Overview. CS389L: Automated Logical Reasoning. Lecture 6: First Order Logic Syntax and Semantics. Constants in First-Order Logic.

Artificial Intelligence Class 3: Search (Ch ) Some material adopted from notes by Charles R. Dyer, University of Wisconsin-Madison

Propositional Calculus: Boolean Functions and Expressions. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

Foundations of AI. 9. Predicate Logic. Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution

Midterm Practice Exam Sample Solutions

The Logic Paradigm. Joseph Spring. 7COM1023 Programming Paradigms

Propositional Logic. Part I

8. Relational Calculus (Part II)

COMP2411 Lecture 20: Logic Programming Examples. (This material not in the book)

Com S 541. Programming Languages I

Automated Reasoning. Natural Deduction in First-Order Logic

Lecture 4: January 12, 2015

Chapter 1.3 Quantifiers, Predicates, and Validity. Reading: 1.3 Next Class: 1.4. Motivation

CS-171, Intro to A.I. Mid-term Exam Fall Quarter, 2017

CMSC 331 Final Exam Section 0201 December 18, 2000

Midterm solutions. n f 3 (n) = 3

CSE 20 DISCRETE MATH. Fall

The Environment Model

Software Paradigms (Lesson 6) Logic Programming

CS 540-1: Introduction to Artificial Intelligence

EXTENSIONS OF FIRST ORDER LOGIC

6.001 Notes: Section 8.1

6.001 Notes: Section 6.1

CSCI-630 Foundations of Intelligent Systems Fall 2015, Prof. Zanibbi

The Environment Model. Nate Foster Spring 2018

Structure and Interpretation of Computer Programs

The discussion of Chapter 1 will be split into two sessions; the first will cover 1.1 and 1.2; the second will cover 1.3, 1.4, and 1.5.

Lecture 17 of 41. Clausal (Conjunctive Normal) Form and Resolution Techniques

CSC 501 Semantics of Programming Languages

(Refer Slide Time: 4:00)

University of Illinois at Chicago Department of Computer Science. Final Examination. CS 151 Mathematical Foundations of Computer Science Fall 2012

State Space Search. Many problems can be represented as a set of states and a set of rules of how one state is transformed to another.

Exam 1 Review. MATH Intuitive Calculus Fall Name:. Show your reasoning. Use standard notation correctly.

Conjunctive queries. Many computational problems are much easier for conjunctive queries than for general first-order queries.

6.001 Notes: Section 15.1

The Metalanguage λprolog and Its Implementation

University of Toronto Department of Electrical and Computer Engineering. Midterm Examination. ECE 345 Algorithms and Data Structures Fall 2012

CS3 Midterm 1 Fall 2007 Standards and solutions

Chapter 2 & 3: Representations & Reasoning Systems (2.2)

Knowledge Representation. CS 486/686: Introduction to Artificial Intelligence

Inference rule for Induction

CMPSCI 250: Introduction to Computation. Lecture #22: Graphs, Paths, and Trees David Mix Barrington 12 March 2014

6.034 Notes: Section 10.1

Formal Systems and their Applications

Knowledge & Reasoning

Operations of Relational Algebra

Last class. CS Principles of Programming Languages. Introduction. Outline

Notes for Chapter 12 Logic Programming. The AI War Basic Concepts of Logic Programming Prolog Review questions

Part I Logic programming paradigm

Logic and its Applications

1. true / false By a compiler we mean a program that translates to code that will run natively on some machine.

Structure and Interpretation of Computer Programs

Finite Model Generation for Isabelle/HOL Using a SAT Solver

Part II. Hoare Logic and Program Verification. Why specify programs? Specification and Verification. Code Verification. Why verify programs?

Artificial Intelligence Lecture 1

Programming Languages Third Edition

Indicate the option which most accurately completes the sentence.

CS 3360 Design and Implementation of Programming Languages. Exam 1

CPSC 121 Some Sample Questions for the Final Exam Tuesday, April 15, 2014, 8:30AM

Chapter 9: Constraint Logic Programming

Knowledge Representation Issues, Predicate Logic, Rules

CPSC 121: Models of Computation. Module 5: Predicate Logic

Overloading, Type Classes, and Algebraic Datatypes

2.1. Rectangular Coordinates and Graphs. 2.1 Rectangular Coordinates and Graphs 2.2 Circles 2.3 Functions 2.4 Linear Functions. Graphs and Functions

CITS2211 Discrete Structures Logic

COMP4418 Knowledge Representation and Reasoning

Towards a Logical Reconstruction of Relational Database Theory

CMSC 331 Final Exam Section 0201 December 18, 2000

CPS 231 Exam 2 SOLUTIONS

CSE 332, Spring 2010, Midterm Examination 30 April 2010

PdOd Kev Events I Re-world war I1 rwa

Solutions to Exercises

(a) (4 pts) Prove that if a and b are rational, then ab is rational. Since a and b are rational they can be written as the ratio of integers a 1

Formal Predicate Calculus. Michael Meyling

Lecture 5: Predicate Calculus. ffl Predicate Logic ffl The Language ffl Semantics: Structures

Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Chapter 6 Outline. Unary Relational Operations: SELECT and

Z Notations. Dr. Rong Qu. rxq/#g53fsp. G53FSP Formal Specification 1

CS 314 Principles of Programming Languages

CS510 \ Lecture Ariel Stolerman

CS 314 Principles of Programming Languages. Lecture 16

CS 3360 Design and Implementation of Programming Languages. Exam 1

COP4020 Spring 2011 Midterm Exam

Q1:a. Best first search algorithm:

Transcription:

Name: CSCI E-220: Artificial Intelligence Midterm Exam, Fall Term 2001 This is a 75-minute, open-book exam. Take a minute to look over the exam, and begin by answering the questions you feel most comfortable with. If you start a problem and have trouble with it, go on to another one. If you've spent more than 15 minutes on a question, go on to another one, and come back to the earlier questions if you have time at the end. Write all answers on these pages. You may use the backs of the pages if you need more space for any problem, but clearly number any such continuations. 1. Lisp [15 pts.] Write a recursive function EVENS in CommonLISP that returns every other element of a list, beginning with the second. That is, the function returns all the elements in even-numbered positions in the list. For example, the function call (EVENS '(A B C D E F G)) should return the value (B D F). The function call (EVENS '(A)) should return NIL. You don't have to error-check the input (that is, you can assume you're getting a list). Your function must not have any side effects.

2. State-space Problem Representation Consider the following problem (adapted from an old book of puzzles): A robot has an empty 9-gallon jug and an empty 4-gallon jug. A water tap and a drain are available The robot needs to get exactly 6 gallons of water into the 9 gallon jug. The robot can perform the following primitive functions only: 1. Completely fill a jug from the water tap (regardless of how much water is in it already); 2. Completely empty a jug down the drain; 3. Pour from one jug into the other until either (a) the first jug is empty, or (b) the second jug is full. For instance, if the big jug had 7 gallons in it and the small jug had 1, the robot could pour 3 gallons from the big jug into the small jug (filling the small jug), or could pour 1 gallon from the small jug into the big jug (emptying the small jug), but could not pour any other amount from one into the other. The robot could also fill either jug to the brim, or empty either jug. Set this problem up as a state-space problem, as follows: (a) [5 pts.] Begin by choosing a representation for a state. (What are the important bits of information you need to represent?). Describe and/or demonstrate your state representation. (b) [7 pts.] Using the representation and notation you have chosen: What is the start state? What is/are the goal state(s)? How many different possible states are there, in total? (continued on next page)

(c) [10 pts.] Define all the operators that can be used to change one legal state into another. Your operators must be defined in terms of your particular state representation (using variables and mathematical notation to avoid writing out every single state transformation). 3. Minimax Search with Alpha-Beta Pruning [15 pts.] In the tree below, clearly show the final backed-up values that would be calculated at each node if you were performing a left-to-right Minimax search of this tree, using Alpha-Beta pruning. As with the examples in class, show with a double strike-through line any nodes which would be pruned, and do not continue to calculate below the pruning marks. Put an X through nodes at which values are not calculated. Do this for leaf nodes as well (the values listed are those that would be calulated if necessary, but your algorithm might never actually get to them!) Finally, show with an arrow which move would actually be made from the root OR node. 6 3 8 4 5 2 7 1 2 8 9 6

4. Knowledge Representation Here is a set of facts that one might want to represent in some type of knowledge base: (1) Encyclopedias and dictionaries are (kinds of) books. (2) Webster's Third is a dictionary. (3) Britannica is an encyclopedia. (4) Every book has a color property. (5) Red and green are colors. (6) All Dictionaries are red. (7) Encyclopedias are never red. (8) The Britannica encyclopedia is green. (9) Every book is either an encyclopedia or a dictionary but not both. Read all four parts below (a, b, c, and d) before beginning: (a) [12 pts.] Represent the set of facts above using an inheritance net (with IS-A and property links, as described in class). Be sure to explain the meaning of every kind of link or node symbol you use. If there are any facts that cannot easily be represented, leave them out. Your representation should be flexible enough to enable you to answer part (c) below.

(b) [5 pts.] In the previous part, you had to leave out one or more facts. Explain briefly why it/they could not be represented using inheritance networks. (c) [5 pts.] Using your knowledge representation formalism, briefly explain the algorithm you would use to answer the question "What color is Webster's Third?" What is the answer? (d) [5 pts.] If you had set this problem up using predicate calculus instead of an IS-A hierarchy, could you have represented the fact(s) that were not representable in part (a)? If so, show a reasonable way to represent those specific facts. Be sure to provide explicit semantic interpretations for any relations or constants you use.

5. Theorem Proving (a) [5 pts.] Give a well-formed-formula, involving at least one universal quantifier and one existential quantifier, and at least two variables, that is satisfiable but not valid. Show that it is satisfiable by providing a real-world (English) interpretation of the symbols that make the wff true, and show that it is not valid by providing another real-world interpretation that makes the wff false. (b) [8 pts.] Show how you would resolve the two clauses using unification. Clearly state every substitution you need to make, and show the new clause that results from the resolution. Key: A, B, and C are constants.; x, y, and z are variables; f is a Skolem function; P, Q, and R are predicates. (i) P(A,B,x,f(y)) v Q(x,y,z) (ii) ~P(y,B,y,z) v R(A,B,f(z)) (c) [8 pts.] Convert the following formula to clause form. Show all work. ( x) ( y) [ (~Q(x) v ~R(y) ) --> P(x) ]