CSE 4308/5360 - Fall 2007Midterm 2, Thursday 11/15/2007Name: .Student ID: .1Total exam points: 100 + 20 extra credit.Question 1 15 points + extra credit 5 points.For of the following pairs of sentences, determine if they are logically equivalent (i.e., if each sentence of the pair implies the other sentence in the pair). Do not assume anything except the laws of propositional and first order logic.1a. for-every x, exists y: color(x) = y not (exists x, for-every y: not (color(x) = y) )1b. for-every x, exists y: f(x, y) exists y, for-every x,: f(x, y)1c. for-every x, exists y: color(x) = y Not (for-every x, exists y: not (color(x) = y) )1d. (Extra credit, 5 points). for-every x, exists y: son(x) = y for-every x, exists y: father(y) = x2Question 2 15 points + extra credit 5 points.Determine what is the most general unifier for each of the following pairs of expressions. The following conventions hold:F and G are relations.x, y, z are variables.John and Mary are grounded symbols.2a. F(x, y), F(y, x)2b. F(x, y), F(John, z)2c. F(x, y, z), F(z, G(Mary), John)2d. Extra credit, 5 points. F(x, g(y)), G(John, Mary)3Question 325 points + extra credit 5 points3a. Consider the following set of actions:Action(PutSockOnFoot(a, f): Precond: Sock(a), Foot(f), FreeSock(a) Effect: not (FreeSock(a)), SockOn(f)) Action(PutShoeOnFoot(b, f): Precond: Shoe(b), Foot(f), SockOn(f), FreeShoe(b) Effect: not (FreeShoe(b)), ShoeOn(f))Now, consider this initial state, and this goal:InitState: Sock(sock1) and Sock(sock2) and FreeSock(sock1)and FreeSock(sock2) and Shoe(left_shoe) and Shoe(right_shoe) and FreeShoe(left_shoe)and FreeShoe(right_shoe) and Foot(left_foot) and Foot(right_foot)Goal: ShoeOn(left_foot) and ShoeOn(right_foot) Make two different totally-ordered plans to achieve the goal, given the initial state.43b. Consider the following set of actions (just a little different from 2a).Action(PutSockOnFoot(a, f): Precond: Sock(a), Foot(f) Effect: SockOn(f)) Action(PutShoeOnFoot(b, f): Precond: Shoe(b), Foot(f), SockOn(f) Effect: ShoeOn(f))Now, consider this initial state, and this goal:InitState: Sock(sock1) and Shoe(left_shoe) and Foot(left_foot) and Foot(right_foot)Goal: ShoeOn(left_foot) and ShoeOn(right_foot) Make a totally-ordered plan to achieve the goal, given the initial state.53c. Consider the following set of actions (exactly the same as 2b).Action(PutSockOnFoot(a, f): Precond: Sock(a), Foot(f) Effect: SockOn(f)) Action(PutShoeOnFoot(b, f): Precond: Shoe(b), Foot(f), SockOn(f) Effect: ShoeOn(f))Now, consider this initial state, and this goal (also exactly the same as 2b).InitState: Sock(sock1) and Shoe(left_shoe) and Foot(left_foot) and Foot(right_foot)Goal: ShoeOn(left_foot) and ShoeOn(right_foot) Make a partially-ordered plan to achieve the goal, given the initial state. No order should be imposed between any two actions unless necessary (in other words, the plan should be minimally ordered).63d. Consider the following set of actions (slightly different than 2c).Action(PutSockOnFoot(a, f): Precond: Sock(a), Foot(f) Effect: SockOn(f) or SockOnFloor(a)) Action(PutShoeOnFoot(b, f): Precond: Shoe(b), Foot(f), SockOn(f) Effect: ShoeOn(f))Now, consider this initial state, and this goal (exactly the same as 2b and 2c).InitState: Sock(sock1) and Shoe(left_shoe) and Foot(left_foot) and Foot(right_foot)Goal: ShoeOn(left_foot) and ShoeOn(right_foot) Is there a finite conditional plan that always achieves the goal given the initial state? If yes, describe the plan. If not, why not?73e. Consider the following set of actions (exactly the same as 2d).Action(PutSockOnFoot(a, f): Precond: Sock(a), Foot(f) Effect: SockOn(f) or SockOnFloor(a) ) Action(PutShoeOnFoot(b, f): Precond: Shoe(b), Foot(f), SockOn(f) Effect: ShoeOn(f) )Now, consider this initial state, and this goal (exactly the same as 2b, 2c, and 2d).InitState: Sock(sock1) and Shoe(left_shoe) and Foot(left_foot) and Foot(right_foot)Goal: ShoeOn(left_foot) and ShoeOn(right_foot) Provide an execution-monitoring plan to achieve the goal given the initial state.83f (extra credit, 5 points). Consider the following set of actions (exactly the same as in 3a):Action(PutSockOnFoot(a, f): Precond: Sock(a), Foot(f), FreeSock(a) Effect: not (FreeSock(a)), SockOn(f)) Action(PutShoeOnFoot(b, f): Precond: Shoe(b), Foot(f), SockOn(f), FreeShoe(b) Effect: not (FreeShoe(b)), ShoeOn(f))Now, consider this initial state, and this goal (also exactly the same as in 3a)InitState: Sock(sock1) and Sock(sock2) and FreeSock(sock1)and FreeSock(sock2) and Shoe(left_shoe) and Shoe(right_shoe) and FreeShoe(left_shoe)and FreeShoe(right_shoe) and Foot(left_foot) and Foot(right_foot)Goal: ShoeOn(left_foot) and ShoeOn(right_foot) Give an example of a plan (sequence of actions) that does not make much intuitive sense (a person would not normally do such a thing, or would find it pretty awkward to do sucha thing). What modifications to the actions and init state are needed to fix that?9Question 415 points4a. Is the following function P a valid probability function? If you answer "no", explain why not. P(car_make = Honda) = 0.7P(car_make = Ford) = 0.4P(car_make = BMW) = 0.14b. Is the following function P a valid probability density function? If you answer "no", explain why not. P(x) = 100, if 10 <= x <= 10.01P(x) = 0 otherwise.4c. Is the following function P a valid probability density function? If you answer "no", explain why not. P(x) = 0.5, if 10 <= x <= 10.01P(x) = 0 otherwise.10Question 510 pointsConsider the following joint probability distribution table.Height weight < 60lb. weight60-120lb. weight > 120lb< 3feet 0.05 0.05 0.00 3.0-3.9 feet 0.04 0.10 0.104.0-4.9 feet 0.01 0.15 0.15> 5 feet 0.00 0.10 0.255a. Based on the above table, determine: P(height between 3.0 and 3.9 feet | weight > 120lb ).5b. Based on the above table,
View Full Document