quiz 4 - x y ( P ( x ) Q ( y )) 1 4. (10 points) Problem on...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE 260 QUIZ-4 Applications: ANSWERS (20 minutes) Total Points: 30 NAME: SECTION NO 1. (4 points) Specify the free and bound variables in the following logical expressions. Also indicate the scope of each of the quantiFers. Universe of discourse of the bound variables is all integers. x ( P ( x, y ) Q ( x, z ) ∨ ∀ yR ( x, y )) Bound Variables: x, y ±ree Variable: z Scope of x is ( P ( x, y ) Q ( x, z ) ∨ ∀ yR ( x, y )) Scope of y is R ( x, y ) 2. (10 points) D ( x, y ): Doctor x is sees paitent y . Give the meaning of the following logical expressions: (a) x yD ( x, y ) There is a doctor who sees all the patients. (b) x ( D ( x, y ) D ( x, John ”)) Patient y is seen by the same doctor who sees John. (c) x y ( D ( x, John ”) D ( y, John ”) x 6 = y ) John is seen by at least two doctors. 3. (6 points) Convert the following into an equivalent logical expression so that no negation precedes a quantiFer.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: x y ( P ( x ) Q ( y )) 1 4. (10 points) Problem on prolog Suppose prolog facts are used to deFne the predicate Height ( x, y ): y is the height of the person x . ollowing is a prolog program consisting of the following prolog rules. Height (John, 5.4); Height (David, 5.7); Height (Mary, 5.3); Height (Susan, 5.6); P ( z ) := Height ( x, w ) Height ( y, z ) w > z ; Q ( x, y ) := Height ( x, y ) P ( y ); Answer the following prolog queries for the above program: ? Height ( x, y ) { ( John, 5 . 4) , ( David, 5 . 7) , ( Mary, 5 . 3) , ( Susan, 5 . 6) } ? Height ( John, 5 . 4) True ? P ( y ) { 5 . 4 , 5 . 3 , 5 . 6 } ? Q ( x, y ) { ( David, 5 . 7) } 2...
View Full Document

This note was uploaded on 03/30/2008 for the course CSE 260 taught by Professor Saktipramanik during the Spring '08 term at Michigan State University.

Page1 / 2

quiz 4 - x y ( P ( x ) Q ( y )) 1 4. (10 points) Problem on...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online